img_caption_shortcode

FUNCTION wp-includes\media.php (ligne 2498) github
Builds the Caption shortcode output. Allows a plugin to replace the content that would otherwise be returned. The filter is {@see 'img_caption_shortcode'} and passes an empty string, the attr parameter and the content parameter values. The supported attributes for the shortcode are 'id', 'caption_id', 'align', 'width', 'caption', and 'class'.

Paramètres

Entrée :
$attr, $content = ''
Sortie :
@param array  $attr {
@param string $content Optional. Shortcode content. Default empty string.
@return string HTML content to display the caption.

Utilisation

// Utilisation de la fonction img_caption_shortcode
$result = img_caption_shortcode($attr, $content = '');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...