load_image_to_edit

FUNCTION wp-admin\includes\image.php (ligne 1110) github
Filters whether the current image is displayable in the browser.

Paramètres

Entrée :
$attachment_id, $mime_type, $size = 'full'
Sortie :
@param bool   $result Whether the image can be displayed. Default true.
@param string $path   Path to the image.
@param int          $attachment_id Attachment ID.
@param string       $mime_type     Image mime type.
@param string|int[] $size          Optional. Image size. Accepts any registered image size name, or an array
@return resource|GdImage|false The resulting image resource or GdImage instance on success,

Utilisation

// Utilisation de la fonction load_image_to_edit
$result = load_image_to_edit($attachment_id, $mime_type, $size = 'full');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...