Свойство | Тип | Описание | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$rest_base | string | Route base. |
Метод | Описание | |
---|---|---|
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 tax. | |
create_item_permissions_check ( WP_REST_Request $request ) : boolean | Check if a given request has access create taxes. | |
delete_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Delete a single tax. | |
delete_item_permissions_check ( WP_REST_Request $request ) : boolean | Check if a given request has access delete a tax. | |
get_collection_params ( ) : array | Get the query params for collections. | |
get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Get a single tax. | |
get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to read a tax. | |
get_item_schema ( ) : array | Get the Taxes schema, conforming to JSON Schema. | |
get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Get all taxes. | |
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check whether a given request has permission to read taxes. | |
prepare_item_for_response ( stdClass $tax, WP_REST_Request $request ) : WP_REST_Response | Prepare a single tax output for response. | |
register_routes ( ) | Register the routes for taxes. | |
update_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Update a single tax. | |
update_item_permissions_check ( WP_REST_Request $request ) : boolean | Check if a given request has access update a tax. |
Метод | Описание | |
---|---|---|
create_or_update_tax ( WP_REST_Request $request, stdClass | null $current = null ) : stdClass | Take tax data from the request and return the updated or newly created rate. | |
prepare_links ( stdClass $tax ) : array | Prepare links for the request. |
public batch_items_permissions_check ( WP_REST_Request $request ) : boolean | ||
$request | WP_REST_Request | Full details about the request. |
Результат | boolean |
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 create_item_permissions_check ( WP_REST_Request $request ) : boolean | ||
$request | WP_REST_Request | Full details about the request. |
Результат | boolean |
protected create_or_update_tax ( WP_REST_Request $request, stdClass | null $current = null ) : stdClass | ||
$request | WP_REST_Request | Full details about the request. |
$current | stdClass | null | Existing tax object. |
Результат | stdClass |
public delete_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_permissions_check ( WP_REST_Request $request ) : boolean | ||
$request | WP_REST_Request | Full details about the request. |
Результат | boolean |
public get_collection_params ( ) : array | ||
Результат | array |
public get_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 get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
Результат | WP_Error | boolean |
public get_item_schema ( ) : array | ||
Результат | array |
public get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
Результат | 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. |
Результат | WP_Error | boolean |
public prepare_item_for_response ( stdClass $tax, WP_REST_Request $request ) : WP_REST_Response | ||
$tax | stdClass | Tax object. |
$request | WP_REST_Request | Request object. |
Результат | WP_REST_Response | $response Response data. |
protected prepare_links ( stdClass $tax ) : array | ||
$tax | stdClass | Tax object. |
Результат | array | Links for the given tax. |
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 |
public update_item_permissions_check ( WP_REST_Request $request ) : boolean | ||
$request | WP_REST_Request | Full details about the request. |
Результат | boolean |