mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-12 00:24:34 +00:00
Use get_registered_nav_menus() in has_nav_menu().
props voldemortensen. fixes #29461. git-svn-id: https://develop.svn.wordpress.org/trunk@29717 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -142,9 +142,8 @@ function get_nav_menu_locations() {
|
||||
* @return bool Whether location has a menu.
|
||||
*/
|
||||
function has_nav_menu( $location ) {
|
||||
global $_wp_registered_nav_menus;
|
||||
|
||||
if ( ! isset( $_wp_registered_nav_menus[ $location ] ) ) {
|
||||
$registered_nav_menus = get_registered_nav_menus();
|
||||
if ( ! isset( $registered_nav_menus[ $location ] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user