mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-24 05:04:25 +00:00
Customize: Fix inability to delete nav menus by preventing preview filters from being added during customize_save admin ajax request.
Also prevent setting `nav_menu_locations[...]` values to `NaN` which gets sent as `null`. Amends [38810]. See #30937. Fixes #39103. git-svn-id: https://develop.svn.wordpress.org/trunk@39558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1177,7 +1177,11 @@
|
||||
|
||||
// @todo It would be better if this was added directly on the setting itself, as opposed to the control.
|
||||
control.setting.validate = function( value ) {
|
||||
return parseInt( value, 10 );
|
||||
if ( '' === value ) {
|
||||
return 0;
|
||||
} else {
|
||||
return parseInt( value, 10 );
|
||||
}
|
||||
};
|
||||
|
||||
// Edit menu button.
|
||||
|
||||
Reference in New Issue
Block a user