widget_text_content

FILTER wp-includes\widgets\class-wp-widget-text.php (ligne 298) github
Filters the content of the Text widget to apply changes expected from the visual (TinyMCE) editor. By default a subset of the_content filters are applied, including wpautop and wptexturize.

Paramètres

Entrée :
$text, $instance, $this
Sortie :
@param string         $text     The widget content.
@param array          $instance Array of settings for the current widget.
@param WP_Widget_Text $widget   Current Text widget instance.

Utilisation

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

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

Actualités

Chargement des actualités...