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

Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_twitter_image() public Yoast 1.0

Generates the Twitter image.

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

Хуков нет.

Возвращает

Строку. The Twitter image.

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

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

Код Indexable_Presentation::generate_twitter_image() Yoast 15.6.2

<?php
public function generate_twitter_image() {
	$images = $this->twitter_image_generator->generate( $this->context );
	$image  = \reset( $images );

	// When there is an image set by the user.
	if ( $image && $this->context->indexable->twitter_image_source === 'set-by-user' ) {
		return $image['url'];
	}

	// When there isn't a set image or there is a Open Graph image set.
	if ( empty( $image ) || ( $this->context->open_graph_enabled === true && $this->open_graph_images ) ) {
		return '';
	}

	return $image['url'];
}