From 8974a2bb33fc82132bec85fae39470f85464bef9 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 3 Oct 2015 21:07:01 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@34811 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/taxonomy-functions.php b/src/wp-includes/taxonomy-functions.php index 0692f6b833..8de369c2db 100644 --- a/src/wp-includes/taxonomy-functions.php +++ b/src/wp-includes/taxonomy-functions.php @@ -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;