Skip to content

Commit f328836

Browse files
author
boonebgorges
committed
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
1 parent 5505b10 commit f328836

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

wp-includes/taxonomy.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,13 +2948,6 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
29482948
*/
29492949
do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );
29502950

2951-
// Clean the relationship caches for all object types using this term.
2952-
$objects = $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tt_id ) );
2953-
$tax_object = get_taxonomy( $taxonomy );
2954-
foreach ( $tax_object->object_type as $object_type ) {
2955-
clean_object_term_cache( $objects, $object_type );
2956-
}
2957-
29582951
/**
29592952
* Fires after a term has been updated, but before the term cache has been cleaned.
29602953
*

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.6-alpha-37592';
7+
$wp_version = '4.6-alpha-37593';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)