[buddypress-trac] [BuddyPress] #2473: Changing priority of bp_init and introducing bp_loaded causing issues with existing issues
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Jun 28 07:40:46 UTC 2010
#2473: Changing priority of bp_init and introducing bp_loaded causing issues with
existing issues
----------------------+-----------------------------------------------------
Reporter: sbrajesh | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.2.6
Component: Core | Keywords:
----------------------+-----------------------------------------------------
hi JJJ,
You remember you had introduce bp_init as the future proof hook in
buddypress 1.2.
As I see now, a new hook bp_loaded is introduced and in the favor of
bp_loaded the "setup_root_component" is now not called with plugins_loaded
but with bp_loaded action.
It is causing issues when an existing plugin uses bp_init hook and adds
the navigation item.
The problem is "bp_core_new_nav_item" checks for the root component, but
the root component will not be populated until "bp_setup_root_components"
action executes, so an error is generated as passing null instead of array
on bp-core.php line 315.
The problem is, if it is kept as it is now, It is going to break almost
all buddypress plugins which used "bp_init" action to create new nav
items.
Rather than resolving this issue,I am more interested in hearing form a
core developer about any future proof way to create new plugins and not
break them with every Buddypress release. As of buddypress 1.2, "bp_init"
was introduced as the future proof way but it no more seems to be of any
effect other than being used for loading the plugins and making it
buddypress aware and why would anyone need it anymore if the bp_loaded
action is available ?
Thanks
Brajesh
--
Ticket URL: <https://trac.buddypress.org/ticket/2473>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list