diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index a0d364976e..fb1fea61fb 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -627,6 +627,7 @@ class WP_Query { * @since 4.9.0 Introduced the `$comment_count` parameter. * @since 5.1.0 Introduced the `$meta_compare_key` parameter. * @since 5.3.0 Introduced the `$meta_type_key` parameter. + * @since 6.1.0 Introduced the `$update_menu_item_cache` parameter. * * @param string|array $query { * Optional. Array or string of Query parameters. diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index c018cf23f9..8df3cd2cc8 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -753,11 +753,11 @@ function wp_get_nav_menu_items( $menu, $args = array() ) { } /** - * Prime all linked objects to menu items. + * Updates post and term caches for all linked objects for a list of menu items. * * @since 6.1.0 * - * @param WP_Post[] $menu_items Array post objects of menu items. + * @param WP_Post[] $menu_items Array of menu item post objects. */ function update_menu_item_cache( $menu_items ) { $post_ids = array(); @@ -767,6 +767,7 @@ function update_menu_item_cache( $menu_items ) { if ( 'nav_menu_item' !== $menu_item->post_type ) { continue; } + $object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true ); $type = get_post_meta( $menu_item->ID, '_menu_item_type', true ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a47a548fff..804d64009a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53507'; +$wp_version = '6.1-alpha-53508'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.