Make WordPress Core

Ticket #42226: normalise-widget-title.diff

File normalise-widget-title.diff, 863 bytes (added by Bsop, 7 years ago)

patch

  • src/wp-includes/widgets/class-wp-widget-media.php

    diff --git src/wp-includes/widgets/class-wp-widget-media.php src/wp-includes/widgets/class-wp-widget-media.php
    index 864d756..256ba78 100644
    abstract class WP_Widget_Media extends WP_Widget { 
    213213
    214214                echo $args['before_widget'];
    215215
    216                 if ( $instance['title'] ) {
     216                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     217                $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    217218
    218                         /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    219                         $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
     219                if ( $instance['title'] ) {
    220220                        echo $args['before_title'] . $title . $args['after_title'];
    221221                }
    222222