Changeset 13068 for trunk/wp-includes/default-widgets.php
- Timestamp:
- 02/12/2010 08:14:17 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/default-widgets.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r12789 r13068 473 473 $instance = $old_instance; 474 474 $instance['title'] = strip_tags($new_instance['title']); 475 $instance['count'] = $new_instance['count']? 1 : 0;476 $instance['hierarchical'] = $new_instance['hierarchical']? 1 : 0;477 $instance['dropdown'] = $new_instance['dropdown']? 1 : 0;475 $instance['count'] = !empty($new_instance['count']) ? 1 : 0; 476 $instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0; 477 $instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0; 478 478 479 479 return $instance; … … 740 740 741 741 function update($new_instance, $old_instance) { 742 $testurl = $new_instance['url'] != $old_instance['url'];742 $testurl = ( isset($new_instance['url']) && ($new_instance['url'] != $old_instance['url']) ); 743 743 return wp_widget_rss_process( $new_instance, $testurl ); 744 744 } … … 940 940 $url = esc_url_raw(strip_tags( $widget_rss['url'] )); 941 941 $title = trim(strip_tags( $widget_rss['title'] )); 942 $show_summary = (int) $widget_rss['show_summary'];943 $show_author = (int) $widget_rss['show_author'];944 $show_date = (int) $widget_rss['show_date'];942 $show_summary = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0; 943 $show_author = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0; 944 $show_date = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0; 945 945 946 946 if ( $check_feed ) {
Note:
See TracChangeset
for help on using the changeset viewer.