image_send_to_editor

FILTER wp-admin\includes\media.php (ligne 168) github
Filters the image HTML markup to send to the editor when inserting an image.

Paramètres

Entrée :
$html, $id, $caption, $title, $align, $url, $size, $alt, $rel
Sortie :
@param string       $html    The image HTML markup to send.
@param int          $id      The attachment ID.
@param string       $caption The image caption.
@param string       $title   The image title.
@param string       $align   The image alignment.
@param string       $url     The image source URL.
@param string|int[] $size    Requested image size. Can be any registered image size name, or
@param string       $alt     The image alternative, or alt, text.
@param string       $rel     The image rel attribute.

Utilisation

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

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

Actualités

Chargement des actualités...