Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created November 5, 2022 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriinalivaiko/2a1d309fe58160dd5662cdb74deef800 to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/2a1d309fe58160dd5662cdb74deef800 to your computer and use it in GitHub Desktop.
Hook um_pre_args_setup
<?php
/**
* Hook: um_pre_args_setup
*
* Type: filter
*
* Description: Change arguments on load shortcode.
*
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-shortcodes.php#L617
* @link https://docs.ultimatemember.com/article/1196-umpreargssetup
*
* @package um\core
* @see um\core\Shortcodes::load()
* @since 2.0
* @version 3.0
*
* @param array $args Shortcode arguments.
*
* @return array Shortcode arguments.
*/
function my_pre_args_setup( $args ) {
// your code here.
return $args;
}
add_filter( 'um_pre_args_setup', 'my_pre_args_setup', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment