mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 14:53:08 +02:00
Use get_registered_nav_menus() in has_nav_menu().
props voldemortensen. fixes #29461. Built from https://develop.svn.wordpress.org/trunk@29717 git-svn-id: http://core.svn.wordpress.org/trunk@29491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
62d51238ee
commit
f84cbb4ba8
@ -142,9 +142,8 @@ function get_nav_menu_locations() {
|
|||||||
* @return bool Whether location has a menu.
|
* @return bool Whether location has a menu.
|
||||||
*/
|
*/
|
||||||
function has_nav_menu( $location ) {
|
function has_nav_menu( $location ) {
|
||||||
global $_wp_registered_nav_menus;
|
$registered_nav_menus = get_registered_nav_menus();
|
||||||
|
if ( ! isset( $registered_nav_menus[ $location ] ) ) {
|
||||||
if ( ! isset( $_wp_registered_nav_menus[ $location ] ) ) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user