[wp-trac] [WordPress Trac] #16024: Conditional Comments for JS

WordPress Trac noreply at wordpress.org
Tue Dec 30 08:01:17 UTC 2014


#16024: Conditional Comments for JS
--------------------------------------------------+-----------------------
 Reporter:  filosofo                              |       Owner:
     Type:  enhancement                           |      Status:  new
 Priority:  normal                                |   Milestone:  4.2
Component:  Script Loader                         |     Version:  3.1
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:  template
--------------------------------------------------+-----------------------
Changes (by valendesigns):

 * keywords:  has-patch needs-testing needs-unit-tests dev-feedback => has-
     patch needs-testing dev-feedback


Comment:

 I've added a unit test for this ticket. The reason there are two
 attachments is the first one uses the global `$wp_scripts` and the other
 uses the new `wp_script_add_data()` function. The first will allow you to
 test the assertion without the patch being applied, which would PHP fatal
 since `wp_script_add_data()` doesn't exist yet. The second adds coverage
 when the patch is applied.

 Cheers,
 Derek

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


More information about the wp-trac mailing list