Don't prime term meta cache in `is_object_in_term()`.
Term meta is not necessary in this case, so priming the cache wastes a query. See #10142, #32044. Built from https://develop.svn.wordpress.org/trunk@34811 git-svn-id: http://core.svn.wordpress.org/trunk@34776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1fc5e79c8
commit
5be41d618f
|
@ -4391,7 +4391,7 @@ function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
|
|||
|
||||
$object_terms = get_object_term_cache( $object_id, $taxonomy );
|
||||
if ( false === $object_terms )
|
||||
$object_terms = wp_get_object_terms( $object_id, $taxonomy );
|
||||
$object_terms = wp_get_object_terms( $object_id, $taxonomy, array( 'update_term_meta_cache' => false ) );
|
||||
|
||||
if ( is_wp_error( $object_terms ) )
|
||||
return $object_terms;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34810';
|
||||
$wp_version = '4.4-alpha-34811';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue