From e64aa77090c07d2bf6d812ff634db2e55250b8fc Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 30 May 2016 04:11:27 +0000 Subject: [PATCH] Don't clear object relationship caches on term update. Since [37573], object relationship caches (`{$taxonomy}_relationships`) contain term IDs rather than term objects. See #36814. As such, it's no longer necessary to clear these caches when a term is updated; none of the data that's changed on update (name, description, count, etc) is stored in the relationship cache. Fixes #36251. Built from https://develop.svn.wordpress.org/trunk@37593 git-svn-id: http://core.svn.wordpress.org/trunk@37561 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 7 ------- wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index c255962210..e910e33cc5 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2948,13 +2948,6 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) { */ do_action( 'edited_term_taxonomy', $tt_id, $taxonomy ); - // Clean the relationship caches for all object types using this term. - $objects = $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tt_id ) ); - $tax_object = get_taxonomy( $taxonomy ); - foreach ( $tax_object->object_type as $object_type ) { - clean_object_term_cache( $objects, $object_type ); - } - /** * Fires after a term has been updated, but before the term cache has been cleaned. * diff --git a/wp-includes/version.php b/wp-includes/version.php index a0370f0ac8..a1d152035d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37592'; +$wp_version = '4.6-alpha-37593'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.