REST API: Special case the “standard” post format to always be allowed.
Fixes #38916. Built from https://develop.svn.wordpress.org/trunk@39353 git-svn-id: http://core.svn.wordpress.org/trunk@39293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1908,7 +1908,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
$schema['properties']['format'] = array(
|
||||
'description' => __( 'The format for the object.' ),
|
||||
'type' => 'string',
|
||||
'enum' => $supports_formats ? array_values( $supports_formats[0] ) : array(),
|
||||
'enum' => array_merge( array( 'standard' ), $supports_formats ? array_values( $supports_formats[0] ) : array() ),
|
||||
'context' => array( 'view', 'edit' ),
|
||||
);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user