Skip to content

Instantly share code, notes, and snippets.

@cryptexvinci
Created October 12, 2020 04:42
Show Gist options
  • Save cryptexvinci/224a8acdfc86b6b2b8ebf98a82aa851a to your computer and use it in GitHub Desktop.
Save cryptexvinci/224a8acdfc86b6b2b8ebf98a82aa851a to your computer and use it in GitHub Desktop.
Change Ultimate Member text/label with the filter hook
<?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