Created
November 4, 2022 12:06
-
-
Save yuriinalivaiko/8f133c172813984a9f12c4d693d97ab9 to your computer and use it in GitHub Desktop.
Hook um_get_form_fields
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_form_fields | |
* | |
* Type: filter | |
* | |
* Description: Extend form fields. | |
* Used in the core to prepare form fields. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-fields.php#L1524 | |
* @link https://docs.ultimatemember.com/article/1143-umgetformfields | |
* | |
* @package um\core | |
* @see um\core\Fields::get_fields() | |
* @see um_get_form_fields() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $fields Form fields. | |
* | |
* @return array|string An array of fields or empty string if the form is not set. | |
*/ | |
function my_get_form_fields( $fields ) { | |
// your code here. | |
return $fields; | |
} | |
add_filter( 'um_get_form_fields', 'my_get_form_fields', 100, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment