Menus: Limit mapping to registered locations
Weeds out orphaned locations, so their information will not continue to be mapped to future themes. Fixes #42121. Built from https://develop.svn.wordpress.org/trunk@41811 git-svn-id: http://core.svn.wordpress.org/trunk@41645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a22bb4f3ad
commit
b17b035009
|
@ -1085,6 +1085,7 @@ function _wp_menus_changed() {
|
|||
*/
|
||||
function wp_map_nav_menu_locations( $new_nav_menu_locations, $old_nav_menu_locations ) {
|
||||
$registered_nav_menus = get_registered_nav_menus();
|
||||
$new_nav_menu_locations = array_intersect_key( $new_nav_menu_locations, $registered_nav_menus );
|
||||
|
||||
// Short-circuit if there are no old nav menu location assignments to map.
|
||||
if ( empty( $old_nav_menu_locations ) ) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-beta1-41810';
|
||||
$wp_version = '4.9-beta1-41811';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue