[wp-trac] [WordPress Trac] #23263: Move Media's backbone template regexes
WordPress Trac
noreply at wordpress.org
Sun Apr 7 01:28:17 UTC 2013
#23263: Move Media's backbone template regexes
-------------------------+------------------
Reporter: markjaquith | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.6
Component: Template | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------
Comment (by rmccue):
Replying to [comment:7 nacin]:
> This was committed in [23506/trunk/wp-includes/js/template.js] — but
media went untouched, so that should be updated. I agree with
media.template = wp.template.
Aha, missed that, thanks.
> Also, does anyone else think that `wp.template` is far too generic for
what this is? wp.backboneTemplate? wp.backbone.template? Is there
something else that might end up being a part of a wp.backbone object that
could justify that?
The original is actually `_.template`, so `wp._.template` or
`wp.underscore.template` seems more appropriate. With that in mind,
there's basically no reason to override any other Underscore.js function
that I can think of.
With Backbone, I could see a custom [http://backbonejs.org/#Sync
Backbone.sync] which uses `admin-ajax.php` instead. At the moment it's
doing it at a deeper level (`jQuery.ajax` is replaced by `wp.media.ajax`)
and each model appears to have its own sync code instead.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23263#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list