[buddypress-trac] [BuddyPress Trac] #5552: bp_is_current_component_core() breaks subnav for plugins that register themselves in component array
buddypress-trac
noreply at wordpress.org
Tue Aug 12 23:03:14 UTC 2014
#5552: bp_is_current_component_core() breaks subnav for plugins that register
themselves in component array
------------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: highest | Milestone: 2.2
Component: Core | Version:
Severity: major | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------
Comment (by r-a-y):
When I use `5552-plugins.php` in theme compat, the subnav for "Test 3
Parent" does not show up.
`bp_is_current_component_core.patch` follows what I stated in comment:5.
`bp_core_get_components()` is a new function that returns a hardcoded
array of core components. This is a little ugly, but addresses the issue
of the subnav for "Test 3 Parent" not appearing.
> The fact that we are required to load plugins.php in settings.php is a
sign that something is wrong.
`bp_core_load_template( $whatever_is_here )` is for bp-default themes
only.
When theme compat is triggered, theme compatibility correctly loads up
`'members/single/home'` on user pages:
https://buddypress.trac.wordpress.org/browser/tags/2.0.2/bp-members/bp-
members-screens.php#L433
bp-legacy, then, uses `members/single/plugins.php`, which is used as a
[https://buddypress.trac.wordpress.org/browser/tags/2.0.2/bp-templates/bp-
legacy/buddypress/members/single/plugins.php template part].
Whereas for bp-default, plugins.php is a
[https://buddypress.trac.wordpress.org/browser/tags/2.0.2/bp-themes/bp-
default/members/single/plugins.php full page template]. That's why we
call `bp_core_load_template( 'members/single/plugins' )`. In an ideal
world, bp-default's `'members/single/plugins.php'` would be a template
part like bp-legacy, then you could use bp_core_load_template(
'members/single/home' ) instead of bp_core_load_template(
'members/single/plugins' ) in plugins. However, it is what it is I'm
afraid.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5552#comment:9>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list