Abstract object term cache a bit more. see #4189

git-svn-id: https://develop.svn.wordpress.org/trunk@5616 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-05-31 21:38:33 +00:00
parent 46745ee278
commit 0b91f4aaca
3 changed files with 80 additions and 53 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ function get_the_category($id = false) {
if ( !$id )
$id = (int) $post->ID;
$categories = get_post_term_cache($id, 'category');
$categories = get_object_term_cache($id, 'category');
if ( false === $categories )
$categories = get_object_terms($id, 'category');
@@ -418,7 +418,7 @@ function get_the_tags( $id = 0 ) {
if ( !$id )
$id = (int) $post->ID;
$tags = get_post_term_cache($id, 'post_tag');
$tags = get_object_term_cache($id, 'post_tag');
if ( false === $tags )
$tags = get_object_terms($id, 'post_tag');