[wp-trac] [WordPress Trac] #57879: fix rest_get_endpoint_args_for_schema() to allow user-defined sanitize and validate callbacks.
WordPress Trac
noreply at wordpress.org
Wed Mar 8 14:46:59 UTC 2023
#57879: fix rest_get_endpoint_args_for_schema() to allow user-defined sanitize and
validate callbacks.
-------------------------------------------------+-------------------------
Reporter: mi5t4n | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion has-unit- | Focuses: rest-api
tests |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* version: trunk => 4.7
Comment:
Hello @mi5t4n,
Welcome to WordPress Core's Trac!
I'm modifying this ticket's `Version` from `trunk` to `4.7.0`. Why? 4.7.0
is when the validation code was introduced in Core.
Some history:
* In 4.7.0, [38832] / #38373 introduced
`WP_REST_Controller::get_endpoint_args_for_item_schema()` which originally
had the validation code within it.
* In 5.6.0, [48951] / #50876 introduced
`rest_get_endpoint_args_for_schema()` function and extracted the code from
`WP_REST_Controller::get_endpoint_args_for_item_schema()` for it.
So 4.7.0 is when this code was introduced in Core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57879#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list