Changeset 10801
- Timestamp:
- 03/17/2009 02:58:15 AM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
-
default-widgets.php (modified) (5 diffs)
-
widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r10800 r10801 45 45 46 46 function update( $new_instance, $old_instance ) { 47 if ( !isset($new_instance['submit']) ) // user clicked cancel?48 return false;49 50 47 $instance = $old_instance; 51 48 $instance['title'] = strip_tags($new_instance['title']); … … 120 117 121 118 function update( $new_instance, $old_instance ) { 122 if( !isset($new_instance['submit']) ) // user clicked cancel?123 return false;124 125 119 $new_instance = (array) $new_instance; 126 120 $instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0); … … 213 207 214 208 function update( $new_instance, $old_instance ) { 215 if ( !isset($new_instance['submit']) ) // user clicked cancel?216 return false;217 218 209 $instance = $old_instance; 219 210 $new_instance = wp_parse_args( (array) $new_instance, array( 'title' => '', 'count' => 0, 'dropdown' => '') ); … … 276 267 277 268 function update( $new_instance, $old_instance ) { 278 if ( !isset($new_instance['submit']) ) // user clicked cancel?279 return false;280 281 269 $instance = $old_instance; 282 270 $instance['title'] = strip_tags($new_instance['title']); … … 319 307 320 308 function update( $new_instance, $old_instance ) { 321 if ( !isset($new_instance['submit']) ) // user clicked cancel?322 return false;323 324 309 $instance = $old_instance; 325 310 $instance['title'] = strip_tags($new_instance['title']); -
trunk/wp-includes/widgets.php
r10798 r10801 214 214 } 215 215 216 foreach ( (array) $_POST['widget-' . $this->id_base] as $number => $new_instance ) {216 foreach ( (array) $_POST['widget-' . $this->id_base] as $number => $new_instance ) { 217 217 $new_instance = stripslashes_deep($new_instance); 218 218 $this->_set($number); 219 220 if ( !isset($new_instance['submit']) ) 221 continue; 222 219 223 if ( isset($all_instances[$number]) ) 220 224 $instance = $this->update($new_instance, $all_instances[$number]);
Note: See TracChangeset
for help on using the changeset viewer.