WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/18/2017 10:18:12 PM (3 years ago)
Author:
westonruter
Message:

Widgets: Replace adding balanceTags on widget_custom_html_content filter in favor of just applying widget_text filters in 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.

Merges [41086] onto 4.8 branch.
Amends [40893].
See #40951.
Fixes #40907 for 4.8.1.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/src/wp-includes/default-widgets.php

    r41044 r41087  
    120120        $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    121121
    122         $content = $instance['content'];
     122        /** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */
     123        $content = apply_filters( 'widget_text', $instance['content'], $instance, $this );
    123124
    124125        /**
Note: See TracChangeset for help on using the changeset viewer.