[wp-trac] [WordPress Trac] #22249: Add ability to set or remove attributes on enqueued scripts and styles.

WordPress Trac noreply at wordpress.org
Thu Dec 31 20:56:31 UTC 2015


#22249: Add ability to set or remove attributes on enqueued scripts and styles.
----------------------------------------+------------------
 Reporter:  ryanve                      |       Owner:
     Type:  feature request             |      Status:  new
 Priority:  normal                      |   Milestone:  4.5
Component:  Script Loader               |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------
Changes (by ericlewis):

 * keywords:  has-patch needs-docs needs-unit-tests => has-patch needs-unit-
     tests
 * milestone:  Future Release => 4.5


Comment:

 attachment:2249.2.diff

 * removes the coding standards fixes,
 [https://make.wordpress.org/core/2011/03/23/code-refactoring/ please don't
 include them in the future] ????.
 * Fixes inline docs.

 Still need unit tests here if anyone wants to give that a go.

 @boonebgorges @jeremyfelt @danielbachhuber if we're going to modify the
 function signature, can we go all in?

 {{{
 #!php
 <?php
 wp_enqueue_script( array(
   'handle' => 'd3',
   'src' => 'https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.12/d3.js',
   'attributes' => array(
     'async' => 'async'
   )
 ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22249#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list