Clean up taxonomy queries in WP_Query. See #12891

git-svn-id: https://develop.svn.wordpress.org/trunk@15613 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-09-13 16:44:14 +00:00
parent 3e1de4ae9a
commit 5c95616ce8
4 changed files with 210 additions and 188 deletions

View File

@@ -807,8 +807,11 @@ function get_category_template() {
* @return string
*/
function get_tag_template() {
$tag_id = absint( get_query_var('tag_id') );
$tag_name = get_query_var('tag');
global $wp_query;
$tag = $wp_query->get_queried_object();
$tag_name = $tag->slug;
$tag_id = $tag->term_id;
$templates = array();