widget_text

widget_text

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('widget_text') is found 2 times:

  • /wp-includes/widgets/class-wp-widget-custom-html.php line 150
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    );
    unset( $simulated_text_widget_instance['content'] ); // Was moved to 'text' prop.
     
    /** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */
    $content = apply_filters( 'widget_text', $instance['content'], $simulated_text_widget_instance, $this );
     
    /**
     * Filters the content of the Custom HTML widget.
     *
     * @since 4.8.1
     *
  • /wp-includes/widgets/class-wp-widget-text.php line 283
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    * @param string                               $text     The widget content.
     * @param array                                $instance Array of settings for the current widget.
     * @param WP_Widget_Text|WP_Widget_Custom_HTML $widget   Current text or HTML widget instance.
     */
    $text = apply_filters( 'widget_text', $text, $instance, $this );
     
    if ( $is_visual_text_widget ) {
     
        /**
         * Filters the content of the Text widget to apply changes expected from the visual (TinyMCE) editor.
         *

See this hook used in plugins:

Examples using widget_text