diff --git a/wp-includes/post.php b/wp-includes/post.php index 9ddf3d96b2..112ba52b7b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -7653,8 +7653,6 @@ function wp_queue_posts_for_term_meta_lazyload( $posts ) { $term_ids = array(); if ( $prime_post_terms ) { - $prime_term_ids = array(); - $prime_taxonomy_ids = array(); foreach ( $prime_post_terms as $taxonomy => $post_ids ) { $cached_term_ids = wp_cache_get_multiple( $post_ids, "{$taxonomy}_relationships" ); if ( is_array( $cached_term_ids ) ) { @@ -7663,36 +7661,15 @@ function wp_queue_posts_for_term_meta_lazyload( $posts ) { // Backward compatibility for if a plugin is putting objects into the cache, rather than IDs. foreach ( $_term_ids as $term_id ) { if ( is_numeric( $term_id ) ) { - $prime_term_ids[] = (int) $term_id; - $prime_taxonomy_ids[ $taxonomy ][] = (int) $term_id; + $term_ids[] = (int) $term_id; } elseif ( isset( $term_id->term_id ) ) { - $prime_taxonomy_ids[ $taxonomy ][] = (int) $term_id->term_id; - $prime_term_ids[] = (int) $term_id->term_id; + $term_ids[] = (int) $term_id->term_id; } } } } } - - if ( $prime_term_ids ) { - $prime_term_ids = array_unique( $prime_term_ids ); - // Do not prime term meta at this point, let the lazy loader take care of that. - _prime_term_caches( $prime_term_ids, false ); - - foreach ( $prime_taxonomy_ids as $taxonomy => $_term_ids ) { - foreach ( $_term_ids as $term_id ) { - if ( in_array( $term_id, $term_ids, true ) ) { - continue; - } - $term = get_term( $term_id, $taxonomy ); - if ( is_wp_error( $term ) ) { - continue; - } - - $term_ids[] = $term_id; - } - } - } + $term_ids = array_unique( $term_ids ); } wp_lazyload_term_meta( $term_ids ); diff --git a/wp-includes/version.php b/wp-includes/version.php index fd6039b99c..75015bfef9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55700'; +$wp_version = '6.3-alpha-55701'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.