WPSEO_Sitemap_Image_Parser::get_term_images()publicYoast 1.0

Get the images in the term description.

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

Хуков нет.

Возвращает

Массив.

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

$WPSEO_Sitemap_Image_Parser = new WPSEO_Sitemap_Image_Parser();
$WPSEO_Sitemap_Image_Parser->get_term_images( $term );
$term(объект) (обязательный)
Term to get images from description for.

Код WPSEO_Sitemap_Image_Parser::get_term_images() Yoast 19.7.1

public function get_term_images( $term ) {

	$images = $this->parse_html_images( $term->description );

	foreach ( $this->parse_galleries( $term->description ) as $attachment ) {

		$images[] = [
			'src'   => $this->get_absolute_url( $this->image_url( $attachment->ID ) ),
		];
	}

	return $images;
}