[wp-hackers] Prioritizing Function Hooks
mihai.chereji at gmail.com
Wed Dec 7 15:56:12 UTC 2011
On Wed 07 Dec 2011 05:47:35 PM EET, Alison Foxall wrote:
> Hey All,
> I'm just starting out developing plugins and such had a question. How would
> you prioritize a function hook when the particular hook is used by multiple
> plugins? e.g.
> Plugin One:
> add_action ("pre_user_query", "plugin_one_pre_user_query");
> Plugin Two:
> add_action ("pre_user_query", "plugin_two_pre_user_query");
> Thanks in advance!
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
As the Codex states
accepts a 3rd optional parameter, called $priority, which defaults to
Perhaps counter-intuitively, the lower you set your priority, the
earlier the action will be triggered.
-- Mihai Chereji
More information about the wp-hackers