laraish / admin-notice
A simple helper for admin notice on WordPress admin pages.
v2.0.0
2023-12-05 07:17 UTC
Requires
- php: ^8.1
README
This is a simple helper lib for sending notice in WordPress admin pages.
Usage
Before you can use it be sure init it by:
use Laraish\AdminNotice\AdminNotice; AdminNotice::init();
Basic
AdminNotice::success('Task Completed!');
Other type of notices
- success
- error
- warning
- info
Dismissible Notice
The second parameter determine if the notice has a 'dismiss' button.
AdminNotice::success('Task Completed!', true);
Persistent Notice
To make the notice showing persistently, passing a notice id to the method.
AdminNotice::success('Task Completed!', true, 'your-unique-notice-id');