Taxonomy: Rename temporary variable in `wp_queue_posts_for_term_meta_lazyload()`.

This ensures the `$term_ids` variable only contains term IDs and is not filled with full term objects due to deprecated term caching.

Introduced in [55252].

Props skithund, Chouby, joemcgill, flixos90, ocean90.
Fixes #57150.
Built from https://develop.svn.wordpress.org/trunk@55401


git-svn-id: http://core.svn.wordpress.org/trunk@54934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2023-02-21 21:04:17 +00:00
parent dd87b5a4bd
commit 6d0eaf9674
2 changed files with 3 additions and 3 deletions

View File

@ -7802,9 +7802,9 @@ function wp_queue_posts_for_term_meta_lazyload( $posts ) {
$cached_term_ids = wp_cache_get_multiple( $post_ids, "{$taxonomy}_relationships" );
if ( is_array( $cached_term_ids ) ) {
$cached_term_ids = array_filter( $cached_term_ids );
foreach ( $cached_term_ids as $term_ids ) {
foreach ( $cached_term_ids as $_term_ids ) {
// Backward compatibility for if a plugin is putting objects into the cache, rather than IDs.
foreach ( $term_ids as $term_id ) {
foreach ( $_term_ids as $term_id ) {
if ( is_numeric( $term_id ) ) {
$prime_term_ids[] = (int) $term_id;
$prime_taxonomy_ids[ $taxonomy ][] = (int) $term_id;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta3-55400';
$wp_version = '6.2-beta3-55401';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.