Created
November 4, 2022 11:59
-
-
Save yuriinalivaiko/e5d7baf4d574989d28fb7d8d43fea082 to your computer and use it in GitHub Desktop.
Hook um_before_{$mode}_form_is_loaded
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_before_{$mode}_form_is_loaded | |
* | |
* Type: action | |
* | |
* Description: Fires before the form shortcode is loaded. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-shortcodes.php#L792 | |
* @link https://docs.ultimatemember.com/article/1072-umbeforemodeformisloaded | |
* | |
* @package um\core | |
* @see um\core\Shortcodes::load() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $args Form shortcode arguments. | |
*/ | |
function my_before_login_form_is_loaded( $args ) { | |
// your code here. | |
} | |
$mode = 'login'; | |
add_action( "um_before_{$mode}_form_is_loaded", 'my_before_login_form_is_loaded', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment