[wp-trac] [WordPress Trac] #31281: Register JavaScript/Underscore templates using the WP Dependency API

WordPress Trac noreply at wordpress.org
Sun Feb 15 19:19:36 UTC 2015


#31281: Register JavaScript/Underscore templates using the WP Dependency API
---------------------------+------------------------------
 Reporter:  F J Kaiser     |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by F J Kaiser):

 Replying to [comment:7 sanchothefat]:
 > Replying to [comment:6 F J Kaiser]:
 > I agree with Ryan that if you're enqueueing templates it makes sense to
 allow passing in a script tag directly as well as a URL as I think there's
 a use case for generated templates.
 >
 > I did wonder about things like meta tags where you might want to have
 some open graph tags dependent on others being present etc... or for
 removing their output by other plugins but the current `remove_action()`
 functionality is probably good enough. To get some progress on this my
 view is that it should be kept to the case of scripts where order of
 loading is more important.

 I guess I know (partly) understand what the idea behind that is. And I
 agree that the idea of passing in strings as template is not that stupid.
 At least one can do that with other JS frameworks as well and part of the
 idea of that patch is to bring WP closer to how JS frameworks handle
 templates. This should allow non-WP/JS devs to more quickly jump onto WP.

 I will inspect that when I find some time. If someone can point me to some
 link that explains the open graph stuff, I'll happily read that and take
 it into consideration. Thanks in advance.

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


More information about the wp-trac mailing list