get_the_author_{$field} WordPress Filter Hook

The get_the_author_{$field} hook is used to retrieve the value of a user meta field for the author of the current post.

apply_filters( "get_the_author_{$field}", string $value, int $user_id, int|false $original_user_id ) #

Filters the value of the requested user metadata.


Description

The filter name is dynamic and depends on the $field parameter of the function.


Top ↑

Parameters

$value

(string)The value of the metadata.

$user_id

(int)The user ID for the value.

$original_user_id

(int|false)The original user ID, as passed to the function.


Top ↑

Source

File: wp-includes/author-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.0The $original_user_id parameter was added.
2.8.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.