Skip to content
Snippets Groups Projects
Select Git revision
  • d5c710097bef73d33993e1ba3fd486879c1dc974
  • master default protected
  • bugfix/wordpress-review
  • fix/duplicate
  • bugfix/get_current_screen_fail
  • feature/dismiss-nonce
  • replace-dodgy-path
  • bugfix/notice-not-show
  • devel
  • 3.3.0
  • 3.2.5
  • 3.2.4
  • 3.2.3
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.2.0-beta7
  • 3.2.0-beta6
  • 3.2.0-beta5
  • 3.2.0-beta4
  • 3.2.0-beta3
  • 3.2.0-beta2
  • 3.2.0-beta1
  • 3.1.4
  • 3.1.4-beta1
  • 3.1.3
  • 3.1.1
  • 3.1
  • 3.0
29 results

wp-notice

Grzegorz Rola's avatar
Grzegorz Rola authored
d5c71009
History

pipeline status coverage report

WordPress Library to display notices in admin area.

wp-notice is a simple library for WordPress plugins to display notices in admin area.

This library can display simple notices (error, warning, success, info) and dismissible notices. It also handles dismiss functionality with AJAX requests.

Requirements

PHP 5.5 or later.

Composer

You can install the bindings via Composer. Run the following command:

composer require wpdesk/wp-notice:^1.0

To use the bindings, use Composer's autoload:

require_once 'vendor/autoload.php';

Getting Started

Simple usage looks like:

$notice = new Notice(Notice::NOTICE_TYPE_INFO, 'Notice text goes here', false); 

Notice must be used before WordPress action admin_notices. WordPress admin actions order is listed here.