From 270555de54daa4518a215af97064f7b62e99797f Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@8225 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 59b98047e..45391454f 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 ] ) )