Filters the list of available post MIME types for the given post type.
$attachment_id, $unfiltered = false
Sortie :
@param string[]|null $mime_types An array of MIME types. Default null. @param string $type The post type name. Usually 'attachment' but can be any post type. @param int $attachment_id Attachment ID. @param bool $unfiltered Optional. Passed through to `get_attached_file()`. Default false. @return string|false Path to the original image file or false if the attachment is not an image.
// Utilisation de la fonction wp_get_original_image_path
$result = wp_get_original_image_path($attachment_id, $unfiltered = false);
if ($result) {
// Votre logique ici
}
Chargement des actualités...