mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 09:03:09 +01:00
Only use the args defined in defaults to compute the cache key in get_terms. Props mdawaffe.
git-svn-id: https://develop.svn.wordpress.org/trunk@7738 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7f228f1cd6
commit
84a2c7f980
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user