Make WordPress Core


Ignore:
Timestamp:
05/23/2007 03:57:20 AM (17 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r5450 r5521  
    161161
    162162    $cat = get_query_var('cat');
     163    $tag = get_query_var('tag_id');
    163164    $p = get_query_var('p');
    164165    $name = get_query_var('name');
     
    187188        $title = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'");
    188189        $title = apply_filters('single_cat_title', $title);
     190    }
     191
     192    if ( !empty($tag) ) {
     193        $tag = get_term($tag, 'post_tag');
     194        if ( ! empty($tag->name) )
     195            $title = apply_filters('single_tag_title', $tag->slug);
    189196    }
    190197
Note: See TracChangeset for help on using the changeset viewer.