[ 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: | 551 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_REST_Global_Styles_Revisions_Controller:: (12 methods):
__construct()
register_routes()
get_collection_params()
get_decoded_global_styles_json()
get_items()
get_item()
get_revision()
prepare_date_response()
prepare_item_for_response()
get_item_schema()
get_item_permissions_check()
get_parent()
Class: WP_REST_Global_Styles_Revisions_Controller - X-Ref
Core class used to access global styles revisions via the REST API.__construct() X-Ref |
Constructor. |
register_routes() X-Ref |
Registers the controller's routes. |
get_collection_params() X-Ref |
Retrieves the query params for collections. Inherits from WP_REST_Controller::get_collection_params(), also reflects changes to return value WP_REST_Revisions_Controller::get_collection_params(). return: array Collection parameters. |
get_decoded_global_styles_json( $raw_json ) X-Ref |
Returns decoded JSON from post content string, or a 404 if not found. return: Array|WP_Error param: string $raw_json Encoded JSON from global styles custom post content. |
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. return: WP_REST_Response|WP_Error param: WP_REST_Request $request The request instance. |
get_item( $request ) X-Ref |
Retrieves one global styles revision from the collection. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. param: WP_REST_Request $request Full details about the request. |
get_revision( $id ) X-Ref |
Gets the global styles revision, if the ID is valid. return: WP_Post|WP_Error Revision post object if ID is valid, WP_Error otherwise. param: int $id Supplied ID. |
prepare_date_response( $date_gmt, $date = null ) X-Ref |
Checks the post_date_gmt or modified_gmt and prepare any post or modified date for single post output. Duplicate of WP_REST_Revisions_Controller::prepare_date_response. return: string|null ISO8601/RFC3339 formatted datetime, otherwise null. param: string $date_gmt GMT publication time. param: string|null $date Optional. Local publication time. Default null. |
prepare_item_for_response( $post, $request ) X-Ref |
Prepares the revision for the REST response. return: WP_REST_Response|WP_Error Response object. param: WP_Post $post Post revision object. param: WP_REST_Request $request Request object. |
get_item_schema() X-Ref |
Retrieves the revision's schema, conforming to JSON Schema. return: array Item schema data. |
get_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to read a single global style. return: true|WP_Error True if the request has read access, WP_Error object otherwise. param: WP_REST_Request $request Full details about the request. |
get_parent( $parent_post_id ) X-Ref |
Gets the parent post, if the ID is valid. Duplicate of WP_REST_Revisions_Controller::get_parent. return: WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise. param: int $parent_post_id Supplied ID. |
Generated : Sat Apr 27 08:20:02 2024 | Cross-referenced by PHPXref |