Changeset 11757
- Timestamp:
- 07/31/2009 09:35:59 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r11718 r11757 407 407 <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea> 408 408 409 <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked( $instance['filter']); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs.'); ?></label></p>409 <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs.'); ?></label></p> 410 410 <?php 411 411 } … … 484 484 $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); 485 485 $title = esc_attr( $instance['title'] ); 486 $count = (bool) $instance['count'];487 $hierarchical = (bool) $instance['hierarchical'];488 $dropdown = (bool) $instance['dropdown'];486 $count = isset($instance['count']) ? (bool) $instance['count'] :false; 487 $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; 488 $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; 489 489 ?> 490 490 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?></label> … … 580 580 581 581 function form( $instance ) { 582 $title = esc_attr($instance['title']);583 if ( ! $number = (int) $instance['number'] )582 $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; 583 if ( !isset($instance['number']) || !$number = (int) $instance['number'] ) 584 584 $number = 5; 585 585 ?> … … 986 986 ?> 987 987 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label> 988 <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $instance['title'] );?>" /></p>988 <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php if (isset ( $instance['title'])) {echo esc_attr( $instance['title'] );} ?>" /></p> 989 989 <?php 990 990 }
Note: See TracChangeset
for help on using the changeset viewer.