WordPress/wp-includes/rest-api
audrasjb c985972791 Posts, Post Types: Ensure all entries in the list returned by wp_parse_list() are scalar.
This changeset fixes a warning where `strip_tags()` expected its first parameter to be a string rather than an array. It contains the following changes:

- Removal of sanitize_callback to allow the REST API to handle the validation natively, this also causes the proper error to be output for `?slug[0][1]=2` that it's an invalid value.
- Ensure that `wp_parse_list()` only returns a single-dimensioned array, even if passed a multi-dimension array, which fits the functions expected use case and resolves warnings in code that expects the function to return a single-dimensioned array.

Props dd32, TimothyBlynJacobs.
Fixes #55838.

Built from https://develop.svn.wordpress.org/trunk@54476


git-svn-id: http://core.svn.wordpress.org/trunk@54035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 13:25:11 +00:00
..
endpoints Posts, Post Types: Ensure all entries in the list returned by wp_parse_list() are scalar. 2022-10-11 13:25:11 +00:00
fields Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
search Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
class-wp-rest-request.php Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
class-wp-rest-response.php Docs: Update spelling for inline comments in a few files. 2022-01-25 13:55:05 +00:00
class-wp-rest-server.php REST API: Ensure args is an array of arrays in register_rest_route(). 2022-09-27 20:13:13 +00:00