Created
November 4, 2022 12:27
-
-
Save yuriinalivaiko/fb9dc1bda61f71a29333a2669a81767b to your computer and use it in GitHub Desktop.
Hook um_submit_form_error
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_error | |
* | |
* Type: filter | |
* | |
* Description: Change error text on the form submit. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-form.php#L289 | |
* @link https://docs.ultimatemember.com/article/1272-umsubmitformerror | |
* | |
* @package um\core | |
* @see um\core\Form::add_error() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param string $error Error string. | |
* @param string $key Error key. | |
* | |
* @return string Error string. | |
*/ | |
function my_submit_form_error( $error, $key ) { | |
// your code here. | |
return $error; | |
} | |
add_filter( 'um_submit_form_error', 'my_submit_form_error', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment