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

Admin

Admin Class

  • Full name: \CourierNotices\Controller\Admin\Admin

Methods

register_actions

Register Actions

public register_actions(): mixed

post_updated_messages

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


manage_posts_columns

Add custom columns.

public manage_posts_columns(array $columns): array

Parameters:

Parameter Type Description
$columns array The post columns.

manage_posts_custom_column

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.

admin_notices

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

admin_enqueue_scripts

Enqueue our admin scripts.

public admin_enqueue_scripts(string $hook): mixed

Parameters:

Parameter Type Description
$hook string The hook.

admin_enqueue_styles

Enqueue our admin styles.

public admin_enqueue_styles(string $hook): mixed

Parameters:

Parameter Type Description
$hook string The hook.

get_timestamp

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.

filter_courier_notices

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 from source code comments on 2023-02-22 using phpDocumentor and saggre/phpdocumentor-markdown