wp_content_img_tag

FILTER wp-includes\media.php (ligne 1971) github
Filters an img tag within the content for a given context.

Paramètres

Entrée :
$filtered_image, $context, $attachment_id
Sortie :
@param string $filtered_image Full img tag with attributes that will replace the source img tag.
@param string $context        Additional context, like the current filter name or the function name from where this was called.
@param int    $attachment_id  The image attachment ID. May be 0 in case the image is not an attachment.

Utilisation

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

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

Actualités

Chargement des actualités...