WPDev.one
Core Class

WP_REST_Sidebars_Controller

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

Core class used to manage a site's sidebars.

Methods 15 methods

Method / Return Description
__construct()
void

Sidebars controller constructor.

register_routes()
void

Registers the controllers routes.

get_items_permissions_check()
(true

Checks if a given request has access to get sidebars.

Parameters: $request: mixed
get_items()
WP_REST_Response

Retrieves the list of sidebars (active or inactive).

Parameters: $request: mixed
get_item_permissions_check()
(true

Checks if a given request has access to get a single sidebar.

Parameters: $request: mixed
check_read_permission()
bool

Checks if a sidebar can be read publicly.

Parameters: $sidebar: mixed
get_item()
(WP_REST_Response

Retrieves one sidebar from the collection.

Parameters: $request: mixed
update_item_permissions_check()
(true

Checks if a given request has access to update sidebars.

Parameters: $request: mixed
update_item()
WP_REST_Response

Updates a sidebar.

Parameters: $request: mixed
do_permissions_check()
(true

Checks if the user has permissions to make the request.

get_sidebar()
(array

Retrieves the registered sidebar with the given id.

Parameters: $id: mixed
retrieve_widgets()
void

Looks for "lost" widgets once per request.

prepare_item_for_response()
WP_REST_Response

Prepares a single sidebar output for response.

Parameters: $item: mixed, $request: mixed
prepare_links()
array

Prepares links for the sidebar.

Parameters: $sidebar: mixed
get_item_schema()
array

Retrieves the block type' schema, conforming to JSON Schema.

Properties

Property / Type Description
$widgets_retrieved
mixed
public
No description available.

Class Information

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