| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
REST API: WP_REST_Global_Styles_Revisions_Controller class
| File Size: | 428 lines (13 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
WP_REST_Global_Styles_Revisions_Controller:: (7 methods):
__construct()
register_routes()
get_decoded_global_styles_json()
get_items()
prepare_item_for_response()
get_item_schema()
get_collection_params()
Class: WP_REST_Global_Styles_Revisions_Controller - X-Ref
Core class used to access global styles revisions via the REST API.| __construct( $parent_post_type = 'wp_global_styles' ) X-Ref |
| Constructor. param: string $parent_post_type Post type of the parent. |
| register_routes() X-Ref |
| Registers the controller's routes. |
| get_decoded_global_styles_json( $raw_json ) X-Ref |
| Returns decoded JSON from post content string, or a 404 if not found. param: string $raw_json Encoded JSON from global styles custom post content. return: Array|WP_Error |
| get_items( $request ) X-Ref |
| Returns paginated revisions of the given global styles config custom post type. The bulk of the body is taken from WP_REST_Revisions_Controller->get_items, but global styles does not require as many parameters. param: WP_REST_Request $request The request instance. return: WP_REST_Response|WP_Error |
| prepare_item_for_response( $post, $request ) X-Ref |
| Prepares the revision for the REST response. param: WP_Post $post Post revision object. param: WP_REST_Request $request Request object. return: WP_REST_Response|WP_Error Response object. |
| get_item_schema() X-Ref |
| Retrieves the revision's schema, conforming to JSON Schema. return: array Item schema data. |
| get_collection_params() X-Ref |
| Retrieves the query params for collections. Removes params that are not supported by global styles revisions. return: array Collection parameters. |
| Generated : Tue May 5 08:20:14 2026 | Cross-referenced by PHPXref |