[theme-reviewers] Hooking wp_enqueue_script( 'comment-reply' ) into wp_head

Edward Caissie edward.caissie at gmail.com
Thu Apr 21 19:32:40 UTC 2011


Could the function be added to the one(s) used with the 'after_setup_theme'
filter?

Perhaps not the most correct as suggested by Otto; I asking more to get a
better understanding of filters and actions which are still elusive at times
for me ...


Cais.

On Thu, Apr 21, 2011 at 3:26 PM, Otto <otto at ottodestruct.com> wrote:

> On Thu, Apr 21, 2011 at 2:07 PM, Chip Bennett <chip at chipbennett.net>
> wrote:
> > ... and we have to hook into the process both
> > *before* wp_enqueue_scripts fires...
>
> Sorry, missed this reply earlier.
>
> Short answer: No, you don't. I can think of no reason to enqueue a
> script before wp_enqueue_scripts fires. The wp_enqueue_scripts is the
> proper time to enqueue a script (and a style too, for that matter).
> That is the only reason it exists at all.
>
> You have to enqueue styles and scripts before wp_print_styles and
> wp_print_head_scripts fire, which are both hooked to wp_head with
> priorities of 8 and 9, respectively. Therefore, enqueuing at
> wp_enqueue_scripts, which has an effective priority of 1, is the
> correct thing to do.
>
> -Otto
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110421/1d0f9b54/attachment.htm>


More information about the theme-reviewers mailing list