Ticket #42465: 42465.diff
| File 42465.diff, 2.6 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/rest-api/class-wp-rest-server.php
diff --git src/wp-includes/rest-api/class-wp-rest-server.php src/wp-includes/rest-api/class-wp-rest-server.php index c69cb4834c..d06974682a 100644
class WP_REST_Server { 1017 1017 public function get_index( $request ) { 1018 1018 // General site data. 1019 1019 $available = array( 1020 'name' => get_option( 'blogname' ), 1021 'description' => get_option( 'blogdescription' ), 1022 'url' => get_option( 'siteurl' ), 1023 'home' => home_url(), 1024 'gmt_offset' => get_option( 'gmt_offset' ), 1025 'timezone_string' => get_option( 'timezone_string' ), 1026 'namespaces' => array_keys( $this->namespaces ), 1027 'authentication' => array(), 1028 'routes' => $this->get_data_for_routes( $this->get_routes(), $request['context'] ), 1020 'name' => get_option( 'blogname' ), 1021 'description' => get_option( 'blogdescription' ), 1022 'url' => get_option( 'siteurl' ), 1023 'home' => home_url(), 1024 'gmt_offset' => get_option( 'gmt_offset' ), 1025 'timezone_string' => get_option( 'timezone_string' ), 1026 'permalink_structure' => get_option( 'permalink_structure' ), 1027 'namespaces' => array_keys( $this->namespaces ), 1028 'authentication' => array(), 1029 'routes' => $this->get_data_for_routes( $this->get_routes(), $request['context'] ), 1029 1030 ); 1030 1031 1031 1032 $response = new WP_REST_Response( $available ); -
tests/phpunit/tests/rest-api/rest-server.php
diff --git tests/phpunit/tests/rest-api/rest-server.php tests/phpunit/tests/rest-api/rest-server.php index cb75f4e726..37b96fdd33 100644
class Tests_REST_Server extends WP_Test_REST_TestCase { 665 665 $this->assertArrayHasKey( 'home', $data ); 666 666 $this->assertArrayHasKey( 'gmt_offset', $data ); 667 667 $this->assertArrayHasKey( 'timezone_string', $data ); 668 $this->assertArrayHasKey( 'permalink_structure', $data ); 668 669 $this->assertArrayHasKey( 'namespaces', $data ); 669 670 $this->assertArrayHasKey( 'authentication', $data ); 670 671 $this->assertArrayHasKey( 'routes', $data ); -
tests/qunit/fixtures/wp-api-generated.js
diff --git tests/qunit/fixtures/wp-api-generated.js tests/qunit/fixtures/wp-api-generated.js index 8c9684c9de..d0882f3249 100644
mockedApiResponse.Schema = { 12 12 "home": "http://example.org", 13 13 "gmt_offset": "0", 14 14 "timezone_string": "", 15 "permalink_structure": false, 15 16 "namespaces": [ 16 17 "oembed/1.0", 17 18 "wp/v2"