[buddypress-trac] [BuddyPress] #3622: bp_get_sitewide_activity_feed_link()

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Sep 25 21:30:21 UTC 2011


#3622: bp_get_sitewide_activity_feed_link()
-------------------------------------+--------------------
 Reporter:  webraket                 |       Owner:
     Type:  defect                   |      Status:  new
 Priority:  normal                   |   Milestone:  1.5.1
Component:  Activity                 |     Version:  1.5
 Severity:  major                    |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------
Changes (by webraket):

 * keywords:  has-patch needs-testing reporter-feedback => has-patch needs-
     testing


Comment:

 Replying to [comment:9 boonebgorges]:
 > Sorry, I'd forgotten to attach 3622.02.patch. The more I think about it,
 the more I think it probably won't affect your issue (though it is a
 necessary fix in its own regard).
 >
 > $bp->activity->root_slug is defined in the activity loader class
 https://buddypress.trac.wordpress.org/browser/trunk/bp-activity/bp-
 activity-loader.php#L59; this method is hooked to bp_setup_globals, which
 is run at bp_init with priority 4.
 >
 > > bp_init seems to be hooked to init with priority less then 10, so that
 should make no difference.
 > Nope. It's loaded at 10 (the default priority).
 > http://buddypress.trac.wordpress.org/browser/trunk/bp-core/bp-core-
 hooks.php#L17
 >
 > This probably means: Both bp_init (and thus bp_setup_globals) and your
 Init_BP_PubSubHubbub are being hooked to 'init' at priority 10. Since they
 have identical priorities, it's a matter of chance on who gets loaded
 first. It must be the case that your function is winning in this case.
 >
 > I suggest defining $this->feed_urls[] inside of a method that is hooked
 to bp_setup_globals.

 You're right, I missed that default priority.
 Then bp_init instead of init, does make a difference (not expected that)
 and should fix my problem.

 But I still don't fully trust bp_init because of the wp_ajax issue.
 (indicates some wordpress core actions are executed before bp_init is
 executed) thus cannot be hooked.

 I aggree bp_setup_globals is the best way to go for now.

 Thanks for your great support, really fast and detailed ;)

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3622#comment:11>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list