edit_user_(field) filter-hook . WP 2.9.0
Filters a user field value in the 'edit' context.
The dynamic portion of the hook name, $field, refers to the prefixed user field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
Usage
add_filter( 'edit_user_(field)', 'filter_function_name_8440', 10, 2 ); function filter_function_name_8440( $value, $user_id ){ // filter... return $value; }
- $value(mixed)
- Value of the prefixed user field.
- $user_id(int)
- User ID.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
wp-includes/user.php 1471
$value = apply_filters( "edit_user_{$field}", $value, $user_id );
Where in WP core the hook is used WordPress
wp-includes/user.php 460
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );