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.
Использование
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(строка)
- The value of the metadata.
- $user_id(int|false)
- The user ID.
Список изменений
| С версии 2.8.0 | Введена. |
Где вызывается хук
the_author_(field)
wp-includes/author-template.php 222
echo apply_filters( "the_author_{$field}", $author_meta, $user_id );