[wp-trac] [WordPress Trac] #48885: REST API: Support reading public settings, implement context handling

WordPress Trac noreply at wordpress.org
Tue Nov 5 14:53:35 UTC 2024


#48885: REST API: Support reading public settings, implement context handling
-------------------------------------------------+-------------------------
 Reporter:  scruffian                            |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  REST API                             |     Version:  3.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests 2nd-        |     Focuses:  rest-api
  opinion                                        |
-------------------------------------------------+-------------------------

Comment (by youknowriad):

 Hello folks!

 I came here to say that a need for resolution for this ticket is becoming
 more urgent day by day. Especially as we want to decouple the frontend
 from the backend using REST API.

 The immediate need for us is a solution for this PR
 https://github.com/WordPress/gutenberg/pull/66459
 We want to move defaultTemplates and defaultTemplateParts settings to an
 endpoint.

 Note that these two are a bit specific compared to the settings mentioned
 above:

  - They are not editable
  - They are filterable in php
  - They are not `wp_options` settings.
  - They are also not editor specific.
  - They are also not sensitive data.

 So what we need is a clear path forward:

  - Should we continue adding this kind of settings to the `/` endpoint?
  - Should we work on allowing "readonly" settings in the settings
 endpoint, even if they are no wp_options settings?
  - Should this be a completely new endpoint: why? and what makes a setting
 belong to one endpoint but not the other.

 I think we need to stop delaying a solution here and come to an agreement
 on the path forward. Let's discuss this in the next days as we want to
 move forward and avoid bike shedding too much here.

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


More information about the wp-trac mailing list