Yoast\WP\SEO\Presentations

Indexable_Post_Type_Presentation::generate_open_graph_article_author()publicYoast 1.0

Generates the open graph article author.

Метод класса: Indexable_Post_Type_Presentation{}

Хуков нет.

Возвращает

Строку. The open graph article author.

Использование

$Indexable_Post_Type_Presentation = new Indexable_Post_Type_Presentation();
$Indexable_Post_Type_Presentation->generate_open_graph_article_author();

Код Indexable_Post_Type_Presentation::generate_open_graph_article_author() Yoast 22.4

public function generate_open_graph_article_author() {
	if ( $this->model->object_sub_type !== 'post' ) {
		return '';
	}

	$post = $this->source;

	$open_graph_article_author = $this->user->get_the_author_meta( 'facebook', $post->post_author );

	if ( $open_graph_article_author ) {
		return $open_graph_article_author;
	}

	return '';
}