Making WordPress.org

Changeset 8103


Ignore:
Timestamp:
01/18/2019 07:15:25 PM (6 years ago)
Author:
coreymckrill
Message:

WordCamp Post Types: Fix widgets without titles showing boolean value

A regression was introduced in r8094 that caused widgets without titles
to show 1 instead of having an empty string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/inc/widgets.php

    r8094 r8103  
    2323
    2424        extract( $args );
    25         $title = ( isset( $instance['title'] ) ) ?: '';
     25        $title = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
    2626        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    2727
     
    130130
    131131        $transient_key     = 'wcpt-' . md5( $args['widget_id'] );
    132         $instance['title'] = ( isset( $instance['title'] ) ) ?: '';
     132        $instance['title'] = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
    133133        $instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    134134
     
    245245
    246246        $transient_key     = 'wcpt-' . md5( $args['widget_id'] );
    247         $instance['title'] = ( isset( $instance['title'] ) ) ?: '';
     247        $instance['title'] = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
    248248        $instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    249249
     
    364364
    365365        $transient_key     = 'wcpt-' . md5( $args['widget_id'] );
    366         $instance['title'] = ( isset( $instance['title'] ) ) ?: '';
     366        $instance['title'] = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
    367367        $instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    368368
Note: See TracChangeset for help on using the changeset viewer.