Make WordPress Core


Ignore:
Timestamp:
02/27/2025 03:37:22 AM (7 weeks ago)
Author:
Mamaduka
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r59032 r59880  
    13721372            'gmt_offset'      => get_option( 'gmt_offset' ),
    13731373            'timezone_string' => get_option( 'timezone_string' ),
     1374            'page_for_posts'  => (int) get_option( 'page_for_posts' ),
     1375            'page_on_front'   => (int) get_option( 'page_on_front' ),
     1376            'show_on_front'   => get_option( 'show_on_front' ),
    13741377            'namespaces'      => array_keys( $this->namespaces ),
    13751378            'authentication'  => array(),
Note: See TracChangeset for help on using the changeset viewer.