Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/01/2010 06:07:32 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Fixes #1321. Also add checks to topic_id and forum_id functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-templatetags.php

    r2583 r2586  
    141141            $bbp_forum_id = $wp_query->post->ID;
    142142
     143        // Currently viewing a topic
     144        elseif ( bbp_is_topic() )
     145            $bbp_forum_id = bbp_get_topic_forum_id();
     146
    143147        // Fallback
    144148        // @todo - experiment
     
    179183     */
    180184    function bbp_get_forum_permalink ( $forum_id = 0 ) {
     185        if ( empty( $forum_id ) )
     186            $forum_id = bbp_get_forum_id();
     187
    181188        return apply_filters( 'bbp_get_forum_permalink', get_permalink( $forum_id ) );
    182189    }
     
    533540        elseif ( bbp_is_topic() && isset( $wp_query->post->ID ) )
    534541            $bbp_topic_id = $wp_query->post->ID;
     542
     543        // Currently viewing a singular reply
     544        elseif ( bbp_is_reply() )
     545            $bbp_topic_id = bbp_get_reply_topic_id();
    535546
    536547        // Fallback
Note: See TracChangeset for help on using the changeset viewer.