Make WordPress Core

Ticket #18601: 18601.patch

File 18601.patch, 1.2 KB (added by Viper007Bond, 15 years ago)
  • wp-includes/default-widgets.php

     
    220220
    221221        function widget( $args, $instance ) {
    222222                extract($args);
    223                 $c = $instance['count'] ? '1' : '0';
    224                 $d = $instance['dropdown'] ? '1' : '0';
     223                $c = ( ! empty( $instance['count'] ) ) ? '1' : '0';
     224                $d = ( ! empty( $instance['dropdown'] ) ) ? '1' : '0';
    225225                $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title'], $instance, $this->id_base);
    226226
    227227                echo $before_widget;
     
    426426                extract( $args );
    427427
    428428                $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base);
    429                 $c = $instance['count'] ? '1' : '0';
    430                 $h = $instance['hierarchical'] ? '1' : '0';
    431                 $d = $instance['dropdown'] ? '1' : '0';
     429                $c = ( ! empty( $instance['count'] ) ) ? '1' : '0';
     430                $h = ( ! empty( $instance['hierarchical'] ) ) ? '1' : '0';
     431                $d = ( ! empty( $instance['dropdown'] ) ) ? '1' : '0';
    432432
    433433                echo $before_widget;
    434434                if ( $title )