Skip to content

laraish/admin-notice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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');

About

A simple helper for admin notice on WordPress admin pages.

Resources

Stars

Watchers

Forks

Packages

No packages published