Relocate get_post_tags.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-04-06 18:22:54 +00:00
parent 142582999e
commit 9e6ab0a59d
2 changed files with 11 additions and 11 deletions

View File

@ -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 )

View File

@ -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;