- the field label changed from "Birth Date" to "Age" in the directory and in the profile view.

This commit is contained in:
yuriinalivaiko
2023-10-22 19:09:53 +03:00
parent ac2d64ff49
commit 2b05999bd2
+18
View File
@@ -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 );