[theme-reviewers] html5.js enqueuing

Paul Appleyard paul at spacecat.com
Thu Jun 13 05:44:03 UTC 2013


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.

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?

Paul Appleyard

On 13/06/2013 1:33 AM, Philip M. Hofer (Frumph) wrote:
> 	echo '<!--[if lt IE 9]>';
> 	    echo '<![endif]--->';
>   
> The above code in your functions.php will not work right.
> There's no guarantee that the enqueing of this script will appear in 
> the position between the echo's.
> However, you could do something like:
> |global  $is_IE;
> if  (  $is_IE)  {
>      wp_enqueue_script('ie7style', get_template_directory_uri() . '/js/html5.js');|
> |}|
> 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
> *From:* D5 Creation Support <mailto:support at d5creation.com>
> *Sent:* Wednesday, June 12, 2013 8:21 AM
> *To:* theme-reviewers at lists.wordpress.org 
> <mailto:theme-reviewers at lists.wordpress.org>
> *Subject:* [theme-reviewers] html5.js enqueuing
> Dear Reviewers,
> Greetings from D5 Creation!
> Please find the following Tickets first:
>
> http://themes.trac.wordpress.org/ticket/12433
> http://themes.trac.wordpress.org/ticket/10354
> 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.
> Our another Theme Design was not approved due to hard coding the 
> html5.js from header.php rather than enqueuing.
> Which reviewer is correct? JavaScripts are required to enqueu via 
> callback function as per the guideline.
> Thanks
> D5 Creation Team
>
> ------------------------------------------------------------------------
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130613/c226764a/attachment.html>


More information about the theme-reviewers mailing list