load_image_to_edit_filesystempath

FILTER wp-admin\includes\image.php (ligne 1218) github
Filters the path to an attachment's file when editing the image. The filter is evaluated for all image sizes except 'full'.

Paramètres

Entrée :
$filepath, $attachment_id, $size
Sortie :
@param string       $path          Path to the current image.
@param int          $attachment_id Attachment ID.
@param string|int[] $size          Requested image size. Can be any registered image size name, or

Utilisation

// Modifier la valeur avec le filtre 'load_image_to_edit_filesystempath'
add_filter('load_image_to_edit_filesystempath', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($filepath) {
    // Modifier la valeur
    return $filepath;
}

Actualités

Chargement des actualités...