Taxonomy: Remove redundant `$taxonomies` value from cache keys used for `WP_Term_Query`.
Props niravsherasiya7707, spacedmonkey. Fixes #59594. See #35381. Built from https://develop.svn.wordpress.org/trunk@59028 git-svn-id: http://core.svn.wordpress.org/trunk@58424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3cd067ee34
commit
90673b9066
|
@ -1170,12 +1170,11 @@ class WP_Term_Query {
|
||||||
if ( 'count' !== $args['fields'] && 'all_with_object_id' !== $args['fields'] ) {
|
if ( 'count' !== $args['fields'] && 'all_with_object_id' !== $args['fields'] ) {
|
||||||
$cache_args['fields'] = 'all';
|
$cache_args['fields'] = 'all';
|
||||||
}
|
}
|
||||||
$taxonomies = (array) $args['taxonomy'];
|
|
||||||
|
|
||||||
// Replace wpdb placeholder in the SQL statement used by the cache key.
|
// Replace wpdb placeholder in the SQL statement used by the cache key.
|
||||||
$sql = $wpdb->remove_placeholder_escape( $sql );
|
$sql = $wpdb->remove_placeholder_escape( $sql );
|
||||||
|
|
||||||
$key = md5( serialize( $cache_args ) . serialize( $taxonomies ) . $sql );
|
$key = md5( serialize( $cache_args ) . $sql );
|
||||||
$last_changed = wp_cache_get_last_changed( 'terms' );
|
$last_changed = wp_cache_get_last_changed( 'terms' );
|
||||||
return "get_terms:$key:$last_changed";
|
return "get_terms:$key:$last_changed";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.7-alpha-59027';
|
$wp_version = '6.7-alpha-59028';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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…
Reference in New Issue