Now, why didn't that work for me before?<div><br></div><div>I probably had a brain fart, and tried to use 'wp_enqueue_styles' instead of 'wp_enqueue_scripts'.</div><div><br></div><div>So, yeah: what Otto said. :)</div>
<div><br></div><div>Here would be the correct function:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>function oenology_enqueue_comment_reply() {</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { </div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>wp_enqueue_script( 'comment-reply' ); </div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>}</div><div>add_action( 'wp_enqueue_scripts', 'oenology_enqueue_comment_reply' );</div></div></blockquote><div><br></div><div>Chip<br>
<br><div class="gmail_quote">On Thu, Apr 21, 2011 at 2:21 PM, Otto <span dir="ltr"><<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.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 Thu, Apr 21, 2011 at 1:44 PM, Chip Bennett <<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>> wrote:<br>
</div><div class="im">> Most Themes drop the wp_enqueue_script( 'comment-reply' ) code directly into<br>
> the document head, but it *can* be hooked into wp_head, if given the correct<br>
> priority.<br>
> I *think* wp_enqueue_styles fires at priority 1 in wp_head. Regardless,<br>
> passing priority 0 to the enqueue function *does* work. e.g.:<br>
<br>
</div>There is no "wp_enqueue_styles". There is wp_enqueue_scripts, and you<br>
should hook it to that action, for future proofing.<br>
<br>
add_action( 'wp_enqueue_scripts', 'oenology_enqueue_comment_reply' );<br>
<br>
The wp_enqueue_scripts action runs from the wp_enqueue_scripts<br>
function, which itself is hooked to wp_head with priority 1. This<br>
makes enqueueing happen before script output does later. The reason<br>
for this future-proofing is because of the existence of the<br>
wp_enqueue_scripts() function itself, which may not always just be<br>
calling an action hook like it does now.<br>
<br>
*Always* enqueue scripts on the wp_enqueue_scripts action. That's what<br>
it's there for.<br>
<font color="#888888"><br>
-Otto<br>
</font><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>