Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #38900, comment 7


Ignore:
Timestamp:
03/17/2017 07:26:30 PM (7 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38900, comment 7

    initial v1  
    1515Note that as part of this, fine-grained capabilities should be introduced for the `customize_changeset` post `caps`, instead of mapping all to `customize`.
    1616
    17 Essentially, the task here is to take the existing admin-ajax handler in `WP_Customize_Manager::save()` and convert it for REST. Once this is done, then the `wp.customize.previewer.save()` method and `wp.customize.requestChangesetUpdate()` functions in JS can be refactored to make use of the new endpoint.
     17Essentially, the task here is to take the existing admin-ajax handler in `WP_Customize_Manager::save()` and convert it for REST. Once this is done, then the `wp.customize.previewer.save()` method and `wp.customize.requestChangesetUpdate()` functions in JS can be refactored to make use of the new endpoint. So perhaps the best approach would be to first start looking at the kinds of requests that these functions make, and then to flesh out what the endpoints are and what methods they allow. Then with that in place, tests can be written according to those requirements. And then the actual endpoints fan be written to satisfy the tests.