load_image_to_edit_attachmenturl

FILTER wp-admin\includes\image.php (ligne 1234) github
Filters the path to an attachment's URL when editing the image. The filter is only evaluated if the file isn't stored locally and `allow_url_fopen` is enabled on the server.

Paramètres

Entrée :
wp_get_attachment_url( $attachment_id
Sortie :
@param string|false $image_url     Current image URL.
@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_attachmenturl'
add_filter('load_image_to_edit_attachmenturl', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...