PHP code example of wpupdatehub / updater
1. Go to this page and download the library: Download wpupdatehub/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/ */
wpupdatehub / updater example snippets
/**
* Plugin Name: Example Plugin
*
* @package ExamplePlugin
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Include the Composer autoloader in your plugin.
ction( 'init', array( $this, 'initialise' ) );
}
/**
* Initialize the updater.
*/
public function initialise() {
$options = array(
'file' => __FILE__,
'id' => 'your-plugin-id',
// Optional: Leave out 'secret' if no license key is