-
Notifications
You must be signed in to change notification settings - Fork 7
Adding Plugin Updates to Extension Plugins
Benjamin Intal edited this page Apr 10, 2015
·
6 revisions
PB Sandwich Extension License admin page
Plugin extensions that are being sold in pbsandwi.ch through EDD can have updates pushed to installations with an active license key.
When one or more extensions are active, the Extension License Activation admin page will become available to the user. And license keys can be entered, activated or deactivated all from that page.
Each extension doesn't have to write it's own updater script, the pbs_extension_updater
filter can be used:
Example
add_filter('pbs_extension_updater', 'my_extension_updater');
function my_extension_updater( $extensions ) {
$extensions[] = array(
'store_url' => 'http://www.pbsandwi.ch',
'name' => 'My Cool Extension',
'file' => __FILE__,
'version' => '1.0',
'author' => 'Gambit',
'url' => 'http://www.pbsandwi.ch/downloads/my-cool-extension',
);
return $extensions;
}
This script adds the extension "My Cool Extension" to the Extension License Activation admin page, and plugin updates will become available for it when an active license is placed by the user.
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
store_url | string | The URL to the store with EDD where the extension is available. e.g. http://pbsandwi.ch | |
name | string | The name of the extension. This should match the download name in EDD extactly. | |
file | string | The full path of the main script of the extension plugin. The value here should be the __FILE__ value when called from the main plugin script. |
|
version | string | The current version of the extension which will be checked against the version specified in the store_url , to determine if an update is needed. |
|
author | string | The author name | |
url | string | The URL where the extension is available. This turns the extension name in the license area into a link. | |
ssl | boolean | false | Use true when the store_url above uses SSL |