Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_open_graph_title()publicYoast 1.0

Generates the open graph title.

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

Хуков нет.

Возвращает

Строку. The open graph title.

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

$Indexable_Presentation = new Indexable_Presentation();
$Indexable_Presentation->generate_open_graph_title();

Код Indexable_Presentation::generate_open_graph_title() Yoast 20.0

public function generate_open_graph_title() {
	if ( $this->model->open_graph_title ) {
		$open_graph_title = $this->model->open_graph_title;
	}

	if ( empty( $open_graph_title ) ) {
		// The helper applies a filter, but we don't have a default value at this stage so we pass an empty string.
		$open_graph_title = $this->values_helper->get_open_graph_title( '', $this->model->object_type, $this->model->object_sub_type );
	}

	if ( empty( $open_graph_title ) ) {
		$open_graph_title = $this->title;
	}

	return $open_graph_title;
}