[theme-reviewers] Which one get processed first? print_scripts or enqueue_scripts?

Michael Fields michael at mfields.org
Tue Jan 22 18:30:51 UTC 2013


On Jan 22, 2013, at 10:26 AM, Otto wrote:

> The question itself is slightly confusing, because it kinda depends on
> the purpose...

Beat me to it :) Here's what I was going to write:

My last message illustrates "natural" firing order (if all callbacks are added at a priority of 10), but is a bit misleading. Here's what happens behind the scenes:

1. wp_head fires.
2. wp_enqueue_scripts() is hooked into wp_head at a priority of 1.
3. wp_print_head_scripts() is hooked into wp_head at a priority of 9. wp_print_head_scripts() fires the wp_print_scripts action.
4. All callbacks hooked into the default priority (10) of wp_head fire.



More information about the theme-reviewers mailing list