Ticket #38465: 38465.diff
File 38465.diff, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
867 867 'description' => __( 'Whether to hide resources not assigned to any posts.' ), 868 868 'type' => 'boolean', 869 869 'default' => false, 870 'sanitize_callback' => 'rest_sanitize_request_arg', 870 871 'validate_callback' => 'rest_validate_request_arg', 871 872 ); 872 873 if ( $taxonomy->hierarchical ) { -
tests/phpunit/tests/rest-api/rest-categories-controller.php
92 92 $this->assertEquals( 2, count( $data ) ); 93 93 $this->assertEquals( 'Season 5', $data[0]['name'] ); 94 94 $this->assertEquals( 'The Be Sharps', $data[1]['name'] ); 95 96 // Check if empty category shows up. The empty category is the "Uncategorized" category. 97 $request->set_param( 'hide_empty', 'false' ); 98 $response = $this->server->dispatch( $request ); 99 $data = $response->get_data(); 100 $this->assertEquals( 3, count( $data ) ); 95 101 } 96 102 97 103 public function test_get_items_parent_zero_arg() {