[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
Wed Aug 13 19:56:31 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 commit  |
------------------------------+------------------

Comment (by r-a-y):

 In [changeset:"8830"]:
 {{{
 #!CommitTicketReference repository="" revision="8830"
 Fix `bp_is_current_component_core()` to reference BP core components.

 `bp_is_current_component_core()` is a function that is meant to check
 whether the current component is a BP bundled core component.  This is
 done
 by grabbing `bp_get_option( 'bp-active-components' )`, which is supposed
 to
 hold only BP core components.  However, if a plugin manually saves its
 component in the `'bp-active-components'` DB option, our function will
 now check this 3rd-party component as well, which is incorrect.

 To address this issue, this commit introduces `bp_core_get_components()`,
 which is a hardcoded array of BP core components, and references this
 function in `bp_is_current_component_core()`.  This ensures that only
 BP core components are checked.

 See #5552.
 }}}

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


More information about the buddypress-trac mailing list