PHPackages                             publishpress/wordpress-version-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. publishpress/wordpress-version-notices

ActiveLibrary

publishpress/wordpress-version-notices
======================================

Library for displaying version notices for Pro plugins in WordPress.

2.2.0(5mo ago)017.8k↓22%[1 issues](https://github.com/publishpress/library-wordpress-version-notices/issues)GPL-3.0-or-laterPHPPHP &gt;=7.2.5CI failing

Since Mar 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/publishpress/library-wordpress-version-notices)[ Packagist](https://packagist.org/packages/publishpress/wordpress-version-notices)[ RSS](/packages/publishpress-wordpress-version-notices/feed)WikiDiscussions development Synced 1mo ago

READMEChangelog (10)Dependencies (23)Versions (24)Used By (0)

WordPress Version Notices
=========================

[](#wordpress-version-notices)

Description
-----------

[](#description)

Library for displaying ads for Pro plugins in WordPress.

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

[](#installation)

```
$ composer require publishpress/wordpress-version-notices
```

### Loading the library

[](#loading-the-library)

The library is now loaded automatically by a special include file and Versions class generated by the lib [PublishPress Version Loader Generator](https://github.com/publishpress/library-version-loader-generator).

You just need to load the vendor/autoload.php file in your plugin or theme in the main context, out of any WP hook, including `plugins_loaded`.

### Top Notice

[](#top-notice)

```
add_filter(\PublishPress\WordpressVersionNotices\Module\TopNotice\Module::SETTINGS_FILTER, function ($settings) {
    $settings['dumb-plugin-one'] = [
        'message' => 'You\'re using Dumb Plugin One Free. Please, %supgrade to pro%s.',
        'link'    => 'http://example.com/upgrade',
        'screens' => [
            [
                'base'      => 'edit',
                'id'        => 'edit-post',
                'post_type' => 'post',
            ],
        ]
    ];

    return $settings;
});
```

#### Params

[](#params)

- message: Type the respective message for the banner, adding the button text between '%s'. This string will be used as format for `sprint` .
- link: The full link for the button.
- screen: An array of screen parameters used to decide what page should display the banner. Each item of the array can be a boolean or an array with a key-value array specifying the required params from the screen (WP\_Screen) object. You can bypass the library's filter algorithm adding a `true` item to it. This allows you to create your own function to check the screen returning a boolean value.

### Menu link

[](#menu-link)

```
add_filter(\PublishPress\WordpressVersionNotices\Module\MenuLink\Module::SETTINGS_FILTER, function ($settings) {
    $settings['dumb-plugin-one'] = [
        'label' => 'Upgrade',
        'link'    => 'http://example.com/upgrade',
        'parent' => 'parent-menu-alias'
    ];

    return $settings;
});
```

If the plugin has alternative parent menus (in case some modules are disabled) you can specify a set of valid menus as parent. The first that is found as parent menu is used as the parent.

```
add_filter(\PublishPress\WordpressVersionNotices\Module\MenuLink\Module::SETTINGS_FILTER, function ($settings) {
    $settings['dumb-plugin-one'] = [
        'label' => 'Upgrade',
        'link'    => 'http://example.com/upgrade',
        'parent' => [
            'parent-menu-alias-1',
            'parent-menu-alias-2',
            'parent-menu-alias-3',
        ]
    ];

    return $settings;
});
```

#### Params

[](#params-1)

- label: Type the respective label for the menu item.
- link: The full link for the menu link.
- parent: The parent menu we should add the link. A string or an array.

Testing
-------

[](#testing)

Create a new WordPress installation dedicated for testing.

Make sure to copy the file `.env.testing.dist` as `.env.testing` and update the variables according to your environment.

Install the dependencies using composer:

```
$ composer install
```

or

```
$ composer update
```

Run the script:

```
$ composer test
```

The scripts were implemented for \*nix systems. Not adapted for Windows.

License
-------

[](#license)

License: [GPLv3 or later](http://www.gnu.org/licenses/gpl-3.0.html)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance75

Regular maintenance activity

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 96.1% 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 ~99 days

Recently: every ~230 days

Total

22

Last Release

161d ago

Major Versions

1.3.1 → 2.0.02023-04-18

PHP version history (3 changes)1.0.0PHP &gt;=5.6.20

1.2.0PHP &gt;=7.2

1.3.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/407131?v=4)[Anderson Grüdtner Martins](/maintainers/andergmartins)[@andergmartins](https://github.com/andergmartins)

---

Top Contributors

[![andergmartins](https://avatars.githubusercontent.com/u/407131?v=4)](https://github.com/andergmartins "andergmartins (148 commits)")[![rizaardiyanto1412](https://avatars.githubusercontent.com/u/83811723?v=4)](https://github.com/rizaardiyanto1412 "rizaardiyanto1412 (4 commits)")[![agapetry](https://avatars.githubusercontent.com/u/43488774?v=4)](https://github.com/agapetry "agapetry (1 commits)")[![htmgarcia](https://avatars.githubusercontent.com/u/4999794?v=4)](https://github.com/htmgarcia "htmgarcia (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/publishpress-wordpress-version-notices/health.svg)

```
[![Health](https://phpackages.com/badges/publishpress-wordpress-version-notices/health.svg)](https://phpackages.com/packages/publishpress-wordpress-version-notices)
```

PHPackages © 2026

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