Taxonomy: Add missing REST API properties to `WP_Taxonomy` class.
Props danielbachhuber. Fixes #39987. Built from https://develop.svn.wordpress.org/trunk@40303 git-svn-id: http://core.svn.wordpress.org/trunk@40210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9ebebe5d25
commit
280bfe7933
|
@ -186,6 +186,38 @@ final class WP_Taxonomy {
|
||||||
*/
|
*/
|
||||||
public $update_count_callback;
|
public $update_count_callback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this taxonomy 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 taxonomy's REST API endpoints.
|
||||||
|
*
|
||||||
|
* @since 4.7.4
|
||||||
|
* @access public
|
||||||
|
* @var string|bool $rest_base
|
||||||
|
*/
|
||||||
|
public $rest_base;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The controller for this taxonomy'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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether it is a built-in taxonomy.
|
* Whether it is a built-in taxonomy.
|
||||||
*
|
*
|
||||||
|
@ -254,6 +286,9 @@ final class WP_Taxonomy {
|
||||||
'rewrite' => true,
|
'rewrite' => true,
|
||||||
'query_var' => $this->name,
|
'query_var' => $this->name,
|
||||||
'update_count_callback' => '',
|
'update_count_callback' => '',
|
||||||
|
'show_in_rest' => false,
|
||||||
|
'rest_base' => false,
|
||||||
|
'rest_controller_class' => false,
|
||||||
'_builtin' => false,
|
'_builtin' => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40302';
|
$wp_version = '4.8-alpha-40303';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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