Created
November 4, 2022 12:40
-
-
Save yuriinalivaiko/4ebcac8e627cd0346345f109f5cab24b to your computer and use it in GitHub Desktop.
Hook um_get_custom_field_array
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_get_custom_field_array | |
* | |
* Type: filter | |
* | |
* Description: Extend custom field data on submit form error. | |
* Used in the core to validate fields with conditional logic. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/um-actions-form.php#L517 | |
* @link https://docs.ultimatemember.com/article/1140-umgetcustomfieldarray | |
* | |
* @package um\core | |
* @see um_submit_form_errors_hook_() | |
* @see um_get_custom_field_array() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $field Field data. | |
* @param array $fields All fields. | |
* | |
* @return array Field data. | |
*/ | |
function my_get_custom_field_array( $field, $fields ) { | |
// your code here. | |
return $field; | |
} | |
add_filter( 'um_get_custom_field_array', 'my_get_custom_field_array', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment