Filter: um_change_field_label

apply_filters( 'um_change_field_label', $label, $key, $data ) → {string}

Filters Ultimate Member field label.

Parameters:
Name Type Description
$label string

Field label.

$key string

Field key.

$data array

Field data.

Since:
  • 2.8.0 Added $data attribute.
Source:
Returns:

Field label.

Type
string
Example

Change first name field label.

function my_change_field_label( $label, $key, $data ) {
    if ( 'first_name' === $key ) {
        $label = 'My label';
    }
    return $label;
}
add_filter( 'um_change_field_label', 'my_change_field_label', 10, 3 );