Yoast\WP\SEO\Helpers

Image_Helper::get_term_content_image()publicYoast 1.0

Gets the image url from the term content.

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

Хуков нет.

Возвращает

Строку. The image url or an empty string when not found.

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

$Image_Helper = new Image_Helper();
$Image_Helper->get_term_content_image( $term_id );
$term_id(int) (обязательный)
The term id to extract the images from.

Код Image_Helper::get_term_content_image() Yoast 22.4

public function get_term_content_image( $term_id ) {
	$image_url = $this->get_first_content_image_for_term( $term_id );

	if ( $image_url === null ) {
		return '';
	}

	return $image_url;
}