-
Notifications
You must be signed in to change notification settings - Fork 0
Courier_REST_Controller
github-actions[bot] edited this page Aug 26, 2024
·
12 revisions
Class Courier_REST_Controller
- Full name:
\CourierNotices\Controller\Courier_REST_Controller
- Parent class:
WP_REST_Controller
public register_actions(): mixed
Register the routes for the objects of the controller.
public register_routes(): mixed
Get a single notice
public get_notice(\WP_REST_Request $request): \WP_Error|\WP_REST_Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\WP_REST_Request | Full data about the request. |
Disable a notice in the front end.
public dismiss_notice(mixed $request): \WP_REST_Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
mixed | WP_REST_Request |
Check if a given request has access to get items
public get_dismiss_notice_permissions_check(\WP_REST_Request $request): \WP_Error|bool
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\WP_REST_Request | Full data about the request. |
Display all notices on the frontend based on our logic
public display_notices(\WP_REST_Request $request): \WP_Error|\WP_REST_Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\WP_REST_Request | Full data about the request. |
Check if a given request has access to get items
public get_notice_permissions_check(): \WP_Error|bool
Check if a given request has access to get a specific item
public get_item_permissions_check(\WP_REST_Request $request): \WP_Error|bool
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\WP_REST_Request | Full data about the request. |
Prepare the item for the REST response
public prepare_item_for_response(mixed $item, \WP_REST_Request $request): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$item |
mixed | WordPress representation of the item. |
$request |
\WP_REST_Request | Request object. |
Get the query params for collections
public get_collection_params(): array
Automatically generated on 2024-08-26