Skip to:
Content

bbPress.org

Changeset 3613


Ignore:
Timestamp:
11/16/2011 03:39:15 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Add topic-tag slug to array of available templates in both bbp_get_topic_tag_template() and bbp_get_topic_tag_edit_template(). Fixes #1685. Props ptahdunbar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-compatibility.php

    r3610 r3613  
    768768function bbp_get_topic_tag_template() {
    769769
    770     $tt_id = bbp_get_topic_tag_tax_id();
     770    $tt_slug   = bbp_get_topic_tag_slug();
     771    $tt_id     = bbp_get_topic_tag_tax_id();
    771772    $templates = array(
    772773
    773774        // Single Topic Tag
     775        'taxonomy-'         . $tt_slug . '.php',
     776        'forums/taxonomy-'  . $tt_slug . '.php',
     777        'bbpress/taxonomy-' . $tt_slug . '.php',
     778       
    774779        'taxonomy-'         . $tt_id . '.php',
    775780        'forums/taxonomy-'  . $tt_id . '.php',
     
    798803function bbp_get_topic_tag_edit_template() {
    799804
    800     $tt_id = bbp_get_topic_tag_tax_id();
     805    $tt_slug   = bbp_get_topic_tag_slug();
     806    $tt_id     = bbp_get_topic_tag_tax_id();
    801807    $templates = array(
    802808
    803809        // Single Topic Tag Edit
     810        'taxonomy-'         . $tt_slug . '-edit.php',
     811        'bbpress/taxonomy-' . $tt_slug . '-edit.php',
     812        'forums/taxonomy-'  . $tt_slug . '-edit.php',
     813
    804814        'taxonomy-'         . $tt_id . '-edit.php',
    805815        'bbpress/taxonomy-' . $tt_id . '-edit.php',
     
    807817
    808818        // Single Topic Tag
     819        'taxonomy-'         . $tt_slug . '.php',
     820        'forums/taxonomy-'  . $tt_slug . '.php',
     821        'bbpress/taxonomy-' . $tt_slug . '.php',
     822       
    809823        'taxonomy-'         . $tt_id . '.php',
    810824        'forums/taxonomy-'  . $tt_id . '.php',
     
    898912        elseif ( bbp_is_single_view()      && ( $new_template = bbp_get_single_view_template()      ) ) :
    899913
    900         // Topic edit
     914        // Forum edit
    901915        elseif ( bbp_is_forum_edit()       && ( $new_template = bbp_get_forum_edit_template()       ) ) :
    902916
Note: See TracChangeset for help on using the changeset viewer.