shortcode_atts_{$shortcode}

FILTER wp-includes\shortcodes.php (ligne 690) github
Filters shortcode attributes. If the third parameter of the shortcode_atts() function is present then this filter is available. The third parameter, $shortcode, is the name of the shortcode.

Paramètres

Entrée :
$out, $pairs, $atts, $shortcode
Sortie :
@param array  $out       The output array of shortcode attributes.
@param array  $pairs     The supported attributes and their defaults.
@param array  $atts      The user defined shortcode attributes.
@param string $shortcode The shortcode name.

Utilisation

// Modifier la valeur avec le filtre 'shortcode_atts_{$shortcode}'
add_filter('shortcode_atts_{$shortcode}', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...