Wordpress/tests/phpunit/tests/rest-api
Timothy Jacobs ddf897db05 REST API: Fix updating "multiple" meta keys with non-string values.
Previously, the REST API would end up deleting each row of metadata and recreating it unnecessarily. This was caused by a type mismatch where the metadata API would always return a string value, and the REST API operated on a typed value.

The REST API now applies the same sanitization and type casting for "multiple" meta keys and "single" meta keys.

Fixes #49339.
Props renathoc.


git-svn-id: https://develop.svn.wordpress.org/trunk@47943 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 02:20:18 +00:00
..
rest-attachments-controller.php REST API: Allow meta to be set when creating a new media record via REST. 2020-02-11 03:37:17 +00:00
rest-autosaves-controller.php Tests: Replace use of $this->server with rest_get_server() in test_registered_query_params(). 2018-12-17 01:24:36 +00:00
rest-block-renderer-controller.php REST API: Accept POST requests in the block renderer endpoint. 2020-05-03 22:56:01 +00:00
rest-blocks-controller.php REST API: Always include title.raw/content.raw for Blocks in context=view. 2018-12-17 17:21:05 +00:00
rest-categories-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-comments-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-controller.php REST API: Support the (min|max)Items JSON Schema keywords. 2020-06-07 22:40:16 +00:00
rest-pages-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-post-meta-fields.php REST API: Fix updating "multiple" meta keys with non-string values. 2020-06-10 02:20:18 +00:00
rest-post-statuses-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-post-types-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-posts-controller.php REST API: Introduce rest_{$this->post_type}_item_schema filter to enable manipulation of schema values. 2020-02-11 16:26:56 +00:00
rest-request-validation.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
rest-request.php REST API: Handle parameter types consistently within set_param(). 2020-04-09 19:28:58 +00:00
rest-revisions-controller.php REST API: Fix revisions controller get_item permission check. 2020-04-03 19:38:15 +00:00
rest-schema-sanitization.php REST API: Support the uuid JSON Schema format. 2020-05-03 19:18:40 +00:00
rest-schema-setup.php Block Editor: Update WordPress Packages; Remove navigation block; Add social links block 2020-02-10 22:31:13 +00:00
rest-schema-validation.php REST API: Support the (min|max)Items JSON Schema keywords. 2020-06-07 22:40:16 +00:00
rest-search-controller.php REST API: Permit embedding of the 'self' link relation in the /search endpoint. 2019-10-08 04:43:10 +00:00
rest-server.php REST API: Fix namespace shadowing issue in route matching logic. 2020-02-24 18:05:12 +00:00
rest-settings-controller.php REST API: Warn if registering array settings without an items schema. 2020-02-19 22:54:03 +00:00
rest-tags-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-taxonomies-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
rest-term-meta-fields.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
rest-test-controller.php REST API: Support the (min|max)Items JSON Schema keywords. 2020-06-07 22:40:16 +00:00
rest-themes-controller.php REST API: Add additional fields to the themes controller. 2020-06-07 06:44:08 +00:00
rest-users-controller.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00