Skip to:
Content

bbPress.org

Changeset 3643


Ignore:
Timestamp:
12/01/2011 11:35:37 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Add topic-tag checks to bbp_body_class(). Fixes #1696. Props sorich87.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-common-template.php

    r3607 r3643  
    601601 * @uses bbp_is_favorites()
    602602 * @uses bbp_is_topics_created()
     603 * @uses bbp_is_forum_archive()
     604 * @uses bbp_is_topic_archive()
     605 * @uses bbp_is_topic_tag()
     606 * @uses bbp_is_topic_tag_edit()
     607 * @uses bbp_get_topic_tag_tax_id()
     608 * @uses bbp_get_topic_tag_slug()
     609 * @uses bbp_get_topic_tag_id()
    603610 * @return array Body Classes
    604611 */
     
    614621    if ( bbp_is_topic_archive() )
    615622        $bbp_classes[] = bbp_get_topic_post_type() . '-archive';
     623
     624    /** Topic Tags ************************************************************/
     625
     626    if ( bbp_is_topic_tag() ) {
     627        $bbp_classes[] = bbp_get_topic_tag_tax_id();
     628        $bbp_classes[] = bbp_get_topic_tag_tax_id() . '-' . bbp_get_topic_tag_slug();
     629        $bbp_classes[] = bbp_get_topic_tag_tax_id() . '-' . bbp_get_topic_tag_id();
     630    }
     631
     632    if ( bbp_is_topic_tag_edit() ) {
     633        $bbp_classes[] = bbp_get_topic_tag_tax_id() . '-edit';
     634        $bbp_classes[] = bbp_get_topic_tag_tax_id() . '-' . bbp_get_topic_tag_slug() . '-edit';
     635        $bbp_classes[] = bbp_get_topic_tag_tax_id() . '-' . bbp_get_topic_tag_id()   . '-edit';
     636    }
    616637
    617638    /** Components ************************************************************/
Note: See TracChangeset for help on using the changeset viewer.