Posts, Post Types: Add missing REST API properties to `WP_Post_Type` class.
Props danielbachhuber. Fixes #39986. Merges [40302] to the 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@40329 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a1b4295ba7
commit
e1f9e1eaa0
|
@ -333,6 +333,38 @@ final class WP_Post_Type {
|
||||||
*/
|
*/
|
||||||
public $supports;
|
public $supports;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this post type should appear in the REST API.
|
||||||
|
*
|
||||||
|
* Default false. If true, standard endpoints will be registered with
|
||||||
|
* respect to $rest_base and $rest_controller_class.
|
||||||
|
*
|
||||||
|
* @since 4.7.4
|
||||||
|
* @access public
|
||||||
|
* @var bool $show_in_rest
|
||||||
|
*/
|
||||||
|
public $show_in_rest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base path for this post type's REST API endpoints.
|
||||||
|
*
|
||||||
|
* @since 4.7.4
|
||||||
|
* @access public
|
||||||
|
* @var string|bool $rest_base
|
||||||
|
*/
|
||||||
|
public $rest_base;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The controller for this post type's REST API endpoints.
|
||||||
|
*
|
||||||
|
* Custom controllers must extend WP_REST_Controller.
|
||||||
|
*
|
||||||
|
* @since 4.7.4
|
||||||
|
* @access public
|
||||||
|
* @var string|bool $rest_controller_class
|
||||||
|
*/
|
||||||
|
public $rest_controller_class;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -402,6 +434,9 @@ final class WP_Post_Type {
|
||||||
'query_var' => true,
|
'query_var' => true,
|
||||||
'can_export' => true,
|
'can_export' => true,
|
||||||
'delete_with_user' => null,
|
'delete_with_user' => null,
|
||||||
|
'show_in_rest' => false,
|
||||||
|
'rest_base' => false,
|
||||||
|
'rest_controller_class' => false,
|
||||||
'_builtin' => false,
|
'_builtin' => false,
|
||||||
'_edit_link' => 'post.php?post=%d',
|
'_edit_link' => 'post.php?post=%d',
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7.4-alpha-40328';
|
$wp_version = '4.7.4-alpha-40329';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue