mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
63c7122ed0
This patch fixes an oversight from when default metadata values were introduced in #43941 in WordPress 5.5: metadata updates should persist in the database even if they match the registered default value (because the default values can change over time). Previously, the REST API code was comparing updated values against the value returned by the default-aware `get_metadata()` method. This meant that if no value existed in the database, and the default value was supplied to the update, WordPress would think that the updated value was already persisted and skip the database call. Now, the `get_metadata_raw()` method is called for comparing whether or not a database update is required, fixing the bug. In this patch both issues are resolved. Developed in https://github.com/wordpress/wordpress-develop/pull/6782 Discussed in https://core.trac.wordpress.org/ticket/55600 Follow-up to [48402]. Props: dmsnell, kraftner, ramon-fincken. Fixes #55600. Built from https://develop.svn.wordpress.org/trunk@58831 git-svn-id: http://core.svn.wordpress.org/trunk@58227 1a063a9b-81f0-0310-95a4-ce76da25c4cd |
||
---|---|---|
.. | ||
endpoints | ||
fields | ||
search | ||
class-wp-rest-request.php | ||
class-wp-rest-response.php | ||
class-wp-rest-server.php |