WordPress.org

Make WordPress Core

Changeset 9125


Ignore:
Timestamp:
10/12/2008 08:19:56 AM (10 years ago)
Author:
westi
Message:

Fix regression in get_tag_template(). Tag templates are referenced by tag name not id. Fixes #7865.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r9087 r9125  
    587587 * Retrieve path of tag template in current or parent template.
    588588 *
    589  * Works by retrieving the current tag ID, for example 'tag-1.php' and will
    590  * fallback to tag.php template, if the ID tag file doesn't exist.
     589 * Works by retrieving the current tag name, for example 'tag-wordpress.php' and will
     590 * fallback to tag.php template, if the name tag file doesn't exist.
    591591 *
    592592 * @since 2.3.0
     
    596596 */
    597597function get_tag_template() {
    598     $template = locate_template(array("tag-" . absint( get_query_var('tag') ) . '.php', 'tag.php'));
     598    $template = locate_template(array("tag-" . get_query_var('tag') . '.php', 'tag.php'));
    599599    return apply_filters('tag_template', $template);
    600600}
Note: See TracChangeset for help on using the changeset viewer.