Property | Type | Description | |
---|---|---|---|
$attribute | string | Attribute name. | |
$namespace | string | Endpoint namespace. | |
$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_REST_Request | WP_Error | Create a single attribute. | |
create_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to create a attribute. | |
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error | Delete a single attribute. | |
delete_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to delete a attribute. | |
get_collection_params ( ) : array | Get the query params for collections | |
get_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error | Get a single attribute. | |
get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to read a attribute. | |
get_item_schema ( ) : array | Get the Attribute's schema, conforming to JSON Schema. | |
get_items ( WP_REST_Request $request ) : array | Get all attributes. | |
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to read the attributes. | |
prepare_item_for_response ( obj $item, WP_REST_Request $request ) : WP_REST_Response | Prepare a single product attribute output for response. | |
register_routes ( ) | Register the routes for product attributes. | |
update_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error | Update a single term from a taxonomy. | |
update_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to update a attribute. |
Method | Description | |
---|---|---|
get_attribute ( integer $id ) : stdClass | WP_Error | Get attribute data. | |
get_taxonomy ( WP_REST_Request $request ) : string | Get attribute name. | |
prepare_links ( object $attribute ) : array | Prepare links for the request. | |
validate_attribute_slug ( string $slug, boolean $new_data = true ) : boolean | WP_Error | Validate attribute slug. |
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_REST_Request | WP_Error | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_REST_Request | WP_Error |
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 ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_Error | boolean |
protected get_attribute ( integer $id ) : stdClass | WP_Error | ||
$id | integer | Attribute ID. |
return | stdClass | WP_Error |
public get_collection_params ( ) : array | ||
return | array |
public get_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_REST_Request | WP_Error |
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_item_schema ( ) : array | ||
return | array |
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 get_taxonomy ( WP_REST_Request $request ) : string | ||
$request | WP_REST_Request | Full details about the request. |
return | string |
public prepare_item_for_response ( obj $item, WP_REST_Request $request ) : WP_REST_Response | ||
$item | obj | Term object. |
$request | WP_REST_Request | |
return | WP_REST_Response | $response |
protected prepare_links ( object $attribute ) : array | ||
$attribute | object | Attribute object. |
return | array | Links for the given attribute. |
public register_routes ( ) |
public update_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error | ||
$request | WP_REST_Request | Full details about the request. |
return | WP_REST_Request | WP_Error |
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 |