Created
October 12, 2020 04:42
-
-
Save cryptexvinci/224a8acdfc86b6b2b8ebf98a82aa851a to your computer and use it in GitHub Desktop.
Change Ultimate Member text/label with the filter hook
This file contains hidden or 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 | |
/* | |
* title & label Gender to Gender Identity | |
* see: https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-builtin.php#L832 | |
* | |
* @param 'title', 'metakey', 'type', 'label', 'required', 'public', 'editable', 'options' | |
* | |
* @return array | |
*/ | |
add_filter( 'um_core_fields_hook', 'um_custom_modify_text', 10, 1 ); | |
function um_custom_modify_text( $core_fields ){ | |
$core_fields['gender']['title'] => __( 'Gender Identity','ultimate-member' ); | |
$core_fields['gender']['label'] => __( 'Gender Identity','ultimate-member' ); | |
return $core_fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment