final class Admin_Notices

Utility functions class to hold useful chunks of code we find ourselves often reusing.

Constants

NOTICE_QUEUE_TRANSIENT

Methods

static 
add_notice(Admin_Notice $Notice)

Add an Admin Notice to the global queue.

static 
success(string $message)

A function to queue a success admin notice.

static 
info(string $message)

A function to queue an info admin notice.

static 
warning(string $message)

A function to queue a warning admin notice.

static 
error(string $message)

A function to queue an error warning admin notice.

static 
print_notices()

Print all of the Admin Notices and remove the transient.

Details

at line 35
final static add_notice(Admin_Notice $Notice)

Add an Admin Notice to the global queue.

Parameters

Admin_Notice $Notice

The Admin Notice to be added to the queue.

at line 51
final static success(string $message)

A function to queue a success admin notice.

Parameters

string $message

The message to display a success notice for.

at line 60
final static info(string $message)

A function to queue an info admin notice.

Parameters

string $message

The message to display an info notice for.

at line 69
final static warning(string $message)

A function to queue a warning admin notice.

Parameters

string $message

The message to display a warning notice for.

at line 78
final static error(string $message)

A function to queue an error warning admin notice.

Parameters

string $message

The message to display an error notice for.

at line 85
final static print_notices()

Print all of the Admin Notices and remove the transient.