Make WordPress Core


Ignore:
Timestamp:
05/16/2008 03:57:09 AM (17 years ago)
Author:
matt
Message:

get_queried_object should not return an array of terms, and wp_title should check is_tax. Hat tip: andy

File:
1 edited

Legend:

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

    r7634 r7941  
    232232        $post = $wp_query->get_queried_object();
    233233        $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) );
     234    }
     235
     236    // If there's a taxonomy
     237    if ( is_tax() ) {
     238        $taxonomy = get_query_var( 'taxonomy' );
     239        $tax = get_taxonomy( $taxonomy );
     240        $tax = $tax->label;
     241        $term = $wp_query->get_queried_object();
     242        $term = $term->name;
     243        if ( 'right' == $seplocation )
     244            $title = "$term $sep $tax";
     245        else
     246            $title = "$tax $sep $term";
    234247    }
    235248
Note: See TracChangeset for help on using the changeset viewer.