PHP code example of onstage2426 / wp-hub-updater
1. Go to this page and download the library: Download onstage2426/wp-hub-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/ */
onstage2426 / wp-hub-updater example snippets
use MyPlugin\WpHubUpdater\Plugin\PluginUpdater;
PluginUpdater::build('https://github.com/your-org/your-plugin', __FILE__)
->setAccessToken('ghp_xxxx'); // omit for public repos
use MyPlugin\WpHubUpdater\Theme\ThemeUpdater;
ThemeUpdater::build('https://github.com/your-org/your-theme', 'your-theme')
->setAccessToken('ghp_xxxx'); // omit for public repos