[wp-trac] [WordPress Trac] #42083: Customize: Clean up longstanding annoyances in JS API

WordPress Trac noreply at wordpress.org
Wed Oct 4 06:47:39 UTC 2017


#42083: Customize: Clean up longstanding annoyances in JS API
-------------------------+--------------------------
 Reporter:  westonruter  |       Owner:  westonruter
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.9
Component:  Customize    |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  commit       |     Focuses:
-------------------------+--------------------------
Changes (by westonruter):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41726"]:
 {{{
 #!CommitTicketReference repository="" revision="41726"
 Customize: Improve usability of Customize JS API.

 * Eliminate need to pass both ID and instance in calls to `Values#add()`
 for panels, sections, controls, settings, partials, and notifications.
 * Eliminate need to supply `content` param when constructing a `Control`.
 * Unwrap the `options.params` object passed in constructors to just pass a
 flat `options`. (Back-compat is maintained.)
 * Add support for `templateId` param for `Control` to override which
 template is used for the content.
 * Remove unused `previewer` being supplied in `Control` instances.
 * Rename `classes` to `containerClasses` on `Notification`.
 * Automatically supply `instanceNumber` to improve stable sorting.
 * Use `api.Notifications` for notifications in settings instead of
 `api.Value`.

 See #30741.
 Fixes #42083.
 }}}

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


More information about the wp-trac mailing list