[buddypress-trac] [BuddyPress] #2325: Changing hooked-to action functions to make new BP hooks work for 3rd-party components

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Jun 28 18:42:07 UTC 2010


#2325: Changing hooked-to action functions to make new BP hooks work for 3rd-party
components
--------------------------------------+-------------------------------------
 Reporter:  jeffsayre                 |        Owner:  johnjamesjacoby
     Type:  defect                    |       Status:  closed         
 Priority:  major                     |    Milestone:  1.3            
Component:  Core                      |   Resolution:  fixed          
 Keywords:  has-patch, needs-testing  |  
--------------------------------------+-------------------------------------

Comment(by jeffsayre):

 The changes to the action hooks work fine now. The only remaining issue is
 to answer Paul's question. In short, what hooks should plugin devs use?

 With the most recent changes, I found that I had to change to which action
 I hooked the privacy loader function. It was hooked to bp_init. But now
 that fires after bp_setup_root_components, bp_setup_globals, and
 bp_setup_nav--three actions to which I've hooked functions. So, I changed
 my loader function to be hooked to bp_include, and all works fine.

 So, we will have to tell plugin devs that the hook to which they tie their
 plugin's loader function will depend on whether they need code loaded
 before bp_setup_root_components, bp_setup_globals, or bp_setup_nav fires.
 If they do not, then they should hook their loader function to bp_init.
 Otherwise, they will have to hook their loader to bp_include.

 THe information ion this Codex article will need updating:
 http://codex.buddypress.org/how-to-guides/make-your-plugin-buddypress-
 aware-v1-2/

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2325#comment:21>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list