Add get_terms() and get_term(). Move more of tagging to taxonomy. see #4189

git-svn-id: https://develop.svn.wordpress.org/trunk@5521 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-05-23 03:57:20 +00:00
parent 759b2afb2a
commit 0bc2a4b956
5 changed files with 137 additions and 84 deletions
+7
View File
@@ -160,6 +160,7 @@ function wp_title($sep = '»', $display = true) {
global $wpdb, $wp_locale, $wp_query;
$cat = get_query_var('cat');
$tag = get_query_var('tag_id');
$p = get_query_var('p');
$name = get_query_var('name');
$category_name = get_query_var('category_name');
@@ -188,6 +189,12 @@ function wp_title($sep = '»', $display = true) {
$title = apply_filters('single_cat_title', $title);
}
if ( !empty($tag) ) {
$tag = get_term($tag, 'post_tag');
if ( ! empty($tag->name) )
$title = apply_filters('single_tag_title', $tag->slug);
}
// If there's an author
if ( !empty($author) ) {
$title = get_userdata($author);