Property | Type | Description | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$post_type | string | Post type. | |
$public | string | Controls visibility on frontend. | |
$rest_base | string | Route base. |
Method | Description | |
---|---|---|
batch_items_permissions_check ( WP_REST_Request $request ) : boolean | Check if a given request has access batch create, update and delete items. | |
create_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Create a single item. | |
create_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to create an item. | |
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error | Delete a single item. | |
delete_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error | Check if a given request has access to delete an item. | |
get_collection_params ( ) : array | Get the query params for collections of attachments. | |
get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Get a single item. | |
get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to read an item. | |
get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Get a collection of posts. | |
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to read items. | |
update_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Update a single post. | |
update_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to update an item. |
Method | Description | |
---|---|---|
add_post_meta_fields ( WP_Post $post, WP_REST_Request $request ) : boolean | WP_Error | Add post meta fields. | |
delete_post ( WP_Post $post ) | Delete post. | |
get_allowed_query_vars ( ) : array | Get all the WP Query vars that are allowed for the API request. | |
prepare_items_query ( array $prepared_args = [], WP_REST_Request $request = null ) : array | Determine the allowed query_vars for a get_items() response and prepare for WP_Query. | |
prepare_links ( WP_Post $post, WP_REST_Request $request ) : array | Prepare links for the request. | |
update_post_meta_fields ( WP_Post $post, WP_REST_Request $request ) : boolean | WP_Error | Update post meta fields. |
protected add_post_meta_fields ( WP_Post $post, WP_REST_Request $request ) : boolean | WP_Error | ||
$post | WP_Post | |
$request | WP_REST_Request | |
return | boolean | WP_Error |
public batch_items_permissions_check ( WP_REST_Request $request ) : boolean | ||
$request | WP_REST_Request | Full details about the request. |
return | boolean |
public create_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | WP_REST_Response |
public create_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | boolean |
public delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_REST_Response | WP_Error |
public delete_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error | ||
$request | WP_REST_Request | Full details about the request. |
return | boolean | WP_Error |
protected get_allowed_query_vars ( ) : array | ||
return | array |
public get_collection_params ( ) : array | ||
return | array |
public get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | WP_REST_Response |
public get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | boolean |
public get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | WP_REST_Response |
public get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | boolean |
protected prepare_items_query ( array $prepared_args = [], WP_REST_Request $request = null ) : array | ||
$prepared_args | array | |
$request | WP_REST_Request | |
return | array | $query_args |
protected prepare_links ( WP_Post $post, WP_REST_Request $request ) : array | ||
$post | WP_Post | Post object. |
$request | WP_REST_Request | Request object. |
return | array | Links for the given post. |
public update_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | WP_REST_Response |
public update_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | boolean |
protected update_post_meta_fields ( WP_Post $post, WP_REST_Request $request ) : boolean | WP_Error | ||
$post | WP_Post | |
$request | WP_REST_Request | |
return | boolean | WP_Error |