[buddypress-trac] [BuddyPress] #3625: Core functions should not hook to bp_init with default priority
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Sep 26 21:06:38 UTC 2011
#3625: Core functions should not hook to bp_init with default priority
-------------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.6
Component: Core | Version: 1.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------
Comment (by boonebgorges):
> Sorry but your patch doesn't fixes the problem.
You may be right. I wasn't able to reproduce the problem in the first
place, so I was kinda guessing.
> Lowering the priority from the bp_core_add_ajax_hook() function that
calls do_action('wp_ajax_') from 10 to 8 only makes it worse.
I don't understand how it could "make it worse". I guess I assumed that
the problem was that, by hooking to bp_init with priority 10, you were
sometimes attempting to hook to wp_ajax_ before BP was there to listen for
the hooks. Moving the priority up would mean that the wp_ajax_ hook
mechanism would be in place by the time you tried adding your own stuff at
bp_init:10. It's possible that I'm misdiagnosing the issue, but in any
case I don't know how it would make it worse, since it either works or it
doesn't work - there's not really room for "better" or "worse" here.
If you have ideas about how this issue could be solved in a broader way, I
would welcome a patch.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3625#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list