I think(?) this is an edge/special-use case, because one hook, wp_enqueue_scripts, fires inside of another hook, wp_head (if I&#39;m understanding things properly), and we have to hook into the process both *before* wp_enqueue_scripts fires, but *after* the query is set up (so that we have access to the query conditional tags).<div>
<br></div><div>Looking at the <a href="http://codex.wordpress.org/Plugin_API/Action_Reference">action hook list</a>, perhaps hooking into get_header or template_redirect would work (if such use would be valid)?<br><div><br>
</div><div>I&#39;m of course open to any better alternatives?</div><div><br></div><div>Chip<br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 1:57 PM, Edward Caissie <span dir="ltr">&lt;<a href="mailto:edward.caissie@gmail.com">edward.caissie@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The only thing that comes to mind is if any add_action requires the highest priority to be used &quot;correctly&quot; then perhaps it should be submitted as a core requirement (optional in settings?) ... just a thought; otherwise your function example looks fine.<br>


<br><br>Cais.<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Thu, Apr 21, 2011 at 2:44 PM, Chip Bennett <span dir="ltr">&lt;<a href="mailto:chip@chipbennett.net" target="_blank">chip@chipbennett.net</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">

One more for today:<div><br></div><div>Most Themes drop the wp_enqueue_script( &#39;comment-reply&#39; ) code directly into the document head, but it *can* be hooked into wp_head, if given the correct priority.</div><div>


<br>
</div><div>I *think* wp_enqueue_styles fires at priority 1 in wp_head. Regardless, passing priority 0 to the enqueue function *does* work. e.g.:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">



<div><div>function oenology_enqueue_comment_reply() {</div><div><span style="white-space:pre-wrap">        </span>if ( is_singular() &amp;&amp; comments_open() &amp;&amp; get_option( &#39;thread_comments&#39; ) ) { </div>
<div><span style="white-space:pre-wrap">                        </span>wp_enqueue_script( &#39;comment-reply&#39; ); </div><div><span style="white-space:pre-wrap">        </span>}</div><div>}</div><div>add_action( &#39;wp_head&#39;, &#39;oenology_enqueue_comment_reply&#39;, 0 );</div>



</div></blockquote><div><br></div><div>Notice that I&#39;ve also added a comments_open() to the conditional.</div><div><br></div><div>Any comments/ideas/suggestions?</div><div><br></div><font color="#888888"><div>Chip</div>



</font><br></div></div>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
<br></blockquote></div><br>
<br>_______________________________________________<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>
<br></blockquote></div><br></div></div>