Created
November 4, 2022 11:54
-
-
Save yuriinalivaiko/805d6de17568b44dfdad0e5ff378a0ff to your computer and use it in GitHub Desktop.
Hook um_admin_pre_save_field_to_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_admin_pre_save_field_to_form | |
* | |
* Type: filter | |
* | |
* Description: Change field data before save to form. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/admin/core/class-admin-builder.php#L725 | |
* @link https://docs.ultimatemember.com/article/1000-umadminpresavefieldtoform | |
* | |
* @package um\admin\core | |
* @see um\admin\core\Admin_Builder::update_field() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $field_args Field data. | |
* | |
* @return array Field data. | |
*/ | |
function my_admin_pre_save_field_to_form( $field_args ) { | |
// your code here. | |
return $field_args; | |
} | |
add_filter( 'um_admin_pre_save_field_to_form', 'my_admin_pre_save_field_to_form', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment