[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
REST API: WP_REST_Post_Statuses_Controller class
File Size: | 373 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_REST_Post_Statuses_Controller:: (10 methods):
__construct()
register_routes()
get_items_permissions_check()
get_items()
get_item_permissions_check()
check_read_permission()
get_item()
prepare_item_for_response()
get_item_schema()
get_collection_params()
Class: WP_REST_Post_Statuses_Controller - X-Ref
Core class used to access post statuses via the REST API.__construct() X-Ref |
Constructor. since: 4.7.0 |
register_routes() X-Ref |
Registers the routes for post statuses. since: 4.7.0 |
get_items_permissions_check( $request ) X-Ref |
Checks whether a given request has permission to read post statuses. since: 4.7.0 param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access, WP_Error object otherwise. |
get_items( $request ) X-Ref |
Retrieves all post statuses, depending on user context. since: 4.7.0 param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
get_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to read a post status. since: 4.7.0 param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access for the item, WP_Error object otherwise. |
check_read_permission( $status ) X-Ref |
Checks whether a given post status should be visible. since: 4.7.0 param: object $status Post status. return: bool True if the post status is visible, otherwise false. |
get_item( $request ) X-Ref |
Retrieves a specific post status. since: 4.7.0 param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. |
prepare_item_for_response( $item, $request ) X-Ref |
Prepares a post status object for serialization. since: 4.7.0 since: 5.9.0 Renamed `$status` to `$item` to match parent class for PHP 8 named parameter support. param: stdClass $item Post status data. param: WP_REST_Request $request Full details about the request. return: WP_REST_Response Post status data. |
get_item_schema() X-Ref |
Retrieves the post status' schema, conforming to JSON Schema. since: 4.7.0 return: array Item schema data. |
get_collection_params() X-Ref |
Retrieves the query params for collections. since: 4.7.0 return: array Collection parameters. |
Generated: Sun Nov 10 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |