mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user