wp_get_missing_image_subsizes хук-фильтрWP 5.3.0

Filters the array of missing image sub-sizes for an uploaded image.

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

add_filter( 'wp_get_missing_image_subsizes', 'wp_kama_get_missing_image_subsizes_filter', 10, 3 );

/**
 * Function for `wp_get_missing_image_subsizes` filter-hook.
 * 
 * @param array[] $missing_sizes Associative array of arrays of image sub-size information for missing image sizes, keyed by image size name.
 * @param array   $image_meta    The image meta data.
 * @param int     $attachment_id The image attachment post ID.
 *
 * @return array[]
 */
function wp_kama_get_missing_image_subsizes_filter( $missing_sizes, $image_meta, $attachment_id ){

	// filter...
	return $missing_sizes;
}
$missing_sizes(array[])
Associative array of arrays of image sub-size information for missing image sizes, keyed by image size name.
$image_meta(массив)
The image meta data.
$attachment_id(int)
The image attachment post ID.

Список изменений

С версии 5.3.0 Введена.

Где вызывается хук

wp_get_missing_image_subsizes()
wp_get_missing_image_subsizes
wp-admin/includes/image.php 144
return apply_filters( 'wp_get_missing_image_subsizes', $missing_sizes, $image_meta, $attachment_id );

Где используется хук в WordPress

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