WP_REST_Global_Styles_Controller::get_item()publicWP 5.9.0

Returns the given global styles config.

{} It's a method of the class: WP_REST_Global_Styles_Controller{}

No Hooks.

Return

WP_REST_Response|WP_Error.

Usage

$WP_REST_Global_Styles_Controller = new WP_REST_Global_Styles_Controller();
$WP_REST_Global_Styles_Controller->get_item( $request );
$request(WP_REST_Request) (required)
The request instance.

Changelog

Since 5.9.0 Introduced.

Code of WP_REST_Global_Styles_Controller::get_item() WP 6.0

public function get_item( $request ) {
	$post = $this->get_post( $request['id'] );
	if ( is_wp_error( $post ) ) {
		return $post;
	}

	return $this->prepare_item_for_response( $post, $request );
}