Clanbite Since 1.6.0
class UpdaterAn add-on takes part by carrying an Update URI header on the update server's host, for example Update URI: https://services.clanbite.com/clanbite-points. WordPress then skips wordpress.org for it (so nobody can hijack the slug there) and asks the update_plugins_{host} filter instead.
- **Check**: one batched request for every add-on on the site, answered from the same data for each plugin in the run.
- **Offer**: an update whose licence allows it carries a placeholder package address; one that needs a renewal or a licence carries none, and a note under the plugin explains why.
- **Install**: when the administrator clicks Update (or an auto-update runs),
upgrader_pre_downloadasks the server for a single-use download, fetches it from the server's own host, verifies its SHA-256 and hands the file to WordPress.
class final
- Full name
Kernowdev\Clanbite\Updates\Updater
Methods
action_links()"Licence" link under the plugin name.discover()Installed plugins that take part (their Update URI host is the update server's host).filter_update()update_plugins_{host} callback.package_url()Placeholder package address for a release; Updater::pre_download() swaps it for the real single-use download.plugins_api()"View details" modal for add-ons.pre_download()Replace the placeholder package with the real, single-use download.register_host_filter()Hook the per-host update filter for the configured server.register_update_messages()Hook the explanation printed under an update that cannot be installed.register()Register hooks.update_message()Explain why an offered update cannot be installed, or that a newer one needs a renewal.verify_source()Make sure the unpacked folder is the plugin being updated.
Defined in inc/updates/class-updater.php
Changelog
| Version | Description |
|---|---|
| 1.6.0 | Introduced. |