[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/rest-api/endpoints/ -> class-wp-rest-post-types-controller.php (summary)

REST API: WP_REST_Post_Types_Controller class

File Size: 337 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

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.


register_routes()   X-Ref
Registers the routes for the objects of the controller.


get_items_permissions_check( $request )   X-Ref
Checks whether a given request has permission to read types.

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 public post types.

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( $request )   X-Ref
Retrieves a specific post type.

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( $post_type, $request )   X-Ref
Prepares a post type object for serialization.

param: WP_Post_Type    $post_type Post type object.
param: WP_REST_Request $request   Full details about the request.
return: WP_REST_Response Response object.

get_item_schema()   X-Ref
Retrieves the post type's schema, conforming to JSON Schema.

return: array Item schema data.

get_collection_params()   X-Ref
Retrieves the query params for collections.

return: array Collection parameters.



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7