Changeset 7620 for trunk/wp-includes/widgets.php
- Timestamp:
- 04/07/2008 09:40:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r7548 r7620 615 615 616 616 foreach ( (array) $_POST['widget-text'] as $widget_number => $widget_text ) { 617 if ( !isset($widget_text['text']) && isset($options[$widget_number]) ) // user clicked cancel 618 continue; 617 619 $title = strip_tags(stripslashes($widget_text['title'])); 618 620 if ( current_user_can('unfiltered_html') ) … … 751 753 752 754 foreach ( (array) $_POST['widget-categories'] as $widget_number => $widget_cat ) { 755 if ( !isset($widget_cat['title']) && isset($options[$widget_number]) ) // user clicked cancel 756 continue; 753 757 $title = trim(strip_tags(stripslashes($widget_cat['title']))); 754 758 $count = isset($widget_cat['count']); … … 1171 1175 1172 1176 foreach( (array) $_POST['widget-rss'] as $widget_number => $widget_rss ) { 1177 if ( !isset($widget_rss['url']) && isset($options[$widget_number]) ) // user clicked cancel 1178 continue; 1173 1179 $widget_rss = stripslashes_deep( $widget_rss ); 1174 1180 $url = sanitize_url(strip_tags($widget_rss['url'])); … … 1461 1467 foreach ( (array) $_POST['widget-many'] as $widget_number => $widget_many_instance ) { 1462 1468 // compile data from $widget_many_instance 1469 if ( !isset($widget_many_instance['something']) && isset($options[$widget_number]) ) // user clicked cancel 1470 continue; 1463 1471 $something = wp_specialchars( $widget_many_instance['something'] ); 1464 1472 $options[$widget_number] = array( 'something' => $something ); // Even simple widgets should store stuff in array, rather than in scalar
Note: See TracChangeset
for help on using the changeset viewer.