bp_parse_query( WP_Query $posts_query )

Add checks for BuddyPress conditions to ‘parse_query’ action.

Description

Parameters

$posts_query

(Required) WP_Query object.

Source

File: bp-core/bp-core-template-loader.php

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
    }
 
    // Bail if filters are suppressed on this query.
    if ( true == $posts_query->get( 'suppress_filters' ) ) {
        return;
    }
 
    // Bail if in admin.
    if ( is_admin() ) {
        return;
    }
 
    /**
     * Fires at the end of the bp_parse_query function.
     *
     * Allow BuddyPress components to parse the main query.
     *
     * @since BuddyPress 1.7.0
     *
     * @param WP_Query $posts_query WP_Query instance. Passed by reference.
     */
    do_action_ref_array( 'bp_parse_query', array( &$posts_query ) );
}
 
/**
 * Possibly intercept the template being loaded.
 *
 * Listens to the 'template_include' filter and waits for any BuddyPress specific

Changelog

Changelog
Version Description
BuddyPress 1.7.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.