Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_open_graph_description()publicYoast 1.0

Generates the open graph description.

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

Хуков нет.

Возвращает

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

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

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

Код Indexable_Presentation::generate_open_graph_description() Yoast 22.4

public function generate_open_graph_description() {
	if ( $this->model->open_graph_description ) {
		$open_graph_description = $this->model->open_graph_description;
	}

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

	if ( empty( $open_graph_description ) ) {
		$open_graph_description = $this->meta_description;
	}

	return $open_graph_description;
}