Display tag name, not slug, in title. Props ionfish. fixes #4812

git-svn-id: http://svn.automattic.com/wordpress/trunk@5945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-08-26 17:18:00 +00:00
parent 86932908e3
commit e80177b92b

View File

@ -186,15 +186,15 @@ function wp_title($sep = '»', $display = true) {
else
$category_name = $category_name[count($category_name)-2]; // there was a trailling slash
}
$cat = get_term_by('slug', $category_name, 'category');
$cat = get_term_by('slug', $category_name, 'category', OBJECT, 'display');
if ( $cat )
$title = apply_filters('single_cat_title', $cat->name);
}
if ( !empty($tag) ) {
$tag = get_term($tag, 'post_tag');
$tag = get_term($tag, 'post_tag', OBJECT, 'display');
if ( ! empty($tag->name) )
$title = apply_filters('single_tag_title', $tag->slug);
$title = apply_filters('single_tag_title', $tag->name);
}
// If there's an author