From 62a35c8545cba6c6b3db6103cb2b1fd3226e8015 Mon Sep 17 00:00:00 2001 From: danielbachhuber Date: Mon, 8 Oct 2018 13:50:27 +0000 Subject: [PATCH] REST API: Define taxonomy visibility settings in schema For Gutenberg and other admin-type interfaces, it's useful to be able to see the visibility settings for taxonomies. The original changeset was partially included in [43445]. Merges [42729], [42730], [42973] to the 5.0 branch. Props joehoyle, TimothyBlynJacobs, pento. Fixes #42707 Built from https://develop.svn.wordpress.org/branches/5.0@43680 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43509 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../endpoints/class-wp-rest-taxonomies-controller.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php index 23d6bacf74..2f1ed58298 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php @@ -322,6 +322,12 @@ class WP_REST_Taxonomies_Controller extends WP_REST_Controller { 'context' => array( 'view', 'edit' ), 'readonly' => true, ), + 'visibility' => array( + 'description' => __( 'The visibility settings for the taxonomy.' ), + 'type' => 'object', + 'context' => array( 'edit' ), + 'readonly' => true, + ), 'rest_base' => array( 'description' => __( 'REST base route for the taxonomy.' ), 'type' => 'string', diff --git a/wp-includes/version.php b/wp-includes/version.php index 65b341fc7c..4c001fcdcf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43679'; +$wp_version = '5.0-alpha-43680'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.