[wp-trac] [WordPress Trac] #39634: Customize: Add REST API endpoints for panels, sections, controls, settings, and partials

WordPress Trac noreply at wordpress.org
Tue Feb 14 19:54:44 UTC 2017


#39634: Customize: Add REST API endpoints for panels, sections, controls, settings,
and partials
-------------------------+-----------------------
 Reporter:  westonruter  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.8
Component:  Customize    |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  rest-api
-------------------------+-----------------------

Comment (by westonruter):

 Using the REST API as the interface for obtaining the configurations may
 not be better for `customize.php`'s exporting to `_wpCustomizeSettings`,
 especially in the case of serializing out a LOT of data in one big chunk
 which had major performance problems as shown in #33898. In that regard,
 we may actually want to consider proposing a REST API improvement to
 `\WP_REST_Server::serve_request()`). We'd need to ensure that we still
 serialize out each JS object separately for the sake of memory. But also I
 hope that with a REST interface for obtaining settings and controls, we'd
 be able to lazy-load these via #28580 as needed (e.g. when the panel
 expands) rather than load all of this data up front which can incur a
 heavy server load to generate the initial `customize.php` response. We
 could do internal REST API calls to `/customize/settings` and
 `/customize/controls` etc instead of looping over these manually directly
 with PHP.

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


More information about the wp-trac mailing list