[wp-trac] [WordPress Trac] #31273: Register JavaScript templates with wp_enqueue_script()

WordPress Trac noreply at wordpress.org
Mon Feb 9 22:34:34 UTC 2015


#31273: Register JavaScript templates with wp_enqueue_script()
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Script Loader    |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+-----------------------------

Comment (by rmccue):

 This could ''almost'' be done via `WP_Scripts::add_data`, however there's
 no way to set the type or ID on that. (You could build a plugin solution
 via the `script_loader_tag` filter too.)

 +1 on extending the data system to support that, +0 on adding support for
 templates specifically (not sure we need the full complexity there).

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


More information about the wp-trac mailing list