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

WPSEO_Sitemap_Image_Parser::get_gallery_attachments_for_included() protected Yoast 1.0

Returns an array with attachments for the post IDs that will be included.

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

Хуков нет.

Возвращает

Массив. The found attachments.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_gallery_attachments_for_included( $include );
$include(массив) (обязательный)
Array with IDs to include.

Код WPSEO_Sitemap_Image_Parser::get_gallery_attachments_for_included() Yoast 17.1

protected function get_gallery_attachments_for_included( $include ) {
	$ids_to_include = wp_parse_id_list( $include );
	$attachments    = $this->get_attachments(
		[
			'posts_per_page' => count( $ids_to_include ),
			'post__in'       => $ids_to_include,
		]
	);

	$gallery_attachments = [];
	foreach ( $attachments as $key => $val ) {
		$gallery_attachments[ $val->ID ] = $val;
	}

	return $gallery_attachments;
}