load_image_to_edit_path

FILTER wp-admin\includes\image.php (ligne 1247) github
Filters the returned path or URL of the current image.

Paramètres

Entrée :
$filepath, $attachment_id, $size
Sortie :
@param string|false $filepath      File path or URL to current image, or false.
@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_path'
add_filter('load_image_to_edit_path', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...