From 3a47da7943937612f73769211db221fdfc1e6997 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 12 May 2015 20:13:53 +0000 Subject: [PATCH] Respect `$_wp_suspend_cache_invalidation` in `clean_term_cache()`. Props tollmanz, rmccue. Fixes #28743. git-svn-id: https://develop.svn.wordpress.org/trunk@32498 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index ffb18e1abc..75873c3ea5 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -3782,7 +3782,11 @@ function clean_object_term_cache($object_ids, $object_type) { * term object caches (false). Default true. */ function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true) { - global $wpdb; + global $wpdb, $_wp_suspend_cache_invalidation; + + if ( ! empty( $_wp_suspend_cache_invalidation ) ) { + return; + } if ( !is_array($ids) ) $ids = array($ids);