Remove busted get_tags cache. get_terms does the caching for us. Props josephscott
git-svn-id: http://svn.automattic.com/wordpress/trunk@6651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1fde397d5b
commit
2d656cdb15
|
@ -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