-
Notifications
You must be signed in to change notification settings - Fork 0
Admin
github-actions[bot] edited this page Aug 26, 2024
·
12 revisions
Admin Class
- Full name:
\CourierNotices\Controller\Admin\Admin
Register Actions
public register_actions(): mixed
Override the publish message to not show a link to the notice
public post_updated_messages(array $messages): array
Parameters:
Parameter | Type | Description |
---|---|---|
$messages |
array | Array of post type messages |
Return Value:
Array of messages
Add custom columns.
public manage_posts_columns(array $columns): array
Parameters:
Parameter | Type | Description |
---|---|---|
$columns |
array | The post columns. |
Populate custom columns.
public manage_posts_custom_column(array $column, int $post_id): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$column |
array | The column. |
$post_id |
int | The post ID. |
When a non global notice is being viewed that has been dismissed, alert the user that the person will not see this notice because it has been dismissed.
public admin_notices(): mixed
Enqueue our admin scripts.
public admin_enqueue_scripts(string $hook): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$hook |
string | The hook. |
Enqueue our admin styles.
public admin_enqueue_styles(string $hook): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$hook |
string | The hook. |
Get a timestamp based on a date and duration The duration should be the number of months
private get_timestamp(string $date, string $duration): int
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
string | The date to get the timestamp for. |
$duration |
string | The duration. |
Throws:
If anything goes wrong.
Allow for filtering of notices
public filter_courier_notices(string $post_type, string $which): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$post_type |
string | The post type. |
$which |
string | Which notice. |
Automatically generated on 2024-08-26