<font color="#333333"><font><font face="arial,helvetica,sans-serif">Hi Wayne,</font></font></font><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">I would direct this in ticket, -vs asking here, but here it is:</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">Linked codex isn't really up to date and what he/she was referring to ins't Theme's style.css it would be something like this:</font></font></font></div>
<div><br></div><div><pre style="word-wrap:break-word"><font face="courier new, monospace"><span style="white-space:pre-wrap"> /**
* A safe way of adding JavaScripts to a WordPress generated page.
*/
if (!is_admin())
add_action('wp_enqueue_scripts', 'my_theme_js');
if (!function_exists('my_theme_js')) {
function my_theme_js() {
                        // JS at the bottom for faster page loading.
wp_enqueue_script('my_theme-scripts', get_template_directory_uri() . '/js/my_theme-scripts.js', array('jquery'), '1.2.0', true);
                        wp_enqueue_script('my_theme-plugins', get_template_directory_uri() . '/js/my_theme-plugins.js', array('jquery'), '1.1.0', true);
}
}</span></font></pre></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">Thanks,</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 2:43 AM, CONNOR Wayne and Jill <span dir="ltr"><<a href="mailto:wayne@dubbo.org" target="_blank">wayne@dubbo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I got this comment on last submission of my slidingdoor theme:<div><br></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;word-spacing:0px">Themes are REQUIRED to enqueue all stylesheets and scripts, using</span><tt style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;word-spacing:0px">wp_enqueue_style()</tt><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;word-spacing:0px">/</span><tt style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;word-spacing:0px">wp_enqueue_script()</tt><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;word-spacing:0px">, and hooked into an appropriate hook via callback function, rather than hard-coding stylesheet/script links or tags in the template.</span></div>
<div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br>
</span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px">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!</span></font></div>
<div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br>
</span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px">Is it talking about my inclusion of say mootools in my header.php?</span></font></div>
<div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><div>
<script type="text/javascript" src="<?php echo $url; ?>/imagemenu/mootools.js"></script></div><div><br></div></span></font></div><div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px">Do I need to do this differently?</span></font></div>
</div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br>
</span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px">It does say on the function reference page "</span></font><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:left;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:22px;text-transform:none;font-size:13px;white-space:normal;font-family:sans-serif;word-spacing:0px">The safe and recommended method of adding JavaScript to a WordPress generated page is by using </span><code style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:left;font-style:normal;margin-bottom:22px;font-weight:normal;overflow-x:auto;line-height:22px;text-transform:none;font-size:12px;white-space:pre-wrap;font-family:Consolas,Monaco,'Courier New',Courier,monospace;word-wrap:break-word;word-spacing:0px">wp_enqueue_script()</code><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:left;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:22px;text-transform:none;font-size:13px;white-space:normal;font-family:sans-serif;word-spacing:0px">. " </span></div>
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:left;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:22px;text-transform:none;font-size:13px;white-space:normal;font-family:sans-serif;word-spacing:0px"><br>
</span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:left;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:22px;text-transform:none;font-size:13px;white-space:normal;font-family:sans-serif;word-spacing:0px">'recommended' is not 'you must'.</span></div>
<div style="text-align:left"><font face="sans-serif"><span style="font-size:13px;line-height:22px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px">I've checked out the twentyeleven theme and it has this in header:</span></font></div>
<div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><br></span></font></div><div><font face="Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><span style="font-size:13px"><div>
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /></div><div><br></div><div>that seems to be a direct including of a stylesheet not using wp_enque_style.</div>
<div><br></div><div>So some guidance would be appreciated.</div><div><br></div><div>Thanks,</div><div>Wayne</div><div><br></div></span></font><div><br></div><div><br></div></div></div><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>