WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/18/17 22:10:41 (6 months ago)
Author:
westonruter
Message:

Widgets: Replace adding balanceTags on widget_custom_html_content filter in favor of just applying widget_text filters in the Custom HTML widget.

Ensures that users who copy HTML from the Text widget in legacy mode over to the Custom HTML widget will continue to get all of the same filters applied, including tag balancing and shortcodes, if a plugin added support. Plugins still have the widget_text_content and widget_custom_html_content filters they can use to target the specific widget types.

Amends [40893].
See #40951.
Fixes #40907 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-custom-html.php

    r41000 r41086  
    6262        $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); 
    6363 
    64         $content = $instance['content']; 
     64        /** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */ 
     65        $content = apply_filters( 'widget_text', $instance['content'], $instance, $this ); 
    6566 
    6667        /** 
Note: See TracChangeset for help on using the changeset viewer.