Download the PHP package ignitekit/wp-notices without Composer
On this page you can find all versions of the php package ignitekit/wp-notices. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ignitekit/wp-notices
More information about ignitekit/wp-notices
Files in ignitekit/wp-notices
Package wp-notices
Short Description Easy to use dashboard notices manager for WordPress
License GPL-2.0-or-later
Informations about the package wp-notices
WP Notices
Easy to use notices management library for WordPress that implements WordPress notices
The library creates all the necessary stuff and ajax handling for dismissing the notices and also offers manual dismissing through code.
Quick Start
1. How to install the library
2. How to use NoticesManager
class
The class IgniteKit\WP\Notices\NoticesManager
is the one that need to be used in order to add new notices as follows:
3. List of methods available in NoticesManager
for adding notices.
There are several methods available in the IgniteKit\WP\Notices\NoticesManager
for adding notices.
Every mehtod of those returns IgniteKit\WP\Notices\Notice
instance. This is basically the notice class.
Method add_success()
Method add_error()
Method add_info()
Method add_warning()
Method add_custom()
Method get_notice_by_id()
Method get_notice()
4. List of methods available in Notice
instance that is returned after notice is added.
There are several methods available in the IgniteKit\WP\Notices\Notice
class. You can manually dismiss or reset the
notice, also check if the notice is dismissed.
Method is_dismissed()
Method dismiss()
Method reset()
5. File templates
The plugin supports file templates instead of simple string messages.
To display notice from a file template, you can provide a path to it with the file://
prefix as follows: