Created
November 5, 2022 19:08
-
-
Save yuriinalivaiko/8585217237e5e216f18746bc306ac80d to your computer and use it in GitHub Desktop.
Hook um_shortcode_args_filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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