Skip to content
Snippets Groups Projects
Commit baa49550 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

init

parent 231a4e55
No related branches found
No related tags found
No related merge requests found
Pipeline #6234 passed with warnings
......@@ -20,7 +20,7 @@
"wimg/php-compatibility": "^8"
},
"autoload": {
"psr-4": {"WPDesk\\Notice\\": "src/"}
"psr-4": {"WPDesk\\Notice\\": "src/WPDesk/Notice"}
},
"autoload-dev": {
},
......
File moved
File moved
......@@ -49,13 +49,14 @@ class Notice
* @param string $noticeType Notice type.
* @param string $noticeContent Notice content.
* @param bool $isDismissible Is dismissible.
* @param int $priority Notice priority.
*/
public function __construct($noticeType, $noticeContent, $isDismissible = false)
public function __construct($noticeType, $noticeContent, $isDismissible = false, $priority = 10)
{
$this->noticeType = $noticeType;
$this->noticeContent = $noticeContent;
$this->isDismissible = $isDismissible;
add_action('admin_notices', [$this, 'showNotice']);
add_action('admin_notices', [$this, 'showNotice'], $priority);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment