laraish / admin-notice
A simple helper for admin notice on WordPress admin pages.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/laraish/admin-notice
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');