Свойство | Тип | Описание | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$post_type | string | Post type. | |
$rest_base | string | Route base. |
Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
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. |
Результат | 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. |
Результат | WP_REST_Response | WP_Error |
public get_collection_params ( ) : array | ||
Результат | array |
public get_item_schema ( ) : array | ||
Результат | array |
protected prepare_item_for_database ( WP_REST_Request $request ) : WP_Error | stdClass | ||
$request | WP_REST_Request | Request object. |
Результат | 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. |
Результат | WP_REST_Response | $response Response data. |
public query_args ( array $args, WP_REST_Request $request ) : array | ||
$args | array | |
$request | WP_REST_Request | |
Результат | array |
public update_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
Результат | WP_Error | WP_REST_Response |