Docs: Add missing REST API-related args to `register_post_type()` and `register_taxonomy()`.
These functions now accept the `show_in_rest`, `rest_base`, and `rest_controller_class` args. Merges [39462] to the 4.7 branch. Props ketuchetan, rahulsprajapati. Fixes #39023. Built from https://develop.svn.wordpress.org/branches/4.7@39463 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
250f92a59e
commit
dae13be262
|
@ -985,6 +985,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
|
||||||
* @since 4.4.0 The `show_ui` argument is now enforced on the post type listing
|
* @since 4.4.0 The `show_ui` argument is now enforced on the post type listing
|
||||||
* screen and post editing screen.
|
* screen and post editing screen.
|
||||||
* @since 4.6.0 Post type object returned is now an instance of WP_Post_Type.
|
* @since 4.6.0 Post type object returned is now an instance of WP_Post_Type.
|
||||||
|
* @since 4.7.0 Introduced `show_in_rest`, 'rest_base' and 'rest_controller_class'
|
||||||
|
* arguments to register the post type in REST API.
|
||||||
*
|
*
|
||||||
* @global array $wp_post_types List of post types.
|
* @global array $wp_post_types List of post types.
|
||||||
*
|
*
|
||||||
|
@ -1029,6 +1031,9 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
|
||||||
* Default is value $public.
|
* Default is value $public.
|
||||||
* @type bool $show_in_admin_bar Makes this post type available via the admin bar. Default is value
|
* @type bool $show_in_admin_bar Makes this post type available via the admin bar. Default is value
|
||||||
* of $show_in_menu.
|
* of $show_in_menu.
|
||||||
|
* @type bool $show_in_rest Whether to add the post type route in the REST API 'wp/v2' namespace.
|
||||||
|
* @type string $rest_base To change the base url of REST API route. Default is $post_type.
|
||||||
|
* @type string $rest_controller_class REST API Controller class name. Default is 'WP_REST_Posts_Controller'.
|
||||||
* @type int $menu_position The position in the menu order the post type should appear. To work,
|
* @type int $menu_position The position in the menu order the post type should appear. To work,
|
||||||
* $show_in_menu must be true. Default null (at the bottom).
|
* $show_in_menu must be true. Default null (at the bottom).
|
||||||
* @type string $menu_icon The url to the icon to be used for this menu. Pass a base64-encoded
|
* @type string $menu_icon The url to the icon to be used for this menu. Pass a base64-encoded
|
||||||
|
|
|
@ -294,6 +294,8 @@ function is_taxonomy_hierarchical($taxonomy) {
|
||||||
* @since 4.4.0 The `show_ui` argument is now enforced on the term editing screen.
|
* @since 4.4.0 The `show_ui` argument is now enforced on the term editing screen.
|
||||||
* @since 4.4.0 The `public` argument now controls whether the taxonomy can be queried on the front end.
|
* @since 4.4.0 The `public` argument now controls whether the taxonomy can be queried on the front end.
|
||||||
* @since 4.5.0 Introduced `publicly_queryable` argument.
|
* @since 4.5.0 Introduced `publicly_queryable` argument.
|
||||||
|
* @since 4.7.0 Introduced `show_in_rest`, 'rest_base' and 'rest_controller_class'
|
||||||
|
* arguments to register the Taxonomy in REST API.
|
||||||
*
|
*
|
||||||
* @global array $wp_taxonomies Registered taxonomies.
|
* @global array $wp_taxonomies Registered taxonomies.
|
||||||
*
|
*
|
||||||
|
@ -323,6 +325,9 @@ function is_taxonomy_hierarchical($taxonomy) {
|
||||||
* (default true).
|
* (default true).
|
||||||
* @type bool $show_in_nav_menus Makes this taxonomy available for selection in navigation menus. If not
|
* @type bool $show_in_nav_menus Makes this taxonomy available for selection in navigation menus. If not
|
||||||
* set, the default is inherited from `$public` (default true).
|
* set, the default is inherited from `$public` (default true).
|
||||||
|
* @type bool $show_in_rest Whether to include the taxonomy in the REST API.
|
||||||
|
* @type string $rest_base To change the base url of REST API route. Default is $taxonomy.
|
||||||
|
* @type string $rest_controller_class REST API Controller class name. Default is 'WP_REST_Terms_Controller'.
|
||||||
* @type bool $show_tagcloud Whether to list the taxonomy in the Tag Cloud Widget controls. If not set,
|
* @type bool $show_tagcloud Whether to list the taxonomy in the Tag Cloud Widget controls. If not set,
|
||||||
* the default is inherited from `$show_ui` (default true).
|
* the default is inherited from `$show_ui` (default true).
|
||||||
* @type bool $show_in_quick_edit Whether to show the taxonomy in the quick/bulk edit panel. It not set,
|
* @type bool $show_in_quick_edit Whether to show the taxonomy in the quick/bulk edit panel. It not set,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-RC1-39461';
|
$wp_version = '4.7-RC1-39463';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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