This is a simple helper lib for sending notice in WordPress admin pages.
Before you can use it be sure init it by:
use Laraish\AdminNotice\AdminNotice;
AdminNotice::init();
AdminNotice::success('Task Completed!');
Other type of notices
- success
- error
- warning
- info
The second parameter determine if the notice has a 'dismiss' button.
AdminNotice::success('Task Completed!', true);
To make the notice showing persistently, passing a notice id to the method.
AdminNotice::success('Task Completed!', true, 'your-unique-notice-id');