Skip to content

Commit 365efb1

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55401 602fd350-edb4-49c9-b593-d223f7449a82
1 parent dac04be commit 365efb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7802,9 +7802,9 @@ function wp_queue_posts_for_term_meta_lazyload( $posts ) {
78027802
$cached_term_ids = wp_cache_get_multiple( $post_ids, "{$taxonomy}_relationships" );
78037803
if ( is_array( $cached_term_ids ) ) {
78047804
$cached_term_ids = array_filter( $cached_term_ids );
7805-
foreach ( $cached_term_ids as $term_ids ) {
7805+
foreach ( $cached_term_ids as $_term_ids ) {
78067806
// Backward compatibility for if a plugin is putting objects into the cache, rather than IDs.
7807-
foreach ( $term_ids as $term_id ) {
7807+
foreach ( $_term_ids as $term_id ) {
78087808
if ( is_numeric( $term_id ) ) {
78097809
$prime_term_ids[] = (int) $term_id;
78107810
$prime_taxonomy_ids[ $taxonomy ][] = (int) $term_id;

0 commit comments

Comments
 (0)