the_author_(field)
Filters the value of the requested user metadata.
The filter name is dynamic and depends on the $field parameter of the function.
Usage
add_filter( 'the_author_(field)', 'wp_kama_the_author_field_filter', 10, 2 ); /** * Function for `the_author_(field)` filter-hook. * * @param string $author_meta The value of the metadata. * @param int|false $user_id The user ID. * * @return string */ function wp_kama_the_author_field_filter( $author_meta, $user_id ){ // filter... return $author_meta; }
- $author_meta(string)
- The value of the metadata.
- $user_id(int|false)
- The user ID.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
the_author_(field)
wp-includes/author-template.php 217
echo apply_filters( "the_author_{$field}", $author_meta, $user_id );