Remove busted get_tags cache. get_terms does the caching for us. Props josephscott
git-svn-id: https://develop.svn.wordpress.org/trunk@6651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5c9413d4f1
commit
9c01b969a2
@ -127,19 +127,12 @@ function sanitize_category_field($field, $value, $cat_id, $context) {
|
||||
// Tags
|
||||
|
||||
function &get_tags($args = '') {
|
||||
$key = md5( serialize( $args ) );
|
||||
if ( $cache = wp_cache_get( 'get_tags', 'category' ) )
|
||||
if ( isset( $cache[ $key ] ) )
|
||||
return apply_filters('get_tags', $cache[$key], $args);
|
||||
|
||||
|
||||
$tags = get_terms('post_tag', $args);
|
||||
|
||||
if ( empty($tags) )
|
||||
return array();
|
||||
|
||||
$cache[ $key ] = $tags;
|
||||
wp_cache_set( 'get_tags', $cache, 'category' );
|
||||
|
||||
$tags = apply_filters('get_tags', $tags, $args);
|
||||
return $tags;
|
||||
|
Loading…
Reference in New Issue
Block a user