Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/wp-includes/rest-api/class-wp-rest-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@ public function get_index( $request ) {
'home' => home_url(),
'gmt_offset' => get_option( 'gmt_offset' ),
'timezone_string' => get_option( 'timezone_string' ),
'site_icon_url' => get_site_icon_url(),
'namespaces' => array_keys( $this->namespaces ),
'authentication' => array(),
'routes' => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/tests/rest-api/rest-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ public function test_get_index() {
$this->assertArrayHasKey( 'home', $data );
$this->assertArrayHasKey( 'gmt_offset', $data );
$this->assertArrayHasKey( 'timezone_string', $data );
$this->assertArrayHasKey( 'site_icon_url', $data );
$this->assertArrayHasKey( 'namespaces', $data );
$this->assertArrayHasKey( 'authentication', $data );
$this->assertArrayHasKey( 'routes', $data );
Expand Down
1 change: 1 addition & 0 deletions tests/qunit/fixtures/wp-api-generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mockedApiResponse.Schema = {
"home": "http://example.org",
"gmt_offset": "0",
"timezone_string": "",
"site_icon_url": "",
"namespaces": [
"oembed/1.0",
"wp/v2",
Expand Down