Relocate get_post_tags.
git-svn-id: https://develop.svn.wordpress.org/trunk@5197 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
214141d62a
commit
cfb13d7bcf
@ -178,17 +178,6 @@ function the_category($separator = '', $parents='') {
|
||||
echo get_the_category_list($separator, $parents);
|
||||
}
|
||||
|
||||
function get_post_tags( $post_id = 0 ) {
|
||||
global $tag_cache, $blog_id;
|
||||
|
||||
$post_id = (int) $post_id;
|
||||
|
||||
if ( !isset( $tag_cache[$blog_id][$post_id] ) )
|
||||
update_post_category_cache( $post_id ); // loads $tag_cache
|
||||
|
||||
return $tag_cache[$blog_id][$post_id];
|
||||
}
|
||||
|
||||
function get_the_tags( $before, $sep, $after ) {
|
||||
global $post;
|
||||
if ( !$post )
|
||||
|
@ -458,6 +458,17 @@ function wp_get_post_categories($post_id = 0) {
|
||||
return array_unique($cat_ids);
|
||||
}
|
||||
|
||||
function get_post_tags( $post_id = 0 ) {
|
||||
global $tag_cache, $blog_id;
|
||||
|
||||
$post_id = (int) $post_id;
|
||||
|
||||
if ( !isset( $tag_cache[$blog_id][$post_id] ) )
|
||||
update_post_category_cache( $post_id ); // loads $tag_cache
|
||||
|
||||
return $tag_cache[$blog_id][$post_id];
|
||||
}
|
||||
|
||||
function wp_get_recent_posts($num = 10) {
|
||||
global $wpdb;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user