[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
Sun Aug 3 18:49:42 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.1
Component:  Core                    |     Version:
 Severity:  major                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------
Changes (by boonebgorges):

 * keywords:   => has-patch dev-feedback
 * milestone:  2.2 => 2.1


Comment:

 5552.patch is my suggested fix. It rolls back the
 `bp_is_current_component_core()` check in r6783 and then implements an
 improved version of my initial suggestion in
 https://buddypress.trac.wordpress.org/ticket/4772#comment:19 Summary:

 - In `bp_core_load_template()`, stash the requested template in the
 buddypress() object for later reference
 - In members/single/home.php, put a check at the top of the big
 if/elseif/elseif block that checks to see whether the requested template
 is 'members/single/plugins'. If it is, then load plugins.php

 This fixes both problematic cases: 1. the original issue described in
 #4772, and 2. the missing subnav described here.

 Note that this does involve a template-level change. For those themes that
 have overridden this template, the bug will persist. But this technique
 won't introduce any new regressions in that kind of theme.

 It's not the most beautiful fix in the world, which is why I'm posting for
 feedback before committing. But I do think that we should go ahead with it
 for 2.1, as the status quo is much worse (and this is an underlying issue
 we can look at more with a template overhaul).

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5552#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list