[wp-trac] [WordPress Trac] #12009: Add support for HTML 5 "async" and "defer" attributes

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 9 20:40:10 UTC 2012


#12009: Add support for HTML 5 "async" and "defer" attributes
-------------------------------------+-----------------------------
 Reporter:  Otto42                   |       Owner:  azaozz
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  JavaScript               |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+-----------------------------

Comment (by Otto42):

 I like the patch, but instead of adding new params to the function calls,
 lets change the $in_footer parameter to be allowed as an array of
 attributes.

 Basically, instead of $in_footer = false, have $attr = false.

 For backward compatibility, you could do if $attr == true, then $attr =
 array('in_footer'=>true).

 Then, you can have $attr = an array of the various settings, including
 potential future ones, allowing you to define whether it's in the footer
 or not, defer or not, async or not, etc.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12009#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list