user_{$field} WordPress Filter Hook

The user_{$field} hook is used to retrieve the value of a specified user field. This hook can be used to retrieve any user field, including custom fields.

apply_filters( "user_{$field}", mixed $value, int $user_id, string $context ) #

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.


Top ↑

Parameters

$value

(mixed)The user object value to sanitize.

$user_id

(int)User ID.

$context

(string)The context to filter within.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More