Yoast\WP\SEO\Context

Meta_Tags_Context::generate_has_image()publicYoast 1.0

Determines whether the current indexable has an image.

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

Хуков нет.

Возвращает

true|false. Whether the current indexable has an image.

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

$Meta_Tags_Context = new Meta_Tags_Context();
$Meta_Tags_Context->generate_has_image();

Код Meta_Tags_Context::generate_has_image() Yoast 24.0

public function generate_has_image() {
	return $this->main_image_url !== null;
}