[wp-hackers] Script Hooks Order
otto at ottodestruct.com
Sat Mar 28 20:24:19 GMT 2009
A particular plugin may want to modify the scripts before they get
output by the general hook, so the suffix first makes more sense.
Sent from: Memphis Tennessee United States.
On Fri, Mar 27, 2009 at 10:23 AM, scribu <scribu at gmail.com> wrote:
> This is the order in which hooks are currently called in admin-header.php:
> do_action('admin_enqueue_scripts', $hook_suffix);
> Wouldn't it make more sense first to call the general hooks, and then the
> ones with $hook_suffix ? I was trying to add some inly jQuery to a
> particular page and got the "jQuery is not defined" error because jquery was
> added bellow my script.
> I realize now that I could have just used "admin_head-$hook_suffix" instead
> of "admin_print_scripts-$hook_suffix", but is there any reason for adding
> particular scripts and styles before general styles?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers