<font color="#333333"><font><font face="arial,helvetica,sans-serif">Sorry, but that's incorrect. It's plugins responsibility to check whether Theme uses jQuery or not and if it does plugin will usually not load anything, that's proper way of doing this. And as far as the importance, well no, if Theme is using an additional stylesheets it needs to be enqueued as well. Kindly see: </font></font></font><font color="#333333" face="arial, helvetica, sans-serif"><a href="http://codex.wordpress.org/Theme_Review#Including_Stylesheets_and_Scripts">http://codex.wordpress.org/Theme_Review#Including_Stylesheets_and_Scripts</a></font><div>
<font color="#333333" face="arial, helvetica, sans-serif"><br></font></div><div><ul style="margin:0px 0px 22px 16px;padding:0px;list-style:square;font-family:sans-serif;font-size:13px;line-height:22px;background-color:rgb(255,255,255)">
<li style="text-align:left!important;margin:0px;padding:0px">Themes are <b>required</b> to enqueue all stylesheets and scripts, using <tt><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_style" title="Function Reference/wp enqueue style" style="text-decoration:none;color:rgb(76,166,207)">wp_enqueue_style()</a></tt>/<tt><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" title="Function Reference/wp enqueue script" style="text-decoration:none;color:rgb(76,166,207)">wp_enqueue_script()</a></tt>, and hooked into an appropriate hook via callback function, rather than hard-coding stylesheet/script links or tags in the template.<ul style="margin:0px 0px 22px 16px;padding:0px;list-style:square">
<li style="text-align:left!important;margin:0px;padding:0px">Themes are <b>required</b> to use the Theme-specific hook for admin-enqueued scripts/stylesheets, e.g. admin_print_scripts-appearance_page_$menu_slug</li><li style="text-align:left!important;margin:0px;padding:0px">
Themes are <b>recommended</b> to hook stylesheet and script enqueue callbacks into `wp_enqueue_scripts`</li><li style="text-align:left!important;margin:0px;padding:0px">Themes may <b>optionally</b> link the default stylesheet (<tt>style.css</tt>) directly in the document head, or via<tt>wp_enqueue_style()</tt></li>
</ul></li><li style="text-align:left!important;margin:0px;padding:0px">Themes are <b>required</b> to use core-bundled scripts, if using such scripts</li></ul><div><font color="#333333"><font><font face="arial,helvetica,sans-serif"><br>
</font></font></font></div><div><font color="#333333"><font><font face="arial,helvetica,sans-serif">and this is for WPORG Themes only :)</font></font></font></div><div><font color="#333333"><font><font face="arial,helvetica,sans-serif"><br>
</font></font></font></div><div><font color="#333333"><font><font face="arial,helvetica,sans-serif">Emil<br></font></font></font><br><div class="gmail_quote">On Wed, Aug 1, 2012 at 3:01 AM, Fahd Murtaza <span dir="ltr"><<a href="mailto:fahdim@gmail.com" target="_blank">fahdim@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Wayne<br>
<br>
This is important. For example you want to include jQuery or you are<br>
writing a theme that includes jQuery in it, then you should use<br>
usingwp_enqueue_style()/wp_enqueue_script() to ensure that your code<br>
is compatible with any future wordpress plugins that you use.<br>
<br>
These functions ensure that if there are two wp_enqueue_script()<br>
used for same script twice or more, wordpress is smart enough to add<br>
them only once. I have found the wp_enqueue_script() to be more<br>
useful than the wp_enqueue_style() as plugins can load additional<br>
scripts, which might conflict with what you're adding in your theme.<br>
<br>
For example, think of a plugin adding a different version of jQuery or<br>
even worse, adding it twice.<br>
<br>
Regards<br>
Fahd Murtaza<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">Fahd Murtaza<br>
<a href="tel:%2B96893678199" value="+96893678199">+96893678199</a><br>
<a href="http://www.fahdmurtaza.com" target="_blank">www.fahdmurtaza.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Wed, Aug 1, 2012 at 11:43 AM, CONNOR Wayne and Jill <<a href="mailto:wayne@dubbo.org">wayne@dubbo.org</a>> wrote:<br>
><br>
> I got this comment on last submission of my slidingdoor theme:<br>
><br>
> Themes are REQUIRED to enqueue all stylesheets and scripts, usingwp_enqueue_style()/wp_enqueue_script(), and hooked into an appropriate hook via callback function, rather than hard-coding stylesheet/script links or tags in the template.<br>
><br>
><br>
> I've been to <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" target="_blank">http://codex.wordpress.org/Function_Reference/wp_enqueue_script</a> and I don't actually understand what it's saying. I don't want to get my head around it if I don't have to!<br>
><br>
><br>
> Is it talking about my inclusion of say mootools in my header.php?<br>
><br>
> <script type="text/javascript" src="<?php echo $url; ?>/imagemenu/mootools.js"></script><br>
><br>
> Do I need to do this differently?<br>
><br>
><br>
><br>
> It does say on the function reference page "The safe and recommended method of adding JavaScript to a WordPress generated page is by using wp_enqueue_script(). "<br>
><br>
> 'recommended' is not 'you must'.<br>
><br>
> I've checked out the twentyeleven theme and it has this in header:<br>
><br>
> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /><br>
><br>
> that seems to be a direct including of a stylesheet not using wp_enque_style.<br>
><br>
> So some guidance would be appreciated.<br>
><br>
> Thanks,<br>
> Wayne<br>
><br>
><br>
><br>
><br>
</div></div><div class="HOEnZb"><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>
><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>
</div></div></blockquote></div><br></div></div>