Skip to:
Content

BuddyPress.org

Changeset 13846


Ignore:
Timestamp:
05/02/2024 12:57:13 PM (6 months ago)
Author:
imath
Message:

Only parse the WP Query when needed.

On multisite configs, we don't need to parse the WP Query when loading any other site than the BP root's one.

Props r-a-y, boonebgorges

See #9139 (trunk)

File:
1 edited

Legend:

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

    r13818 r13846  
    551551 */
    552552function bp_parse_query( $posts_query ) {
     553    // Only run on the root site or if multiblog mode is on.
     554    if ( ! bp_is_root_blog() && ! bp_is_multiblog_mode() ) {
     555        return;
     556    }
    553557
    554558    // Bail if $posts_query is not the main loop.
Note: See TracChangeset for help on using the changeset viewer.