Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/24/2011 10:20:13 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Add checks to supplemental topic and reply actions to make sure those actions are only called on those kinds of objects. Also perform sanity check on $argspost_parent? before attempting to unset it in bbp_has_topics()

File:
1 edited

Legend:

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

    r2928 r2933  
    104104        // Remove post_parent from possible assignments
    105105        unset( $default['post_parent'] );
    106         unset( $args['post_parent']    );
     106        if ( isset( $args['post_parent'] ) ) unset( $args['post_parent'] );
    107107
    108108        // Reassign post_parent to current ID
     
    308308        elseif ( ( bbp_is_topic() || bbp_is_topic_edit() ) && isset( $wp_query->post->ID ) )
    309309            $bbp_topic_id = $wp_query->post->ID;
    310 
    311         // Currently viewing a singular reply
    312         elseif ( ( bbp_is_reply() || bbp_is_reply_edit() ) )
    313             $bbp_topic_id = bbp_get_reply_topic_id();
    314310
    315311        // Fallback
Note: See TracChangeset for help on using the changeset viewer.