REST API: Include the `status` property in `view` context responses from the Posts endpoints.
Previously the status for a Post (or other post_types) was only exposed under the `edit` context, which doesn't really make much sense considering we support querying by post status without authentication. Originally introduced in v2.0 beta 1: 69f617d749
without any explanation in the commit message.
Props dhanendran, jnylen0, rachelbaker.
Merges [40080] to the 4.7 branch.
Fixes #39466.
Built from https://develop.svn.wordpress.org/branches/4.7@40081
git-svn-id: http://core.svn.wordpress.org/branches/4.7@40018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4bd52ccd1d
commit
2dda813ae2
|
@ -1758,7 +1758,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
|||
'description' => __( 'A named status for the object.' ),
|
||||
'type' => 'string',
|
||||
'enum' => array_keys( get_post_stati( array( 'internal' => false ) ) ),
|
||||
'context' => array( 'edit' ),
|
||||
'context' => array( 'view', 'edit' ),
|
||||
),
|
||||
'type' => array(
|
||||
'description' => __( 'Type of Post for the object.' ),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7.3-alpha-40079';
|
||||
$wp_version = '4.7.3-alpha-40081';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue