WordPress.org

Make WordPress Core

Changeset 48187


Ignore:
Timestamp:
06/26/2020 10:29:27 PM (16 months ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Make sure update_object_term_cache() caches all terms that were not already cached.

Due to an unintended break instruction from a previous iteration, the function cached only one term in each taxonomy.

Follow-up to [48055].

Props Chouby.
Fixes #50352.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r48109 r48187  
    34193419            if ( false === $value ) {
    34203420                $non_cached_ids[] = $id;
    3421                 break;
    34223421            }
    34233422        }
     
    34273426        return false;
    34283427    }
     3428
     3429    $non_cached_ids = array_unique( $non_cached_ids );
    34293430
    34303431    $terms = wp_get_object_terms(
Note: See TracChangeset for help on using the changeset viewer.