From 7abc98a62d701e196e1a37fe72ae35f653a15d4c Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 12 Oct 2008 08:19:56 +0000 Subject: [PATCH] Fix regression in get_tag_template(). Tag templates are referenced by tag name not id. Fixes #7865. git-svn-id: https://develop.svn.wordpress.org/trunk@9125 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index e86e9a1569..fc1fe4adcb 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -586,8 +586,8 @@ function get_category_template() { /** * Retrieve path of tag template in current or parent template. * - * Works by retrieving the current tag ID, for example 'tag-1.php' and will - * fallback to tag.php template, if the ID tag file doesn't exist. + * Works by retrieving the current tag name, for example 'tag-wordpress.php' and will + * fallback to tag.php template, if the name tag file doesn't exist. * * @since 2.3.0 * @uses apply_filters() Calls 'tag_template' on file path of tag template. @@ -595,7 +595,7 @@ function get_category_template() { * @return string */ function get_tag_template() { - $template = locate_template(array("tag-" . absint( get_query_var('tag') ) . '.php', 'tag.php')); + $template = locate_template(array("tag-" . get_query_var('tag') . '.php', 'tag.php')); return apply_filters('tag_template', $template); }