[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
REST API: WP_REST_Post_Types_Controller class
File Size: | 397 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_REST_Post_Types_Controller:: (8 methods):
__construct()
register_routes()
get_items_permissions_check()
get_items()
get_item()
prepare_item_for_response()
get_item_schema()
get_collection_params()
Class: WP_REST_Post_Types_Controller - X-Ref
Core class to access post types via the REST API.__construct() X-Ref |
Constructor. since: 4.7.0 |
register_routes() X-Ref |
Registers the routes for post types. since: 4.7.0 |
get_items_permissions_check( $request ) X-Ref |
Checks whether a given request has permission to read types. 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. since: 4.7.0 |
get_items( $request ) X-Ref |
Retrieves all public post types. 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. since: 4.7.0 |
get_item( $request ) X-Ref |
Retrieves a specific post type. 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. since: 4.7.0 |
prepare_item_for_response( $item, $request ) X-Ref |
Prepares a post type object for serialization. return: WP_REST_Response Response object. param: WP_Post_Type $item Post type object. param: WP_REST_Request $request Full details about the request. since: 4.7.0 since: 5.9.0 Renamed `$post_type` to `$item` to match parent class for PHP 8 named parameter support. |
get_item_schema() X-Ref |
Retrieves the post type's schema, conforming to JSON Schema. return: array Item schema data. since: 4.7.0 since: 4.8.0 The `supports` property was added. since: 5.9.0 The `visibility` and `rest_namespace` properties were added. |
get_collection_params() X-Ref |
Retrieves the query params for collections. return: array Collection parameters. since: 4.7.0 |
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |