img_caption_shortcode_width

FILTER wp-includes\media.php (ligne 2618) github
Filters the width of an image's caption. By default, the caption is 10 pixels greater than the width of the image, to prevent post content from running up against a floated image.

Paramètres

Entrée :
$width, $atts, $content
Sortie :
@param int    $width    Width of the caption in pixels. To remove this inline style,
@param array  $atts     Attributes of the caption shortcode.
@param string $content  The image element, possibly wrapped in a hyperlink.

Utilisation

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

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

Actualités

Chargement des actualités...