WordPress.org

Make WordPress Core

Changeset 31886


Ignore:
Timestamp:
03/25/2015 05:33:49 PM (6 years ago)
Author:
ocean90
Message:

Text Widget: Use !empty() for checking if the filter setting is set.

props westonruter.
fixes #31690.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-widgets.php

    r31520 r31886  
    534534        else
    535535            $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
    536         $instance['filter'] = isset($new_instance['filter']);
     536        $instance['filter'] = ! empty( $new_instance['filter'] );
    537537        return $instance;
    538538    }
Note: See TracChangeset for help on using the changeset viewer.