WP_REST_Global_Styles_Controller::get_item() WordPress Method
The WP_REST_Global_Styles_Controller::get_item() method is used to retrieve a global style.
WP_REST_Global_Styles_Controller::get_item( WP_REST_Request $request ) #
Returns the given global styles config.
Parameters
- $request
(WP_REST_Request)(Required)The request instance.
Return
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
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 ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |