From e0f44cba0c9cc1a7c0e224d0a5fbbc4da356f164 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 1 Jul 2008 15:54:58 +0000 Subject: [PATCH] Account for term exclusion filter when creating cache key. Props filosofo. fixes #7213 git-svn-id: https://develop.svn.wordpress.org/trunk@8225 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/taxonomy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 59b98047e2..45391454f5 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -601,7 +601,8 @@ function &get_terms($taxonomies, $args = '') { } // $args can be whatever, only use the args defined in defaults to compute the key - $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) ); + $filter_key = ( has_filter('list_terms_exclusions') ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; + $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); if ( $cache = wp_cache_get( 'get_terms', 'terms' ) ) { if ( isset( $cache[ $key ] ) )