Skip to content
linchpin edited this page Feb 22, 2023 · 10 revisions

Data

Data Class

  • Full name: \CourierNotices\Model\Courier_Notice\Data

Methods

__construct

Data constructor

public __construct(): mixed

get_global_notices

Query global notices. Cache appropriately

public get_global_notices(array $args = array()): array|bool|mixed

Parameters:

Parameter Type Description
$args array array of arguments.

get_dismissible_global_notices

Get our dismissible global notices

public get_dismissible_global_notices(array $args = array(), array $ajax_post_data = array(), bool $ids_only = false): array|bool|mixed

Parameters:

Parameter Type Description
$args array Query Args.
$ajax_post_data array Ajax data passed to manipulate the query.
$ids_only bool Whether to return only IDs.

get_persistent_global_notices

Query not dismissible global notices. Cache appropriately.

public get_persistent_global_notices(array $args = array(), mixed $global_notices = array()): array|bool|mixed

Parameters:

Parameter Type Description
$args array Array of arguments.
$global_notices mixed

get_notices

Get Courier all notices.

public get_notices(array $args = array(), array $ajax_post_data = array()): array

Parameters:

Parameter Type Description
$args array Array of arguments.
$ajax_post_data array Array of data to customize the response

get_global_dismissed_notices

Get a user's dismissed global notices

public get_global_dismissed_notices(int $user_id): array|void

Parameters:

Parameter Type Description
$user_id int The ID of the user to get notices for.

get_user_notices

public get_user_notices(array $args = array()): array

Parameters:

Parameter Type Description
$args array

get_notice_meta

Get all the relevant meta associated with a notice

public get_notice_meta(int $courier_notice_id): mixed

Parameters:

Parameter Type Description
$courier_notice_id int PostID of the Notice


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