diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
index 23d6bacf74..2f1ed58298 100644
|
a
|
b
|
class WP_REST_Taxonomies_Controller extends WP_REST_Controller { |
| 322 | 322 | 'context' => array( 'view', 'edit' ), |
| 323 | 323 | 'readonly' => true, |
| 324 | 324 | ), |
| | 325 | 'visibility' => array( |
| | 326 | 'description' => __( 'The visibility settings for the taxonomy.' ), |
| | 327 | 'type' => 'object', |
| | 328 | 'context' => array( 'edit' ), |
| | 329 | 'readonly' => true, |
| | 330 | ), |
| 325 | 331 | 'rest_base' => array( |
| 326 | 332 | 'description' => __( 'REST base route for the taxonomy.' ), |
| 327 | 333 | 'type' => 'string', |
diff --git a/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php b/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
index b562bd88ff..512f1db218 100644
|
a
|
b
|
class WP_Test_REST_Taxonomies_Controller extends WP_Test_REST_Controller_Testcas |
| 197 | 197 | $response = $this->server->dispatch( $request ); |
| 198 | 198 | $data = $response->get_data(); |
| 199 | 199 | $properties = $data['schema']['properties']; |
| 200 | | $this->assertEquals( 9, count( $properties ) ); |
| | 200 | $this->assertEquals( 10, count( $properties ) ); |
| 201 | 201 | $this->assertArrayHasKey( 'capabilities', $properties ); |
| 202 | 202 | $this->assertArrayHasKey( 'description', $properties ); |
| 203 | 203 | $this->assertArrayHasKey( 'hierarchical', $properties ); |
| … |
… |
class WP_Test_REST_Taxonomies_Controller extends WP_Test_REST_Controller_Testcas |
| 206 | 206 | $this->assertArrayHasKey( 'slug', $properties ); |
| 207 | 207 | $this->assertArrayHasKey( 'show_cloud', $properties ); |
| 208 | 208 | $this->assertArrayHasKey( 'types', $properties ); |
| | 209 | $this->assertArrayHasKey( 'visibility', $properties ); |
| 209 | 210 | $this->assertArrayHasKey( 'rest_base', $properties ); |
| 210 | 211 | } |
| 211 | 212 | |
| … |
… |
class WP_Test_REST_Taxonomies_Controller extends WP_Test_REST_Controller_Testcas |
| 239 | 240 | $this->assertEquals( $tax_obj->cap, $data['capabilities'] ); |
| 240 | 241 | $this->assertEquals( $tax_obj->labels, $data['labels'] ); |
| 241 | 242 | $this->assertEquals( $tax_obj->show_tagcloud, $data['show_cloud'] ); |
| | 243 | |
| | 244 | $this->assertEquals( $tax_obj->public, $data['visibility']['public'] ); |
| | 245 | $this->assertEquals( $tax_obj->publicly_queryable, $data['visibility']['publicly_queryable'] ); |
| | 246 | $this->assertEquals( $tax_obj->show_admin_column, $data['visibility']['show_admin_column'] ); |
| | 247 | $this->assertEquals( $tax_obj->show_in_nav_menus, $data['visibility']['show_in_nav_menus'] ); |
| | 248 | $this->assertEquals( $tax_obj->show_in_quick_edit, $data['visibility']['show_in_quick_edit'] ); |
| | 249 | $this->assertEquals( $tax_obj->show_ui, $data['visibility']['show_ui'] ); |
| 242 | 250 | } else { |
| 243 | 251 | $this->assertFalse( isset( $data['capabilities'] ) ); |
| 244 | 252 | $this->assertFalse( isset( $data['labels'] ) ); |
| 245 | 253 | $this->assertFalse( isset( $data['show_cloud'] ) ); |
| | 254 | $this->assertFalse( isset( $data['visibility'] ) ); |
| 246 | 255 | } |
| 247 | 256 | } |
| 248 | 257 | |