Fix notice
git-svn-id: https://develop.svn.wordpress.org/trunk@9893 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ca8f88dd82
commit
30b38c9d39
|
@ -127,7 +127,7 @@ function get_the_category( $id = false ) {
|
||||||
$categories = get_object_term_cache( $id, 'category' );
|
$categories = get_object_term_cache( $id, 'category' );
|
||||||
if ( false === $categories ) {
|
if ( false === $categories ) {
|
||||||
$categories = wp_get_object_terms( $id, 'category' );
|
$categories = wp_get_object_terms( $id, 'category' );
|
||||||
wp_cache_add($post->ID, $categories, 'category_relationships');
|
wp_cache_add($id, $categories, 'category_relationships');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty( $categories ) )
|
if ( !empty( $categories ) )
|
||||||
|
|
Loading…
Reference in New Issue