Class WP_REST_Controller
Direct known subclasses
Indirect known subclasses
Methods summary
public
|
|
public
WP_Error|boolean
|
#
get_items_permissions_check( WP_REST_Request $request )
Check if a given request has access to get items. |
public
WP_Error|WP_REST_Response
|
|
public
WP_Error|boolean
|
#
get_item_permissions_check( WP_REST_Request $request )
Check if a given request has access to get a specific item. |
public
WP_Error|WP_REST_Response
|
|
public
WP_Error|boolean
|
#
create_item_permissions_check( WP_REST_Request $request )
Check if a given request has access to create items. |
public
WP_Error|WP_REST_Response
|
|
public
WP_Error|boolean
|
#
update_item_permissions_check( WP_REST_Request $request )
Check if a given request has access to update a specific item. |
public
WP_Error|WP_REST_Response
|
|
public
WP_Error|boolean
|
#
delete_item_permissions_check( WP_REST_Request $request )
Check if a given request has access to delete a specific item. |
public
WP_Error|WP_REST_Response
|
|
protected
WP_Error|object
|
#
prepare_item_for_database( WP_REST_Request $request )
Prepare the item for create or update operation. |
public
WP_REST_Response
|
#
prepare_item_for_response( mixed $item, WP_REST_Request $request )
Prepare the item for the REST response. |
public
array
|
#
prepare_response_for_collection( WP_REST_Response $response )
Prepare a response for inserting into a collection. |
public
array
|
#
filter_response_by_context( array $data, string $context )
Filter a response based on the context defined in the schema. |
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
protected
array
|
#
add_additional_fields_to_object( array $object, WP_REST_Request $request )
Add the values from additional fields to a data object. |
protected
|
#
update_additional_fields_for_object( array $object, WP_REST_Request $request )
Update the values of additional fields added to a data object. |
protected
|
#
add_additional_fields_schema( array $schema )
Add the schema from additional fields to an schema array. |
protected
array
|
#
get_additional_fields( string $object_type = null )
Get all the registered additional fields for a given object-type. |
protected
string
|
|
public
array
|
#
get_endpoint_args_for_item_schema( string $method = WP_REST_Server::CREATABLE )
Get an array of endpoint arguments from the item schema for the controller. |
public
WP_Post|null
|
Properties summary
protected
string
|
$namespace
The namespace of this controller's route. |
|
protected
string
|
$rest_base
The base of this controller's route. |