Wait: you want to enqueue a *style* at &#39;wp_enqueue_scripts&#39;? Or was that a typo?<div><br></div><div>Chip<br><br><div class="gmail_quote">On Fri, Jun 3, 2011 at 5:54 AM, Otto <span dir="ltr">&lt;<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>&gt;</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 Fri, Jun 3, 2011 at 5:48 AM, Vicky Arulsingam<br>
&lt;<a href="mailto:vicky.arulsingam@gmail.com">vicky.arulsingam@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I see a few issues:<br>
&gt;&gt; 1) Styles should be enqueued and *hooked* in; front-end styles should be<br>
&gt;&gt; hooked into &#39;wp_print_styles&#39;.<br>
&gt;<br>
&gt; I&#39;ve seen a number of themes that use wp_enqueue_style() / wp_enqueue_script<br>
&gt; within the header.php.  I&#39;ll be sure to distinguish between wp_print_style<br>
&gt; and wp_enqueue_style in future reviews.<br>
<br>
</div>No, enqueueing of styles for the front end of the site should be in a<br>
function hooked to the wp_enqueue_scripts action, *not* to<br>
wp_print_styles.<br>
<br>
Correct way:<br>
<br>
add_action(&#39;wp_enqueue_scripts&#39;,&#39;my_enqueue_stuff&#39;);<br>
function my_enqueue_stuff() {<br>
  wp_enqueue_styles(...);<br>
}<br>
<br>
The reason for this is that wp_print_styles is the last possible<br>
moment to enqueue a style, and so it should be reserved for<br>
*dequeueing* styles instead. Enqueue early, dequeue late.<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>