mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Relocate get_post_tags.
git-svn-id: http://svn.automattic.com/wordpress/trunk@5197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
142582999e
commit
9e6ab0a59d
@ -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