wpseo_opengraph_author_facebook
Filter: wpseo_opengraph_author_facebook Allow developers to filter the article author's Facebook URL.
Использование
add_filter( 'wpseo_opengraph_author_facebook', 'wp_kama_wpseo_opengraph_author_facebook_filter', 10, 2 ); /** * Function for `wpseo_opengraph_author_facebook` filter-hook. * * @param bool|string $article_author The article author's Facebook URL, return false to disable. * @param Indexable_Presentation $presentation The presentation of an indexable. * * @return bool|string */ function wp_kama_wpseo_opengraph_author_facebook_filter( $article_author, $presentation ){ // filter... return $article_author; }
- $article_author(true|false|строка)
- The article author's Facebook URL, return false to disable.
- $presentation(Indexable_Presentation)
- The presentation of an indexable.
Где вызывается хук
wpseo_opengraph_author_facebook
yoast/src/presenters/open-graph/article-author-presenter.php 39
return \trim( \apply_filters( 'wpseo_opengraph_author_facebook', $this->presentation->open_graph_article_author, $this->presentation ) );