Created
November 4, 2022 12:15
-
-
Save yuriinalivaiko/2799866371914a8956033b7de75d423c to your computer and use it in GitHub Desktop.
Hook um_submit_post_form
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_post_form | |
* | |
* Type: filter | |
* | |
* Description: Change submitted data on form submit. | |
* May be used to modify or save raw input data before the data sanitize. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-form.php#L448 | |
* @link https://docs.ultimatemember.com/article/1282-umsubmitpostform | |
* | |
* @package um\core | |
* @see um\core\Form::form_init() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $data Submitted data. | |
* | |
* @return array Submitted data. | |
*/ | |
function my_submit_post_form( $data ) { | |
// your code here. | |
return $data; | |
} | |
add_filter( 'um_submit_post_form', 'my_submit_post_form', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment