WPDev.one
Core Class

WP_REST_Settings_Controller

class WP_REST_Settings_Controller // Constructor: function Object() { [native code] }

Core class used to manage a site's settings via the REST API.

Methods 10 methods

Method / Return Description
__construct()
void

Constructor.

register_routes()
void

Registers the routes for the site's settings.

get_item_permissions_check()
bool

Checks if a given request has access to read and manage settings.

Parameters: $request: mixed
get_item()
(array

Retrieves the settings.

Parameters: $request: mixed
prepare_value()
mixed

Prepares a value for output based off a schema array.

Parameters: $value: mixed, $schema: mixed
update_item()
(array

Updates settings for the settings object.

Parameters: $request: mixed
get_registered_options()
array

Retrieves all of the registered options for the Settings API.

get_item_schema()
array

Retrieves the site setting schema, conforming to JSON Schema.

sanitize_callback()
(mixed

Custom sanitize callback used for all options to allow the use of 'null'.

Parameters: $value: mixed, $request: mixed, $param: mixed
set_additional_properties_to_false()
array

Recursively add additionalProperties = false to all objects in a schema

Parameters: $schema: mixed

Class Information

Since Version
4.7.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php
Advertisement