Method | Description | |
---|---|---|
__construct ( ) | Constructor. | |
get_collection_params ( ) : array | Get the query params for collections of plugins. | |
get_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error | Retrieve activity. | |
get_item_permissions_check ( WP_REST_Request $request ) : boolean | Check if a given request has access to get information about a specific activity. | |
get_item_schema ( ) : array | Get the plugin schema, conforming to JSON Schema. | |
get_items ( WP_REST_Request $request ) : WP_REST_Request | Retrieve activities. | |
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check if a given request has access to activity items. | |
prepare_item_for_response ( stdClass $activity, WP_REST_Request $request, boolean $is_raw = false ) : WP_REST_Response | Prepares activity data for return as an object. | |
register_routes ( ) | Register the plugin routes. |
Method | Description | |
---|---|---|
prepare_date_response ( string $date_gmt, string | null $date = null ) : string | null | Convert the input date to RFC3339 format. | |
prepare_links ( array $activity ) : array | Prepare links for the request. |
public get_collection_params ( ) : array | ||
return | array |
public get_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error | ||
$request | WP_REST_Request | |
return | WP_REST_Request | WP_Error | Plugin object data on success, WP_Error otherwise. |
public get_item_permissions_check ( WP_REST_Request $request ) : boolean | ||
$request | WP_REST_Request | Full data about the request. |
return | boolean |
public get_item_schema ( ) : array | ||
return | array |
public get_items ( WP_REST_Request $request ) : WP_REST_Request | ||
$request | WP_REST_Request | |
return | WP_REST_Request | List of activity object data. |
public get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full data about the request. |
return | WP_Error | boolean |
public prepare_item_for_response ( stdClass $activity, WP_REST_Request $request, boolean $is_raw = false ) : WP_REST_Response | ||
$activity | stdClass | Activity data. |
$request | WP_REST_Request | |
$is_raw | boolean | Optional, not used. Defaults to false. |
return | WP_REST_Response |
protected prepare_links ( array $activity ) : array | ||
$activity | array | Activity. |
return | array | Links for the given plugin. |