You appear to be a bot. Output may be restricted
Description
Presents show_on_front, page_on_front, and page_for_posts settings.
These settings are not currently offered by the WordPress REST API. We could switch to wp
endpoints once the settings are exposed there.
Example: curl https://example.com/wp-json/genesis/v1/reading-settings
Example response:
{"show_on_front":"page","page_on_front":123,"page_for_posts":456}
Usage
get_reading_settings();
Parameters
Returns
void
Source
File name: genesis/lib/functions/rest.php
Lines:
1 to 18 of 18
function get_reading_settings() { \register_rest_route( 'genesis/v1', '/reading-settings', [ 'methods' => 'GET', 'callback' => function() { return [ 'show_on_front' => \get_option( 'show_on_front' ), 'page_on_front' => (int) \get_option( 'page_on_front' ), 'page_for_posts' => (int) \get_option( 'page_for_posts' ), ]; }, 'permission_callback' => '__return_true', ] ); }