<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body wsmode="reply" text="#000000" bgcolor="#FFFFFF">
I've run up against reviewers who insist that all scripts and
stylesheets MUST be enqueued with a callback - as indeed the
guidelines state. However, the comment reply JS is enqueued without
callback in the header of TwentyTwelve and is considered the
de-facto way to enqueue that.<br>
<br>
So, what is the exception? Is there something in the way that
WordPress loads templates and functionality that obviates the use of
one style over the other?<br>
<br>
Paul Appleyard<br>
<br>
<div class="moz-cite-prefix">On 13/06/2013 1:33 AM, Philip M. Hofer
(Frumph) wrote:<br>
</div>
<blockquote cite="mid:02370A50EAD044E1A3A9C87B1159E673@furious"
type="cite">
<div dir="ltr">
<div style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE:
12pt">
<pre> echo '<!--[if lt IE 9]>';
echo '<![endif]—>';</pre>
<pre> </pre>
<div style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY:
'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT:
normal; TEXT-DECORATION: none">
<div style="FONT: 10pt tahoma">
<div><font face="Calibri" size="3">The above code in your
functions.php will not work right.</font></div>
<div> </div>
<div><font face="Calibri" size="3">There’s no guarantee
that the enqueing of this script will appear in the
position between the echo’s. </font></div>
<div> </div>
<div><font face="Calibri" size="3">However, you could do
something like:</font></div>
<div> </div>
<pre class="default prettyprint prettyprinted"><code><span class="kwd"><font style="FONT-SIZE: 12pt">global</font></span><font style="FONT-SIZE: 12pt"><span class="pln"> $is_IE</span><span class="pun">;</span><span class="pln">
</span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln"> $is_IE </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
wp_enqueue_script('ie7style', get_template_directory_uri() . '/js/html5.js');</span></font></code></pre>
<pre class="default prettyprint prettyprinted"><code><font style="FONT-SIZE: 12pt"><span class="pln"></span><span class="pln"></span></font><span class="pun"><font style="FONT-SIZE: 12pt">}</font></span></code></pre>
<div><font face="Calibri" size="3">which then you wouldn’t
need directives, but it would hit all IE browsers, if
that’s fine with you – and this would be the most
appropriate way of handling this situation</font></div>
<div> </div>
<div> </div>
<div> </div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a
moz-do-not-send="true"
title="support@d5creation.com"
href="mailto:support@d5creation.com">D5 Creation
Support</a> </div>
<div><b>Sent:</b> Wednesday, June 12, 2013 8:21 AM</div>
<div><b>To:</b> <a moz-do-not-send="true"
title="theme-reviewers@lists.wordpress.org"
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a>
</div>
<div><b>Subject:</b> [theme-reviewers] html5.js
enqueuing</div>
</div>
</div>
<div> </div>
</div>
<div style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY:
'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT:
normal; TEXT-DECORATION: none">
<div>Dear Reviewers,</div>
<div> </div>
<div>Greetings from D5 Creation!</div>
<div> </div>
Please find the following Tickets first:
<div><br>
<a moz-do-not-send="true"
href="http://themes.trac.wordpress.org/ticket/12433">http://themes.trac.wordpress.org/ticket/12433</a></div>
<div> </div>
<div><a moz-do-not-send="true"
href="http://themes.trac.wordpress.org/ticket/10354">http://themes.trac.wordpress.org/ticket/10354</a></div>
<div> </div>
<div>One of our Themes named Easy was not approved today.
One of the 2 required issues is enqueuing the html5.js
from functions.php via callback function. The reviewer
advised to do hard coding the html5.js from header.php as
Twenty Twelve does.</div>
<div> </div>
<div>Our another Theme Design was not approved due to hard
coding the html5.js from header.php rather than enqueuing.
</div>
<div> </div>
<div>Which reviewer is correct? JavaScripts are required to
enqueu via callback function as per the guideline. </div>
<div> </div>
<div> </div>
<div>Thanks</div>
<div> </div>
<div>D5 Creation Team </div>
<p>
</p>
<hr>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
theme-reviewers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a>
<a class="moz-txt-link-freetext" href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
</blockquote>
<br>
</body>
</html>