From 6354f6dcdce1ef2e086d29defe0a65e8dd1183bc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 20 Sep 2019 13:05:57 +0000 Subject: [PATCH] Docs: Clarify that `$show_in_rest` parameter of `register_post_type()` and `register_taxonomy()` should be enabled for the post type or taxonomy to be available in the block editor. Props ramon-fincken. Fixes #48084. Built from https://develop.svn.wordpress.org/trunk@46196 git-svn-id: http://core.svn.wordpress.org/trunk@46008 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 5 +++-- wp-includes/taxonomy.php | 3 ++- wp-includes/version.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 56b7317c6f..b40e94d8ce 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1313,10 +1313,11 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * type will be placed as a sub-menu of that. * Default is value of $show_ui. * @type bool $show_in_nav_menus Makes this post type available for selection in navigation menus. - * Default is value $public. + * Default is value of $public. * @type bool $show_in_admin_bar Makes this post type available via the admin bar. Default is value * of $show_in_menu. - * @type bool $show_in_rest Whether to add the post type route in the REST API 'wp/v2' namespace. + * @type bool $show_in_rest Whether to include the post type in the REST API. Set this to true + * for the post type to be available in the block editor. * @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, diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 04c2b8bfce..3231285b1a 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -363,7 +363,8 @@ 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 bool $show_in_rest Whether to include the taxonomy in the REST API. Set this to true + * for the taxonomy to be available in the block editor. * @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, diff --git a/wp-includes/version.php b/wp-includes/version.php index d7d2a16f64..2083c09da2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46195'; +$wp_version = '5.3-alpha-46196'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.