Wait: you want to enqueue a *style* at 'wp_enqueue_scripts'? 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"><<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 Fri, Jun 3, 2011 at 5:48 AM, Vicky Arulsingam<br>
<<a href="mailto:vicky.arulsingam@gmail.com">vicky.arulsingam@gmail.com</a>> wrote:<br>
>> I see a few issues:<br>
>> 1) Styles should be enqueued and *hooked* in; front-end styles should be<br>
>> hooked into 'wp_print_styles'.<br>
><br>
> I've seen a number of themes that use wp_enqueue_style() / wp_enqueue_script<br>
> within the header.php. I'll be sure to distinguish between wp_print_style<br>
> 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('wp_enqueue_scripts','my_enqueue_stuff');<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>