WPDev.one
Core Class

WP_REST_Themes_Controller

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

Core class used to manage themes via the REST API.

Methods 15 methods

Method / Return Description
__construct()
void

Constructor.

register_routes()
void

Registers the routes for themes.

_sanitize_stylesheet_callback()
string

Sanitize the stylesheet to decode endpoint.

Parameters: $stylesheet: mixed
get_items_permissions_check()
(true

Checks if a given request has access to read the theme.

Parameters: $request: mixed
get_item_permissions_check()
(true

Checks if a given request has access to read the theme.

Parameters: $request: mixed
check_read_active_theme_permission()
(true

Checks if a theme can be read.

get_item()
(WP_REST_Response

Retrieves a single theme.

Parameters: $request: mixed
get_items()
(WP_REST_Response

Retrieves a collection of themes.

Parameters: $request: mixed
prepare_item_for_response()
WP_REST_Response

Prepares a single theme output for response.

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

Prepares links for the request.

Parameters: $theme: mixed
is_same_theme()
bool

Helper function to compare two themes.

Parameters: $theme_a: mixed, $theme_b: mixed
prepare_theme_support()
mixed

Prepares the theme support value for inclusion in the REST API response.

Parameters: $support: mixed, $args: mixed, $feature: mixed, $request: mixed
get_item_schema()
array

Retrieves the theme's schema, conforming to JSON Schema.

get_collection_params()
array

Retrieves the search params for the themes collection.

sanitize_theme_status()
(array

Sanitizes and validates the list of theme status.

Parameters: $statuses: mixed, $request: mixed, $parameter: mixed

Class Information

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