[buddypress-trac] [BuddyPress Trac] #7308: Make function "bp_core_menu_highlight_parent_page" multisite-aware
buddypress-trac
noreply at wordpress.org
Thu Oct 27 10:07:36 UTC 2016
#7308: Make function "bp_core_menu_highlight_parent_page" multisite-aware
--------------------------+-----------------------------
Reporter: martinutopia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 2.7
Severity: normal | Keywords:
--------------------------+-----------------------------
In my WP-multisite I want to loop over posts in a WP-Menu of my main site
that is no buddypress-Site. So I'm using switch_to_blog() to get the data
from my main site.
I get an error in the file buddypress/bp-core/bp-core-filters.php on line
199 that the second parameter of in_array is not an array. (it's null
because the get_post() on line 198 returns null)
My suggested fix is to test if we are in a switch_to_blogs context. For
that I suggest following fix on line 171 (add a check of
ms_is_switched()):
{{{#!php
if ( ! is_buddypress() || ms_is_switched() )
}}}
Thanks,
Martin
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7308>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list