PHP code example of smoolabs / wordpress-plugin-updater
1. Go to this page and download the library: Download smoolabs/wordpress-plugin-updater library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
smoolabs / wordpress-plugin-updater example snippets
$client = \Smoolabs\WPU\V4\WPLSController::initClient('http://url-to-wpls.com', array(
'name' => 'Example Plugin Name',
'version' => '1.0.0',
'path' => __FILE__,
'slug' => 'example-plugin-slug'
));
// Your Updater instance
$client = \Smoolabs\...;
if ($client->isActivated()) {
/*
* The User has activated the plugin.
* Add your plugin functionality here.
*/
} else {
/*
* The User has *NOT* activated the plugin.
* Add activation messages etc here, for example on your plugin settings page.
*/
}
vendor/autoload.php
loader.php