Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Trac 39692: Fix missing assignment of menus on theme switch #245
+309
−12
Conversation
obenland
and others
added some commits
Aug 4, 2017
westonruter
changed the title from
Trac 39692: Preview link clicked - save a revision to Trac 39692: Fix missing assignment of menus on theme switch
Aug 4, 2017
| + array( 'header', 'main', 'navigation', 'primary', 'top' ), | ||
| + array( 'bottom', 'footer', 'secondary', 'subsidiary' ), | ||
| + array( 'social' ), | ||
| + // TODO: Find a second slug or remove, since locations with same slug are already mapped. |
| + $new_nav_menu_locations[ $new_location ] = $old_nav_menu_locations[ $location ]; | ||
| + | ||
| + // Remove the mapped location so it can't be mapped again. | ||
| + unset( $old_nav_menu_locations[ $location ] ); |
westonruter
Aug 7, 2017
Owner
@obenland I recall there being some unexpected behaviors when modifying an array while iterating over it. Is this why you have the Make sure this location wasn't mapped and removed previously condition above?
westonruter
added some commits
Aug 7, 2017
|
Committed to |
westonruter
closed this
Aug 9, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
westonruter commentedAug 4, 2017
https://core.trac.wordpress.org/ticket/39692