Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created November 5, 2022 19:08
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/8585217237e5e216f18746bc306ac80d to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/8585217237e5e216f18746bc306ac80d to your computer and use it in GitHub Desktop.
Hook um_shortcode_args_filter
<?php
/**
* Hook: um_shortcode_args_filter
*
* Type: filter
*
* Description: Change arguments on load shortcode.
* Used in the core to unserialize array arguments and change the template in special cases - display 'logout' and 'message' templates.
*
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-shortcodes.php#L676
* @link https://docs.ultimatemember.com/article/1267-umshortcodeargsfilter
*
* @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_shortcode_args_filter( $args ) {
// your code here.
return $args;
}
add_filter( 'um_shortcode_args_filter', 'my_shortcode_args_filter', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment