Changeset 7621
- Timestamp:
- 04/07/2008 09:40:41 PM (18 years ago)
- Location:
- branches/2.5
- Files:
-
- 3 edited
-
wp-admin/js/widgets.js (modified) (2 diffs)
-
wp-includes/script-loader.php (modified) (1 diff)
-
wp-includes/widgets.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/wp-admin/js/widgets.js
r7411 r7621 12 12 var t = $(this); 13 13 if ( t.is(':visible') ) { 14 if ( disableFields ) { t.find( ': enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); }14 if ( disableFields ) { t.find( ':input:enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); } 15 15 li.css( 'marginLeft', 0 ); 16 16 t.siblings('h4').children('a').text( widgetsL10n.edit ); … … 26 26 27 27 if ( t.is(':visible') ) { 28 if ( disableFields ) { t.find( ': enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); }28 if ( disableFields ) { t.find( ':input:enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); } 29 29 if ( width > 250 ) 30 30 li.animate( { marginLeft: 0 } ); -
branches/2.5/wp-includes/script-loader.php
r7585 r7621 188 188 'confirmText' => __("Are you sure you want to delete the file '%title%'?\nClick ok to delete or cancel to go back.") 189 189 ) ); 190 $this->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20080 319' );190 $this->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20080407c' ); 191 191 $this->localize( 'admin-widgets', 'widgetsL10n', array( 192 192 'add' => __('Add'), -
branches/2.5/wp-includes/widgets.php
r7548 r7621 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.