[wp-trac] [WordPress Trac] #41604: REST API: Attempting to create or update a non-existent setting doesn't return an error response
WordPress Trac
noreply at wordpress.org
Mon Jun 23 06:10:00 UTC 2025
#41604: REST API: Attempting to create or update a non-existent setting doesn't
return an error response
----------------------------------------+--------------------------
Reporter: johnbillion | Owner: johnbillion
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.9
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: rest-api
----------------------------------------+--------------------------
Comment (by wildworks):
Replying to [comment:24 sheldorofazeroth]:
Let's review the definitions of words and the roles of methods. For
example, suppose we receive the following request:
{{{
/wp/v2/posts/123/?param=value
}}}
This is my understanding, but please correct me if I'm wrong.
- **URL Parameter**: The `123` in the URL corresponds to this. This can be
obtained using the `get_url_params` method.
- **Query Parameter**: The `param=value` in the URL corresponds to this.
This can be obtained using the `get_query_params` method.
Since the Settings endpoint does not accept the URL parameter, the
`get_url_params()` method should not be necessary.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41604#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list