WordPress/wp-includes/rest-api
TimothyBlynJacobs 13b10697bf REST API, Meta: Introduce support for default metadata values.
The `register_meta()` API now officially supports specifying a default metadata value. When `get_metadata()` is called for a meta key that does not yet exist for the object, this default value will be returned instead of an empty string.

A new function is introduced `get_metadata_raw` to retrieve the raw metadata value from the database, without applying the registered default.

Props spacedmonkey, flixos90, rmccue, kadamwhite, mnelson4, johnbillion, chrisvanpatten, TimothyBlynJacobs.
Fixes #43941.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 20:47:05 +00:00
..
endpoints Media, REST API: Allow media edit endpoint to find remote files. 2020-07-07 16:51:04 +00:00
fields REST API, Meta: Introduce support for default metadata values. 2020-07-07 20:47:05 +00:00
search REST API: Use new rest_get_route_for_post() in the post search handler. 2020-07-07 15:31:02 +00:00
class-wp-rest-request.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
class-wp-rest-response.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-rest-server.php Docs: Miscellaneous DocBlock corrections. 2020-06-28 11:53:04 +00:00