WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

user_(field) хук-фильтр . WP 2.9.0

Filters the value of a user field in a standard 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( 'user_(field)', 'filter_function_name_4684', 10, 3 );
function filter_function_name_4684( $value, $user_id, $context ){
	// filter...

	return $value;
The user object value to sanitize.
User ID.
The context to filter within.

Список изменений

С версии 2.9.0 Введена.

Где вызывается хук

wp-includes/user.php 1313
$value = apply_filters( "user_{$field}", $value, $user_id, $context );

Где используется хук (в ядре WP)

wp-admin/includes/admin-filters.php 92
add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
wp-admin/includes/ms-admin-filters.php 14
add_action( 'user_admin_notices', 'new_user_email_admin_notice' );
wp-includes/default-filters.php 362
add_action( 'user_request_action_confirmed', '_wp_privacy_account_request_confirmed' );
wp-includes/default-filters.php 363
add_action( 'user_request_action_confirmed', '_wp_privacy_send_request_confirmation_notification', 12 ); // After request marked as completed.
wp-includes/default-filters.php 583
add_filter( 'user_has_cap', 'wp_maybe_grant_install_languages_cap', 1 );
wp-includes/default-filters.php 584
add_filter( 'user_has_cap', 'wp_maybe_grant_resume_extensions_caps', 1 );
wp-includes/default-filters.php 585
add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 );