Download the PHP package wp-media/plugin-family without Composer
On this page you can find all versions of the php package wp-media/plugin-family. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wp-media/plugin-family
More information about wp-media/plugin-family
Files in wp-media/plugin-family
Package plugin-family
Short Description Organizes and displays WP Media plugin family across other members.
License GPL-3.0-or-later
Informations about the package plugin-family
Plugin Family
This package bundles the WP Media plugin collection within a single plugin.
Functionality
This package gathers essential data about each member plugin and provides their installation and activation links, similar to the Imagify Partner package. It returns an installation link for plugins that are not installed, and an activation link for those that are installed but not active. For Imagify, the link generated by the Imagify Partner package is used.
PS: The Imagify Partner package needs be installed along side. refer here for more information.
Usage Instructions
- Install using composer:
composer require wp-media/plugin-family
- Import the model that holds the filtered data into your view class.
The model returns an array with 2 keys ( categorized & uncategorized ). This for plugins like WP Rocket that needs to display the plugins by category.
- The categorized version has the plugins grouped by their categories.
- The uncategorized version is the reverse of the former.
Next, we need to invoke the controller responsible for managing the installation and activation. This controller has a corresponding interface that needs to be implemented.
The methods ( install_activate
& display_error_notice
) are required.
PS: This example is based on the assumption that your plugin utilizes EDA. If EDA is not available, you can iterate through the events returned by PluginFamily::get_subscribed_events()
and use add_action
accordingly.
Development & Testing
To facilitate development and testing of the package, it is recommended to specify a development branch in the composer.json file of your project.
Taking WP Rocket as example
PS: Always have the dev prefix before the actual branch.