Skip to content

Courier_REST_Controller

linchpin edited this page Feb 22, 2023 · 10 revisions

Courier_REST_Controller

Class Courier_REST_Controller

  • Full name: \CourierNotices\Controller\Courier_REST_Controller
  • Parent class: WP_REST_Controller

Methods

register_actions

public register_actions(): mixed

register_routes

Register the routes for the objects of the controller.

public register_routes(): mixed

get_notice

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.

dismiss_notice

Disable a notice in the front end.

public dismiss_notice( $request): \WP_REST_Response

Parameters:

Parameter Type Description
$request **** WP_REST_Request

get_dismiss_notice_permissions_check

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_notices

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.

get_notice_permissions_check

Check if a given request has access to get items

public get_notice_permissions_check(): \WP_Error|bool

get_item_permissions_check

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_item_for_response

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_collection_params

Get the query params for collections

public get_collection_params(): array


Automatically generated from source code comments on 2023-02-22 using phpDocumentor and saggre/phpdocumentor-markdown