Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_the_author_{$field}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
180       * The filter name is dynamic and depends on the $field parameter of the function.
181       *
182       * @since 2.8.0
183       * @since 4.3.0 The `$original_user_id` parameter was added.
184       *
185       * @param string    $value            The value of the metadata.
186       * @param int       $user_id          The user ID for the value.
187       * @param int|false $original_user_id The original user ID, as passed to the function.
188       */
189      return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );
190 }
191
192 /**
193  * Outputs the field from the user's DB object. Defaults to current post's author.
194  *
195  * @since 2.8.0
196  *
197  * @param string    $field   Selects the field of the users record. See get_the_author_meta()
198  *                           for the list of possible fields.