mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Pass the form fields names as strings when saving widgets, fixes #9703
git-svn-id: https://develop.svn.wordpress.org/trunk@11163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -122,9 +122,9 @@ wpWidgets = {
|
||||
if ( del )
|
||||
a['delete_widget'] = 1;
|
||||
|
||||
$.map(data, function(n,i){ a[n.name] = n.value; });
|
||||
data += '&' + $.param(a);
|
||||
|
||||
$.post( ajaxurl, a, function(r){
|
||||
$.post( ajaxurl, data, function(r){
|
||||
var id;
|
||||
$('.ajax-feedback').css('visibility', 'hidden');
|
||||
if ( !t )
|
||||
@@ -171,11 +171,11 @@ wpWidgets = {
|
||||
return false;
|
||||
});
|
||||
$('.widget-control-save', sc).click(function(){
|
||||
wpWidgets.save( $(this).parents('form').serializeArray(), $(this).parents('.widgets-sortables').attr('id'), 0, this );
|
||||
wpWidgets.save( $(this).parents('form').serialize(), $(this).parents('.widgets-sortables').attr('id'), 0, this );
|
||||
return false;
|
||||
});
|
||||
$('.widget-control-remove', sc).click(function(){
|
||||
wpWidgets.save( $(this).parents('form').serializeArray(), $(this).parents('.widgets-sortables').attr('id'), 1, this );
|
||||
wpWidgets.save( $(this).parents('form').serialize(), $(this).parents('.widgets-sortables').attr('id'), 1, this );
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user