Menus: Fix JS Warning when removing menu items.

Move the `updateParentDropdown` and `updateOrderDropdown` methods to be called on the jQuery menu object instead of on the `menus` translations object.

Props joedolson, abcd95, audrasjb.
Fixes #63059.
Built from https://develop.svn.wordpress.org/trunk@59950


git-svn-id: http://core.svn.wordpress.org/trunk@59292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2025-03-07 16:22:25 +00:00
parent 429d53f13e
commit 294aaff4e6
3 changed files with 6 additions and 6 deletions

View File

@ -1261,8 +1261,8 @@
deletionSpeech = menus.itemsDeleted.replace( '%s', itemsPendingDeletion ); deletionSpeech = menus.itemsDeleted.replace( '%s', itemsPendingDeletion );
wp.a11y.speak( deletionSpeech, 'polite' ); wp.a11y.speak( deletionSpeech, 'polite' );
that.disableBulkSelection(); that.disableBulkSelection();
menus.updateParentDropdown(); $( '#menu-to-edit' ).updateParentDropdown();
menus.updateOrderDropdown(); $( '#menu-to-edit' ).updateOrderDropdown();
} }
}); });
}, },
@ -1816,8 +1816,8 @@
} }
api.refreshAdvancedAccessibility(); api.refreshAdvancedAccessibility();
wp.a11y.speak( menus.itemRemoved ); wp.a11y.speak( menus.itemRemoved );
menus.updateParentDropdown(); $( '#menu-to-edit' ).updateParentDropdown();
menus.updateOrderDropdown(); $( '#menu-to-edit' ).updateOrderDropdown();
}); });
}, },

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.8-beta1-59949'; $wp_version = '6.8-beta1-59950';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.