mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
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:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user