widget_text

widget_text

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('widget_text') is found 2 times:

  • /wp-includes/widgets/class-wp-widget-custom-html.php line 150
    		);
    		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 );
    
    		// Adds 'noopener' relationship, without duplicating values, to all HTML A elements that have a target.
    		$content = wp_targeted_link_rel( $content );
    
    		/**
    		 * Filters the content of the Custom HTML widget.
    
  • /wp-includes/widgets/class-wp-widget-text.php line 283
    		 * @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