mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- the field label changed from "Birth Date" to "Age" in the directory and in the profile view.
This commit is contained in:
@@ -1003,3 +1003,21 @@ function um_edit_url_field_value( $value, $key ) {
|
||||
return $value;
|
||||
}
|
||||
add_filter( 'um_edit_url_field_value', 'um_edit_url_field_value', 10, 2 );
|
||||
|
||||
|
||||
/**
|
||||
* Change field label from "Birth Date" to "Age" in the directory and in the profile view.
|
||||
*
|
||||
* @param string $label Field Label.
|
||||
* @param string $key Field Key.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function um_view_label_birth_date( $label, $key = 'birth_date' ) {
|
||||
if ( 'birth_date' === $key ) {
|
||||
$label = __( 'Age', 'ultimate-member' );
|
||||
}
|
||||
return $label;
|
||||
}
|
||||
add_filter( 'um_view_label_birth_date', 'um_view_label_birth_date', 10, 1 );
|
||||
add_filter( 'um_change_field_label', 'um_view_label_birth_date', 10, 2 );
|
||||
|
||||
Reference in New Issue
Block a user