PHPackages                             duckdev/wp-flash-notices - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. duckdev/wp-flash-notices

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

duckdev/wp-flash-notices
========================

WordPress admin notices as flash notice using transient API to display after page reload.

1.0.1(7y ago)41.1k3[2 issues](https://github.com/DuckDev/wp-flash-notices/issues)GPL-2.0+PHPPHP &gt;=5.4

Since Jul 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/DuckDev/wp-flash-notices)[ Packagist](https://packagist.org/packages/duckdev/wp-flash-notices)[ RSS](/packages/duckdev-wp-flash-notices/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

WP Flash Admin Notices
======================

[](#wp-flash-admin-notices)

WordPress admin notices as flash notice using transient API to display after page reload.

By default WordPress doesn't provide a solution to show admin notices after page reload. Frameworks lik CodeIgniter does have a [flash message](https://www.codeigniter.com/user_guide/libraries/sessions.html#flashdata) feature. Using which, you can show one time notices across user interface. With this simple library you can make use of WordPress' [transient API](https://codex.wordpress.org/Transients_API) and show one time admin notices like a flash message.

Installation
------------

[](#installation)

You can install this library using composer

```
composer require duckdev/wp-flash-notices

```

Or, you can download latest version of the library from [releases tab](https://github.com/DuckDev/wp-flash-notices/releases).

### Dependencies

[](#dependencies)

- PHP 5.4+
- WordPress 4.0+

Usage Example
-------------

[](#usage-example)

Import the library class and assign custom namespace.

```
use DuckDev\WP_Flash_Notices as My_Custom_Notices;
```

Create new instance of the notices class with our custom transient name.

```
$notices = new My_Custom_Notices( 'my-custom-notices' );
```

### Notice Types

[](#notice-types)

There are 4 types of notices.

#### Success Notice:

[](#success-notice)

Notice with green bar.

```
// Register new success notice to the queue.
$notices->add( 'custom-success', 'This is a custom success notice.', 'success' );
```

#### Error Notice:

[](#error-notice)

Notice with red bar.

```
// Register new error notice to the queue.
$notices->add( 'custom-error', 'This is a custom error notice.', 'error' );
```

#### Warning Notice:

[](#warning-notice)

Notice with yellow bar.

```
// Register new warning notice to the queue.
$notices->add( 'custom-warning', 'This is a custom warning notice.', 'warning' );
```

#### Info Notice:

[](#info-notice)

Notice with blue bar.

```
// Register new info notice to the queue.
$notices->add( 'custom-info', 'This is a custom info notice.', 'info' );
```

### Dismissible Notice

[](#dismissible-notice)

Show a dismiss button in notice.

```
// Register new info notice to the queue.
$notices->add( 'custom-success', 'This is a custom dismissible notice.', 'success', true );
```

### Network Admin Notice

[](#network-admin-notice)

By default all notices are shown within single site admin screens. If you have Multisite you can add network admin notices by setting last argument as true:

```
// Register new info notice to the queue.
$notices->add( 'custom-success', 'This is a custom dismissible notice.', 'success', true, true );
```

### Frontend Compatibility

[](#frontend-compatibility)

If you'd like to print the notices in the front-end, then use the below action to your template.

```
do_action( 'front_notices' );
```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

2571d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17586?v=4)[Schmidt](/maintainers/Jo)[@jo](https://github.com/jo)

---

Top Contributors

[![Joel-James](https://avatars.githubusercontent.com/u/7510463?v=4)](https://github.com/Joel-James "Joel-James (7 commits)")[![mostafasoufi](https://avatars.githubusercontent.com/u/701520?v=4)](https://github.com/mostafasoufi "mostafasoufi (2 commits)")

---

Tags

wordpresspersistentnoticestransientadmin notices

### Embed Badge

![Health badge](/badges/duckdev-wp-flash-notices/health.svg)

```
[![Health](https://phpackages.com/badges/duckdev-wp-flash-notices/health.svg)](https://phpackages.com/packages/duckdev-wp-flash-notices)
```

###  Alternatives

[humanmade/aws-ses-wp-mail

WordPress plugin to send mail via SES

188274.4k10](/packages/humanmade-aws-ses-wp-mail)[itinerisltd/wp-phpmailer

WP PHPMailer provides a clean and simple way to configure WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice.

6231.9k](/packages/itinerisltd-wp-phpmailer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
