Skip to:
Content

BuddyPress.org

Changeset 11099


Ignore:
Timestamp:
09/13/2016 10:09:52 PM (8 years ago)
Author:
r-a-y
Message:

Core: Fix conditional logic when preventing WP's main query on single BuddyPress pages.

This commit correctly uses the conditional as recommended in the original
patch. (See r11007.)

See #7120

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-catchuri.php

    r11007 r11099  
    10361036    /*
    10371037     * If not on a BP single page, bail.
    1038      * It's too early to use bp_is_single_item() here.
    1039      */
    1040     if ( ! bp_is_group() || ! bp_is_user() || ! bp_is_single_activity() ) {
     1038     * Too early to use bp_is_single_item(), so use BP conditionals.
     1039     */
     1040    if ( false === ( bp_is_group() || bp_is_user() || bp_is_single_activity() ) ) {
    10411041        return $retval;
    10421042    }
    10431043
     1044    // Set default properties as recommended in the 'posts_pre_query' DocBlock.
    10441045    $query->found_posts   = 0;
    10451046    $query->max_num_pages = 0;
Note: See TracChangeset for help on using the changeset viewer.