WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта
функция не описана

Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_twitter_description() public Yoast 1.0

Generates the Twitter description.

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

Хуков нет.

Возвращает

Строку. The Twitter description.

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

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

Код Indexable_Presentation::generate_twitter_description() Yoast 16.8

<?php
public function generate_twitter_description() {
	if ( $this->model->twitter_description ) {
		return $this->model->twitter_description;
	}

	if ( $this->context->open_graph_enabled === true ) {
		$social_template_description = $this->values_helper->get_open_graph_description( '', $this->model->object_type, $this->model->object_sub_type );
		$open_graph_description      = $this->open_graph_description;

		// If the helper returns a value and it's different from the OG value in the indexable,
		// output it in a twitter: tag.
		if ( ! empty( $social_template_description ) && $social_template_description !== $open_graph_description ) {
			return $social_template_description;
		}

		// If the OG description is set, let og: tag take care of this.
		if ( ! empty( $open_graph_description ) ) {
			return '';
		}
	}

	if ( $this->meta_description ) {
		return $this->meta_description;
	}

	return '';
}