[wp-trac] [WordPress Trac] #48885: REST API: Add a route to read and update separate site settings
WordPress Trac
noreply at wordpress.org
Mon Dec 16 22:25:36 UTC 2019
#48885: REST API: Add a route to read and update separate site settings
--------------------------------------------------+---------------------
Reporter: scruffian | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.4
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd-opinion | Focuses:
PR Number: |
--------------------------------------------------+---------------------
Comment (by TimothyBlynJacobs):
> Admins will need to GET with view context for previewing the block, and
with edit context for editing the block, and then can POST to update the
setting value.
At that point, is there a benefit to consolidating everything into a
single endpoint? As I understand it, the purpose of centralizing it into
one endpoint is to make it easy for `core-data`. In this model, the data
store would need to maintain two copies of the resource that are fetched
differently.
Switching how we format a value based on the context would be a new
pattern I believe. I can't think of an example of us doing that in core,
and couldn't find any doing a brief search. Currently you can request the
"maximum" level of context available to you, and retrieve access to all
data. I'm not opposed to it, but I wanted to document that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48885#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list