[wp-trac] [WordPress Trac] #36695: wp-util: update to latest _.template syntax
WordPress Trac
noreply at wordpress.org
Thu Apr 28 00:25:31 UTC 2016
#36695: wp-util: update to latest _.template syntax
-------------------------+-----------------------------
Reporter: jnylen0 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: javascript |
-------------------------+-----------------------------
With the upgrade to Underscore 1.8.3 in [36546] and 4.5, the preferred
syntax for passing options to `_.template` is to pass two parameters
(`template, options`) rather than three (`template, data, options`). This
patch updates the `wp.template` function accordingly (and also cleans up
the style of the immediately surrounding code).
No functional changes, since Underscore
[https://github.com/jashkenas/underscore/blob/1.8.3/underscore.js#L1414-L1416
supports] passing `data = null` for backwards compatibility, but we should
fix this to be consistent with the correct usage of the function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36695>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list