mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Prefix sidebar IDs on the widgets screen with "sidebar-". props batmoo. fixes #14466.
git-svn-id: http://core.svn.wordpress.org/trunk@22387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c04587d409
commit
bc93c0fdc5
@ -67,7 +67,7 @@ function _sort_name_callback( $a, $b ) {
|
||||
function wp_list_widget_controls( $sidebar ) {
|
||||
add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' );
|
||||
|
||||
echo "<div id='$sidebar' class='widgets-sortables'>\n";
|
||||
echo "<div id='sidebar-$sidebar' class='widgets-sortables'>\n";
|
||||
|
||||
$description = wp_sidebar_description( $sidebar );
|
||||
|
||||
|
@ -115,7 +115,7 @@ wpWidgets = {
|
||||
var add = ui.item.find('input.add_new').val(),
|
||||
n = ui.item.find('input.multi_number').val(),
|
||||
id = the_id,
|
||||
sb = $(this).attr('id');
|
||||
sb = $(this).attr('id').replace(/^sidebar-/, '');
|
||||
|
||||
ui.item.css({margin:'', 'width':''});
|
||||
the_id = '';
|
||||
@ -186,7 +186,7 @@ wpWidgets = {
|
||||
|
||||
$('div.widgets-sortables').each( function() {
|
||||
if ( $(this).sortable )
|
||||
a['sidebars[' + $(this).attr('id') + ']'] = $(this).sortable('toArray').join(',');
|
||||
a['sidebars[' + $(this).attr('id').replace(/^sidebar-/, '') + ']'] = $(this).sortable('toArray').join(',');
|
||||
});
|
||||
|
||||
$.post( ajaxurl, a, function() {
|
||||
@ -197,7 +197,7 @@ wpWidgets = {
|
||||
},
|
||||
|
||||
save : function(widget, del, animate, order) {
|
||||
var sb = widget.closest('div.widgets-sortables').attr('id'), data = widget.find('form').serialize(), a;
|
||||
var sb = widget.closest('div.widgets-sortables').attr('id').replace(/^sidebar-/, ''), data = widget.find('form').serialize(), a;
|
||||
widget = $(widget);
|
||||
$('.spinner', widget).show();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user