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 );
wp.a11y.speak( deletionSpeech, 'polite' );
that.disableBulkSelection();
menus.updateParentDropdown();
menus.updateOrderDropdown();
$( '#menu-to-edit' ).updateParentDropdown();
$( '#menu-to-edit' ).updateOrderDropdown();
}
});
},
@@ -1816,8 +1816,8 @@
}
api.refreshAdvancedAccessibility();
wp.a11y.speak( menus.itemRemoved );
menus.updateParentDropdown();
menus.updateOrderDropdown();
$( '#menu-to-edit' ).updateParentDropdown();
$( '#menu-to-edit' ).updateOrderDropdown();
});
},

File diff suppressed because one or more lines are too long