Filters the output of 'wp_calculate_image_sizes()'.
$image_location, $image_meta, $attachment_id = 0
Sortie :
@param string $sizes A source size value for use in a 'sizes' attribute. @param string|int[] $size Requested image size. Can be any registered image size name, or @param string|null $image_src The URL to the image file or null. @param array|null $image_meta The image meta data as returned by wp_get_attachment_metadata() or null. @param int $attachment_id Image attachment ID of the original image or 0. @param string $image_location The full path or URI to the image file. @param array $image_meta The attachment meta data as returned by 'wp_get_attachment_metadata()'. @param int $attachment_id Optional. The image attachment ID. Default 0. @return bool Whether the image meta is for this image file.
// Utilisation de la fonction wp_image_file_matches_image_meta
$result = wp_image_file_matches_image_meta($image_location, $image_meta, $attachment_id = 0);
if ($result) {
// Votre logique ici
}
Chargement des actualités...