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
This commit is contained in:
parent
2ea00f0380
commit
270555de54
|
@ -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 ] ) )
|
||||
|
|
Loading…
Reference in New Issue