WPDev.one
Core Class

WP_REST_Global_Styles_Controller

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

Base Global Styles REST API Controller.

Methods 18 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $post_type: mixed
register_routes()
void

Registers the controllers routes.

_sanitize_global_styles_callback()
string

Sanitize the global styles ID or stylesheet to decode endpoint.

Parameters: $id_or_stylesheet: mixed
get_post()
(WP_Post

Get the post, if the ID is valid.

Parameters: $id: mixed
get_item_permissions_check()
(true

Checks if a given request has access to read a single global style.

Parameters: $request: mixed
check_read_permission()
bool

Checks if a global style can be read.

Parameters: $post: mixed
update_item_permissions_check()
(true

Checks if a given request has access to write a single global styles config.

Parameters: $request: mixed
prepare_item_for_database()
(stdClass

Prepares a single global styles config for update.

Parameters: $request: mixed
prepare_item_for_response()
WP_REST_Response

Prepare a global styles config output for response.

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

Prepares links for the request.

Parameters: $id: mixed
get_available_actions()
array

Get the link relations available for the post and current user.

Parameters: $post: mixed, $request: mixed
get_collection_params()
array

Retrieves the query params for the global styles collection.

get_item_schema()
array

Retrieves the global styles type' schema, conforming to JSON Schema.

get_theme_item_permissions_check()
(true

Checks if a given request has access to read a single theme global styles config.

Parameters: $request: mixed
get_theme_item()
(WP_REST_Response

Returns the given theme global styles config.

Parameters: $request: mixed
get_theme_items_permissions_check()
(true

Checks if a given request has access to read a single theme global styles config.

Parameters: $request: mixed
get_theme_items()
(WP_REST_Response

Returns the given theme global styles variations.

Parameters: $request: mixed
validate_custom_css()
(true

Validate style.css as valid CSS.

Parameters: $css: mixed

Properties

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

Class Information

Source File
wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
Advertisement