$dismiss
$dismiss :\WPTRT\AdminNotices\Dismiss
An instance of the \WPTRT\AdminNotices\Dismiss object.
The Admin_Notice class, responsible for creating admin notices.
Each notice is a new instance of the object.
$dismiss :\WPTRT\AdminNotices\Dismiss
An instance of the \WPTRT\AdminNotices\Dismiss object.
__construct(string $id,string $title,string $message,array $options = array())
Constructor.
string | $id | A unique ID for this notice. Can contain lowercase characters and underscores. |
string | $title | The title for our notice. |
string | $message | The message for our notice. |
array | $options | An array of additional options to change the defaults for this notice. [ 'screens' => (array) An array of screens where the notice will be displayed. Leave empty to always show. Defaults to an empty array. 'scope' => (string) Can be "global" or "user". Determines if the dismissed status will be saved as an option or user-meta. Defaults to "global". 'type' => (string) Can be one of "info", "success", "warning", "error". Defaults to "info". 'alt_style' => (bool) Whether we want to use alt styles or not. Defaults to false. 'capability' => (string) The user capability required to see the notice. Defaults to "edit_theme_options". 'option_prefix' => (string) The prefix that will be used to build the option (or post-meta) name. Can contain lowercase latin letters and underscores. ]. |