From 2543ffbbae0c9e7b398908c4c4cad6251dedefa8 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 19 Oct 2015 01:53:24 +0000 Subject: [PATCH] Bust object term cache in `wp_remove_object_terms()`. Props tszming. Fixes #34338. Built from https://develop.svn.wordpress.org/trunk@35268 git-svn-id: http://core.svn.wordpress.org/trunk@35234 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy-functions.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/taxonomy-functions.php b/wp-includes/taxonomy-functions.php index 3a3fd2a6cc..22f858da26 100644 --- a/wp-includes/taxonomy-functions.php +++ b/wp-includes/taxonomy-functions.php @@ -2908,6 +2908,8 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) { do_action( 'delete_term_relationships', $object_id, $tt_ids ); $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) ); + wp_cache_delete( $object_id, $taxonomy . '_relationships' ); + /** * Fires immediately after an object-term relationship is deleted. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 4987c8a9c3..c0f141e0c7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-35267'; +$wp_version = '4.4-alpha-35268'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.