[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-includes/rest-api/endpoints/ -> class-wp-rest-themes-controller.php (summary)

REST API: WP_REST_Themes_Controller class

File Size: 523 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_REST_Themes_Controller:: (8 methods):

Class: WP_REST_Themes_Controller  - X-Ref

Core class used to manage themes via the REST API.

__construct()   X-Ref

register_routes()   X-Ref
Registers the routes for the objects of the controller.

get_items_permissions_check( $request )   X-Ref
Checks if a given request has access to read the theme.

param: WP_REST_Request $request Full details about the request.
return: true|WP_Error True if the request has read access for the item, otherwise WP_Error object.

get_items( $request )   X-Ref
Retrieves a collection of themes.

param: WP_REST_Request $request Full details about the request.
return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.

prepare_item_for_response( $theme, $request )   X-Ref
Prepares a single theme output for response.

param: WP_Theme        $theme   Theme object.
param: WP_REST_Request $request Request object.
return: WP_REST_Response Response object.

get_item_schema()   X-Ref
Retrieves the theme's schema, conforming to JSON Schema.

return: array Item schema data.

get_collection_params()   X-Ref
Retrieves the search params for the themes collection.

return: array Collection parameters.

sanitize_theme_status( $statuses, $request, $parameter )   X-Ref
Sanitizes and validates the list of theme status.

param: string|array    $statuses  One or more theme statuses.
param: WP_REST_Request $request   Full details about the request.
param: string          $parameter Additional parameter to pass to validation.
return: array|WP_Error A list of valid statuses, otherwise WP_Error object.

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1