[theme-reviewers] html5.js enqueuing

Philip M. Hofer (Frumph) philip at frumph.net
Thu Jun 13 05:53:09 UTC 2013


twentytwelve does it in the functions.php with wp_enqueue_script( 'comment-reply' );

must be an earlier theme you’re thinking of, it’s all good, or earlier version of twentytwelve maybe? they update it  still when people put in reports on it

as otto wrote after my response he writes that if it’s a conditional situation don’t worry about it, however this is how you do conditionals

wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' ); 
$wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );


From: Paul Appleyard 
Sent: Wednesday, June 12, 2013 10:44 PM
To: theme-reviewers at lists.wordpress.org 
Subject: Re: [theme-reviewers] html5.js enqueuing

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 
  Sent: Wednesday, June 12, 2013 8:21 AM
  To: 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




--------------------------------------------------------------------------------
_______________________________________________
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/20130612/f045c8b2/attachment-0001.html>


More information about the theme-reviewers mailing list