Changeset 6613
- Timestamp:
- 02/12/2018 11:01:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/widgets.php
r6612 r6613 45 45 parent::form( $instance ); 46 46 47 $checked = $instance['show_home'] ? 'checked="checked"' : '';47 $checked = checked( ! empty( $instance['show_home'] ), true, false ); 48 48 ?> 49 49 <p> … … 56 56 public function update( $new_instance, $old_instance ) { 57 57 $instance = parent::update( $new_instance, $old_instance ); 58 $instance['show_home'] = (bool) $new_instance['show_home'];58 $instance['show_home'] = isset( $new_instance['show_home'] ) ? (bool) $new_instance['show_home'] : false; 59 59 60 60 return $instance;
Note: See TracChangeset
for help on using the changeset viewer.