Download the PHP package publishpress/wordpress-version-notices without Composer
On this page you can find all versions of the php package publishpress/wordpress-version-notices. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download publishpress/wordpress-version-notices
More information about publishpress/wordpress-version-notices
Files in publishpress/wordpress-version-notices
Package wordpress-version-notices
Short Description Library for displaying version notices for Pro plugins in WordPress.
License GPL-3.0-or-later
Informations about the package wordpress-version-notices
WordPress Version Notices
Description
Library for displaying ads for Pro plugins in WordPress.
Installation
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.
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
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
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.
Params
- 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
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:
or
Run the script:
The scripts were implemented for *nix systems. Not adapted for Windows.
License
License: GPLv3 or later
All versions of wordpress-version-notices with dependencies
publishpress/pimple-pimple Version ^3.5.0.0
publishpress/psr-container Version ^2.0.1.0