Skip to:
Content

BuddyPress.org

Changeset 13322


Ignore:
Timestamp:
09/07/2022 10:56:38 PM (2 years ago)
Author:
imath
Message:

Only filter pages/menu list CSS classes on the root blog

To make sure a pages list or a menu highlight the current BuddyPress page or the parent/ancestor of a displayed component' single item, we use a filter that should only run on the WordPress site BuddyPress is activated. Taking this precaution will save our users from potential warning notices that were brought to our attention when BuddyPress is network activated.

Props robinwpdeveloper, martinutopia, DJPaul, rudlinkon

Closes https://github.com/buddypress/buddypress/pull/22
Fixes #7308

File:
1 edited

Legend:

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

    r13167 r13322  
    169169 */
    170170function bp_core_menu_highlight_parent_page( $retval, $page ) {
    171     if ( ! is_buddypress() ) {
     171    if ( ! is_buddypress() || ! bp_is_root_blog() ) {
    172172        return $retval;
    173173    }
Note: See TracChangeset for help on using the changeset viewer.