Filters the value of a user field in a standard context.
Description
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.
Parameters
$valuemixed- The user object value to sanitize.
$user_idint- User ID.
$contextstring- The context to filter within.
Source
$value = apply_filters( "user_{$field}", $value, $user_id, $context );
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.