WPSEO_Post_Metabox_Formatter::get_image_url()protectedYoast 1.0

Gets the image URL for the post's social preview.

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

Хуков нет.

Возвращает

Строку|null. The image URL for the social preview.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_image_url();

Код WPSEO_Post_Metabox_Formatter::get_image_url() Yoast 22.4

protected function get_image_url() {
	return WPSEO_Image_Utils::get_first_usable_content_image_for_post( $this->post->ID );
}