Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/10/2011 10:27:19 PM (13 years ago)
Author:
johnjamesjacoby
Message:

API adjustments:

  • Refactor _status_ vars into callable functions.
  • Audit usage of $bbp global.
  • Perform get_class() checks on extensions to avoid errors if global $bbp is overloaded.
  • Bump DB version to 175.
File:
1 edited

Legend:

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

    r3472 r3505  
    253253 */
    254254function bbp_is_topic_tag() {
    255     global $bbp;
     255    global $bbp, $wp_query;
    256256
    257257    // Return false if editing a topic tag
     
    259259        return false;
    260260
    261     if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( $bbp->topic_query->is_tax ) )
     261    if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( $bbp->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) )
    262262        return true;
    263263
     
    919919     */
    920920    function bbp_get_dropdown( $args = '' ) {
    921         global $bbp;
    922921
    923922        /** Arguments *********************************************************/
     
    962961
    963962        // Public
    964         $post_stati[] = 'publish';
     963        $post_stati[] = bbp_get_public_status_id();
    965964
    966965        // Forums
     
    969968            // Private forums
    970969            if ( current_user_can( 'read_private_forums' ) )
    971                 $post_stati[] = 'private';
     970                $post_stati[] = bbp_get_private_status_id();
    972971
    973972            // Hidden forums
    974973            if ( current_user_can( 'read_hidden_forums' ) )
    975                 $post_stati[] = $bbp->hidden_status_id;
     974                $post_stati[] = bbp_get_hidden_status_id();
    976975        }
    977976
Note: See TracChangeset for help on using the changeset viewer.