mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Only use the args defined in defaults to compute the cache key in get_terms. Props mdawaffe.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1fdbde921b
commit
3495bf80e0
@ -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