You appear to be a bot. Output may be restricted
Description
If the new theme was previously active, we should honor any changes to nav menu mapping done when the other theme was active.
Usage
Tests_Nav_Menu_Theme_Change::test_new_theme_previously_active();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/menu/nav-menu.php
Lines:
1 to 19 of 19
public function test_new_theme_previously_active() { $this->register_nav_menu_locations( array( 'primary' ) ); $prev_theme_nav_menu_locations = array( 'primary' => 1, 'secondary' => 2, ); // Nav menu location assignments that were set on the next theme when it was previously active. $old_next_theme_nav_menu_locations = array( 'primary' => 3, ); $new_next_theme_nav_menu_locations = wp_map_nav_menu_locations( $old_next_theme_nav_menu_locations, $prev_theme_nav_menu_locations ); $expected_nav_menu_locations = wp_array_slice_assoc( $prev_theme_nav_menu_locations, array_keys( get_registered_nav_menus() ) ); $this->assertSame( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations ); }