WordPress/wp-includes/rest-api
Dominik Schilling 6485764f43 REST API: Allow setting post formats even if they are not supported by the theme.
A `post_format` not used by the current theme, but supported by core is not a wrong/broken piece of information. It's just not used at this point in time. Therefore we should allow setting and retrieving any of the standard post formats supported in core, even if the current theme doesn't use them.

After this commit, a post's `format` value can survive a round trip through the API, which is a good general design principle for an API.

Merge of [40120] and [40121] to the 4.7 branch.

Props JPry, iseulde, davidakennedy, Drivingralle.
Fixes #39232.
Built from https://develop.svn.wordpress.org/branches/4.7@40137


git-svn-id: http://core.svn.wordpress.org/branches/4.7@40074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 20:03:37 +00:00
..
endpoints REST API: Allow setting post formats even if they are not supported by the theme. 2017-02-27 20:03:37 +00:00
fields REST API: Return a `WP_Error` if `meta` property is not an array. 2016-12-02 22:05:35 +00:00
class-wp-rest-request.php REST API: Correctly parse body parameters for DELETE requests. 2017-02-24 20:56:34 +00:00
class-wp-rest-response.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-rest-server.php Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy. 2016-11-17 15:53:33 +00:00