mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-13 07:10:00 +01:00
REST API: Add the site reading options to the index.
Exposes `page_for_posts`, `page_on_front` and `show_on_front` reading settings via REST API index. Props mamaduka, audrasjb, spacedmonkey, timothyblynjacobs. Fixes #63023. Built from https://develop.svn.wordpress.org/trunk@59880 git-svn-id: http://core.svn.wordpress.org/trunk@59222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9d245fd864
commit
b6a0684402
@ -1371,6 +1371,9 @@ class WP_REST_Server {
|
|||||||
'home' => home_url(),
|
'home' => home_url(),
|
||||||
'gmt_offset' => get_option( 'gmt_offset' ),
|
'gmt_offset' => get_option( 'gmt_offset' ),
|
||||||
'timezone_string' => get_option( 'timezone_string' ),
|
'timezone_string' => get_option( 'timezone_string' ),
|
||||||
|
'page_for_posts' => (int) get_option( 'page_for_posts' ),
|
||||||
|
'page_on_front' => (int) get_option( 'page_on_front' ),
|
||||||
|
'show_on_front' => get_option( 'show_on_front' ),
|
||||||
'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'] ),
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.8-alpha-59879';
|
$wp_version = '6.8-alpha-59880';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user