REST API: Add `home_url` to API index to avoid confusion with `site_url`.
Confusion abound, the API index is the generic term `url` to display the `site_url`. New `home` key will display the `home_url` in the index as well. Fixes #35647. Built from https://develop.svn.wordpress.org/trunk@37031 git-svn-id: http://core.svn.wordpress.org/trunk@36998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
11ab384086
commit
6edbcc88ff
|
@ -945,6 +945,7 @@ class WP_REST_Server {
|
||||||
'name' => get_option( 'blogname' ),
|
'name' => get_option( 'blogname' ),
|
||||||
'description' => get_option( 'blogdescription' ),
|
'description' => get_option( 'blogdescription' ),
|
||||||
'url' => get_option( 'siteurl' ),
|
'url' => get_option( 'siteurl' ),
|
||||||
|
'home' => home_url(),
|
||||||
'namespaces' => array_keys( $this->namespaces ),
|
'namespaces' => array_keys( $this->namespaces ),
|
||||||
'authentication' => array(),
|
'authentication' => array(),
|
||||||
'routes' => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),
|
'routes' => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-beta4-37030';
|
$wp_version = '4.5-beta4-37031';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue