Notices extends Notices
Extends the WPTRT Notices class to allow additional HTML in the admin notice.
Tags
Table of Contents
- $notices : array<string|int, mixed>
 - An array of notices.
 - __construct() : mixed
 - add() : void
 - Add a notice.
 - boot() : void
 - Adds actions for the notices.
 - filter_allowed_html() : mixed
 - get() : Notice|null
 - Get a single notice.
 - get_all() : array<string|int, mixed>
 - Get all notices.
 - print_scripts() : void
 - Prints scripts for the notices.
 - remove() : void
 - Remove a notice.
 - the_notices() : void
 - Prints the notice.
 
Properties
$notices
An array of notices.
    private
        array<string|int, mixed>
    $notices
     = []
    
    
    
    Tags
Methods
__construct()
    public
                __construct() : mixed
        
    
    
        Return values
mixed —add()
Add a notice.
    public
                add(string $id, string $title, string $message[, array<string|int, mixed> $options = [] ]) : void
    
        Parameters
- $id : string
 - 
                    
A unique ID for this notice. Can contain lowercase characters and underscores.
 - $title : string
 - 
                    
The title for our notice.
 - $message : string
 - 
                    
The message for our notice.
 - $options : array<string|int, mixed> = []
 - 
                    
An array of additional options to change the defaults for this notice. See Notice::__constructor() for details.
 
Tags
Return values
void —boot()
Adds actions for the notices.
    public
                boot() : void
    
    
    
    Tags
Return values
void —filter_allowed_html()
    public
            static    filter_allowed_html(mixed $allowed_html) : mixed
        
        Parameters
- $allowed_html : mixed
 
Return values
mixed —get()
Get a single notice.
    public
                get(string $id) : Notice|null
    
        Parameters
- $id : string
 - 
                    
The unique ID of the notice we want to retrieve.
 
Tags
Return values
Notice|null —get_all()
Get all notices.
    public
                get_all() : array<string|int, mixed>
    
    
    
    Tags
Return values
array<string|int, mixed> —print_scripts()
Prints scripts for the notices.
    public
                print_scripts() : void
    
    
    
    Tags
Return values
void —remove()
Remove a notice.
    public
                remove(string $id) : void
    
        Parameters
- $id : string
 - 
                    
The unique ID of the notice we want to remove.
 
Tags
Return values
void —the_notices()
Prints the notice.
    public
                the_notices() : void