Created
February 16, 2013 21:34
-
-
Save DrewAPicture/4968840 to your computer and use it in GitHub Desktop.
Remove invalid menu locaitons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( is_array( $menu_locations ) ) { | |
foreach ( $menu_locations as $key => $value ) { | |
if ( ! is_string( $key ) ) | |
unset( $menu_locations[$key] ); | |
} | |
} | |
set_theme_mod( 'nav_menu_locations', $menu_locations ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment