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
This commit is contained in:
Peter Westwood 2008-10-12 08:19:56 +00:00
parent 8b7e31f8ce
commit 7abc98a62d
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}