wpseo_meta_author
Filter: wpseo_meta_author Allow developers to filter the article's author meta tag.
Использование
add_filter( 'wpseo_meta_author', 'wp_kama_wpseo_meta_author_filter', 10, 2 ); /** * Function for `wpseo_meta_author` filter-hook. * * @param string $author_name The article author's display name. Return empty to disable the tag. * @param Indexable_Presentation $presentation The presentation of an indexable. * * @return string */ function wp_kama_wpseo_meta_author_filter( $author_name, $presentation ){ // filter... return $author_name; }
- $author_name(строка)
- The article author's display name. Return empty to disable the tag.
- $presentation(Indexable_Presentation)
- The presentation of an indexable.
Где вызывается хук
wpseo_meta_author
yoast/src/presenters/meta-author-presenter.php 57
return \trim( $this->helpers->schema->html->smart_strip_tags( \apply_filters( 'wpseo_meta_author', $user_data->display_name, $this->presentation ) ) );