1. Go to this page and download the library: Download wpelevator/update-client 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/ */
wpelevator / update-client example snippets
/**
* Plugin Name: Your Plugin
* Version: 1.0.0
* Update URI: https://example.com/to/prevent/wporg/update-checks
*/
// Your existing plugin bootstrap code here...
$update_notice = new WPElevator\Update_Client\Plugin_Require(
[
'download_url' => 'https://updates.example.com/api/download/acme-updater',
'basename' => 'acme-updater/acme-updater.php',
'name' => 'Acme Updater',
'notice' => 'The Acme Updater plugin is
/**
* Plugin Name: Your Plugin
* Version: 1.0.0
* Update URI: https://example.com/to/prevent/wporg/update-checks
*/
// Your existing plugin bootstrap code here...
$plugin_update = new WPElevator\Update_Client\Plugin_Update(
plugin_basename( __FILE__ ),
'https://updates.example.com/wp-json/update-pilot/v1/plugins',
[
'signing_key' => 'y6BGnVLNL2AZLLKJzRHrDBTvMri+cLtvmMHBnf1M2S8=', // Optional. Base64 encoded Ed25519 public key used to sign the update packages.
'license_key' => 'your-license-key', // Optional. License key used to authenticate the update requests.
]
);
add_action( 'plugins_loaded', [ $plugin_update, 'init' ] );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.