mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
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
This commit is contained in:
parent
311f800907
commit
e64aa77090
@ -2948,13 +2948,6 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
|
|||||||
*/
|
*/
|
||||||
do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );
|
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.
|
* Fires after a term has been updated, but before the term cache has been cleaned.
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user