From 868873da553828f18efb680fb61b7de49da1f0e7 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 21 Jan 2013 14:44:30 +0000 Subject: [PATCH] Declare wp_rewrite as global in _wp_menu_item_classes_by_context(). Props andrewryno fixes #7337 git-svn-id: http://core.svn.wordpress.org/trunk@23309 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index 4fc614eb83..bd0454252d 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -251,7 +251,7 @@ function wp_nav_menu( $args = array() ) { * @param array $menu_items The current menu item objects to which to add the class property information. */ function _wp_menu_item_classes_by_context( &$menu_items ) { - global $wp_query; + global $wp_query, $wp_rewrite; $queried_object = $wp_query->get_queried_object(); $queried_object_id = (int) $wp_query->queried_object_id;