mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
86932908e3
commit
e80177b92b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user