apply_filters( 'um_user_profile_restricted_edit_fields', $fields, $_um_profile_id ) → {array}
Filters the form fields that need to be disabled in edit mode (profile).
Parameters:
Name | Type | Description |
---|---|---|
$fields |
array | Form fields. |
$_um_profile_id |
int | User Profile ID. |
- Since:
- 2.0
- Source:
Returns:
Form fields.
- Type
- array
Example
function my_make_email_editable( $fields, $_um_profile_id ) {
$fields = array_flip( $fields );
unset( $fields['user_email'] );
$fields = array_keys( $fields );
return $fields;
}
add_filter( 'um_user_profile_restricted_edit_fields', 'my_make_email_editable', 10, 2 );