Created
November 4, 2022 12:45
-
-
Save yuriinalivaiko/92564226a57595cbf089ea041ca689ce to your computer and use it in GitHub Desktop.
Hook um_submit_form_{$mode}
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_submit_form_{$mode} | |
* | |
* Type: action | |
* | |
* Description: Fires on the form submit. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-form.php#L589 | |
* @link https://docs.ultimatemember.com/article/1281-umsubmitformmode | |
* | |
* @package um\core | |
* @see um\core\Form::form_init() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $post Post data. | |
*/ | |
function my_submit_form_login( $post ) { | |
// your code here. | |
} | |
$mode = 'login'; | |
add_action( "um_submit_form_{$mode}", 'my_submit_form_login', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment