Just as Justin said.<div><br></div><div>The guidelines refer to script (and stylesheet) *links* in the document head.</div><div><br></div><div>There may be cases where a script can be enqueued inline, but not always. Outside of the document *head* or *footer*, inline scripts (and styles) are not inherently prohibited.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Chip<br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 8:45 PM, Justin Tadlock <span dir="ltr"><<a href="mailto:justin@justintadlock.com" target="_blank">justin@justintadlock.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Yes, inline scripts and styles are allowed. Sometimes, they're
actually needed or a better way to handle something.<div><div class="h5"><br>
<br>
<div>On 8/28/2012 8:33 PM, Vicky Arulsingam
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div>Are theme developers allowed to include inline scripts in
template files?</div>
<div><br>
</div>
<div>As per Code:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><span style="line-height:22px;font-size:13px;font-family:sans-serif">Themes
are </span><b style="line-height:22px;font-size:13px;font-family:sans-serif">required</b><span style="line-height:22px;font-size:13px;font-family:sans-serif"> to
enqueue all stylesheets and scripts, using </span><tt style="line-height:22px;font-size:13px"><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)" target="_blank">wp_enqueue_style()</a></tt><span style="line-height:22px;font-size:13px;font-family:sans-serif">/</span><tt style="line-height:22px;font-size:13px"><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)" target="_blank">wp_enqueue_script()</a></tt><span style="line-height:22px;font-size:13px;font-family:sans-serif">,
and hooked into an appropriate hook via callback function,
rather than hard-coding stylesheet/script links or tags in
the template.</span></div>
</blockquote>
<div><br>
</div>
<div>My understanding of this is that inline scripts should not be
hard-coded in template files. </div>
<div><br>
</div>
<div>This is with regards to this ticket:
<a href="http://themes.trac.wordpress.org/ticket/9227" target="_blank">http://themes.trac.wordpress.org/ticket/9227</a> <br clear="all">
<div><br>
</div>
-----
<div>Vicky Arulsingam</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
theme-reviewers mailing list
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
</blockquote>
<br>
</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>