Respect $_wp_suspend_cache_invalidation
in clean_object_term_cache()
.
Props mwidmann. Fixes #35208. git-svn-id: https://develop.svn.wordpress.org/trunk@36076 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6bc8f2e24c
commit
d7fccb6c01
@ -3456,12 +3456,20 @@ function wp_update_term_count_now( $terms, $taxonomy ) {
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @global bool $_wp_suspend_cache_invalidation
|
||||
*
|
||||
* @see get_object_taxonomies() for more on $object_type.
|
||||
*
|
||||
* @param int|array $object_ids Single or list of term object ID(s).
|
||||
* @param array|string $object_type The taxonomy object type.
|
||||
*/
|
||||
function clean_object_term_cache($object_ids, $object_type) {
|
||||
global $_wp_suspend_cache_invalidation;
|
||||
|
||||
if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !is_array($object_ids) )
|
||||
$object_ids = array($object_ids);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user