laraish / admin-notice
A simple helper for admin notice on WordPress admin pages.
v4.0.0
2025-08-17 00:53 UTC
Requires
- php: ^8.2
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');