mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
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. Props ketuchetan, rahulsprajapati. Fixes #39023. git-svn-id: https://develop.svn.wordpress.org/trunk@39462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 `public` argument now controls whether the taxonomy can be queried on the front end.
|
||||
* @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.
|
||||
*
|
||||
@@ -323,6 +325,9 @@ function is_taxonomy_hierarchical($taxonomy) {
|
||||
* (default true).
|
||||
* @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).
|
||||
* @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,
|
||||
* 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,
|
||||
|
||||
Reference in New Issue
Block a user