pre_user_(field)
Filters the value of a user field in the 'db' 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.
Использование
add_filter( 'pre_user_(field)', 'wp_kama_pre_user_field_filter' ); /** * Function for `pre_user_(field)` filter-hook. * * @param mixed $value Value of the prefixed user field. * * @return mixed */ function wp_kama_pre_user_field_filter( $value ){ // filter... return $value; }
- $value(разное)
- Value of the prefixed user field.
Список изменений
С версии 2.9.0 | Введена. |
Где вызывается хук
wp-includes/user.php 1849
$value = apply_filters( "pre_user_{$field}", $value );