attribute_escape

FILTER wp-includes\formatting.php (ligne 4728) github
Filters a string cleaned and escaped for output in an HTML attribute. Text passed to esc_attr() is stripped of invalid or special characters before output.

Paramètres

Entrée :
$safe_text, $text
Sortie :
@param string $safe_text The text after it has been escaped.
@param string $text      The text prior to being escaped.

Utilisation

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

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

Actualités

Chargement des actualités...