summaryrefslogtreecommitdiffstats
path: root/wp-includes/taxonomy.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/taxonomy.php')
-rw-r--r--wp-includes/taxonomy.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
index ad2614a..cc16a61 100644
--- a/wp-includes/taxonomy.php
+++ b/wp-includes/taxonomy.php
@@ -580,7 +580,9 @@ function &get_terms($taxonomies, $args = '') {
return $empty_array;
}
- $key = md5( serialize( $args ) . serialize( $taxonomies ) );
+ // $args can be whatever, only use the args defined in defaults to compute the key
+ $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) );
+
if ( $cache = wp_cache_get( 'get_terms', 'terms' ) ) {
if ( isset( $cache[ $key ] ) )
return apply_filters('get_terms', $cache[$key], $taxonomies, $args);