Hmm... I'm completely unfamiliar with the template_redirect hook - and, I thought enqueueing scripts was one of the uses of wp_head()? (Learning something new every day, I guess!)<div><br></div><div>So, should I recommend hooking into template_redirect(), or wp_footer() - or either, or both?</div>
<div><br></div><div>Chip<br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 9:53 AM, Austin Matzko <span dir="ltr"><<a href="mailto:austin@pressedcode.com">austin@pressedcode.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, Sep 15, 2010 at 9:49 AM, Chip Bennett <<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>> wrote:<br>
> For the Theme in question, it's wrapped in the usual conditionals (e.g. if (<br>
> is_singular() && get_option( 'thread_comments' ) ) ). It's just not hooked<br>
> into anything. I'll make the suggestion to hook into wp_head().<br>
<br>
</div>Actually the wp_head event action hook is too late to enqueue a<br>
script, if you want it in the header (as opposed to the footer).<br>
That's because the enqueued scripts are printed during wp_head with<br>
priority 1. So a call to wp_enqueue_script in a function that's a<br>
callback on wp_head will come too late.<br>
<br>
A better place would be the template_redirect action hook.<br>
<div><div></div><div class="h5">_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br></div>