mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@48187 git-svn-id: http://core.svn.wordpress.org/trunk@47956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3079ab76dc
commit
cb9c2ae83f
@ -3418,7 +3418,6 @@ function update_object_term_cache( $object_ids, $object_type ) {
|
|||||||
foreach ( $cache_values as $id => $value ) {
|
foreach ( $cache_values as $id => $value ) {
|
||||||
if ( false === $value ) {
|
if ( false === $value ) {
|
||||||
$non_cached_ids[] = $id;
|
$non_cached_ids[] = $id;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3427,6 +3426,8 @@ function update_object_term_cache( $object_ids, $object_type ) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$non_cached_ids = array_unique( $non_cached_ids );
|
||||||
|
|
||||||
$terms = wp_get_object_terms(
|
$terms = wp_get_object_terms(
|
||||||
$non_cached_ids,
|
$non_cached_ids,
|
||||||
$taxonomies,
|
$taxonomies,
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-48186';
|
$wp_version = '5.5-alpha-48187';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user