Yoast\WP\SEO\Presentations

Indexable_Term_Archive_Presentation::generate_twitter_description()publicYoast 1.0

Generates the Twitter description.

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

Хуков нет.

Возвращает

Строку. The Twitter description.

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

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

Код Indexable_Term_Archive_Presentation::generate_twitter_description() Yoast 19.11

public function generate_twitter_description() {
	$twitter_description = parent::generate_twitter_description();
	if ( $twitter_description ) {
		return $twitter_description;
	}

	if ( $this->open_graph_description && $this->context->open_graph_enabled === true ) {
		return '';
	}

	return $this->taxonomy->get_term_description( $this->model->object_id );
}