In `wp_nav_menu()`, ensure that the `$menu` arg is populated when passed to filters.
Props greuben, chriscct7. Fixes #16594. git-svn-id: https://develop.svn.wordpress.org/trunk@32803 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a6a0480eb0
commit
d878213e55
|
@ -291,6 +291,10 @@ function wp_nav_menu( $args = array() ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( empty( $args->menu ) ) {
|
||||||
|
$args->menu = $menu;
|
||||||
|
}
|
||||||
|
|
||||||
// If the menu exists, get its items.
|
// If the menu exists, get its items.
|
||||||
if ( $menu && ! is_wp_error($menu) && !isset($menu_items) )
|
if ( $menu && ! is_wp_error($menu) && !isset($menu_items) )
|
||||||
$menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) );
|
$menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) );
|
||||||
|
|
Loading…
Reference in New Issue