mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-04 04:19:29 +00: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.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user