Property | Type | Description | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$post_type | string | Post type. | |
$rest_base | string | Route base. |
Method | Description | |
---|---|---|
__construct ( ) | Initialize Webhooks actions. | |
create_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Create a single webhook. | |
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error | Delete a single webhook. | |
get_collection_params ( ) : array | Get the query params for collections of attachments. | |
get_item_schema ( ) : array | Get the Webhook's schema, conforming to JSON Schema. | |
prepare_item_for_response ( $post, WP_REST_Request $request ) : WP_REST_Response | Prepare a single webhook output for response. | |
query_args ( array $args, WP_REST_Request $request ) : array | Query args. | |
register_routes ( ) | Register the routes for webhooks. | |
update_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Update a single webhook. |
Method | Description | |
---|---|---|
prepare_item_for_database ( WP_REST_Request $request ) : WP_Error | stdClass | Prepare a single webhook for create or update. |
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 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 get_collection_params ( ) : array | ||
return | array |
public get_item_schema ( ) : array | ||
return | array |
protected prepare_item_for_database ( WP_REST_Request $request ) : WP_Error | stdClass | ||
$request | WP_REST_Request | Request object. |
return | WP_Error | stdClass | $data Post object. |
public prepare_item_for_response ( $post, WP_REST_Request $request ) : WP_REST_Response | ||
$request | WP_REST_Request | Request object. |
return | WP_REST_Response | $response Response data. |
public query_args ( array $args, WP_REST_Request $request ) : array | ||
$args | array | |
$request | WP_REST_Request | |
return | array |
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 |