onstage2426/wp-hub-updater

WordPress plugin and theme updater powered by GitHub releases. Requires PHP 8.3+ and WordPress 6.6+. Includes a bundler (bin/wp-hub-updater) to copy and namespace-prefix the library into any plugin for conflict-free shipping.

Maintainers

Package info

github.com/onstage2426/wp-hub-updater

pkg:composer/onstage2426/wp-hub-updater

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-28 08:12 UTC

This package is auto-updated.

Last update: 2026-06-28 08:22:12 UTC


README

PHP 8.3+ WordPress 6.6+ License Packagist Version CI

Delivers WordPress plugin and theme updates from a GitHub repository. Hooks into the standard WordPress update system so your entity appears in the Updates screen and can be installed with a single click.

Installation

composer require --dev onstage2426/wp-hub-updater

Requirements: PHP 8.3+, WordPress 6.6+

This is a build-time tool — it generates a prefixed copy of itself into your project and is excluded from the final ZIP. See Distribution → Namespace isolation.

Quick start

Examples below use MyPlugin as the namespace prefix. Replace it with whatever you passed to vendor/bin/wp-hub-updater.

Plugin — add two lines to your main plugin file:

use MyPlugin\WpHubUpdater\Plugin\PluginUpdater;

PluginUpdater::build('https://github.com/your-org/your-plugin', __FILE__)
    ->setAccessToken('ghp_xxxx');  // omit for public repos

Theme — add two lines to functions.php:

use MyPlugin\WpHubUpdater\Theme\ThemeUpdater;

ThemeUpdater::build('https://github.com/your-org/your-theme', 'your-theme')
    ->setAccessToken('ghp_xxxx');  // omit for public repos

Documentation

  • Configuration — all chainable methods, access token, branch, cooldown, release filters, reading state
  • WordPress filters — filters and actions for info, update, detection strategies, error handling
  • Data classesUpdate, PluginInfo, ThemeInfo properties
  • Distribution — namespace isolation, release pipeline, draft-first workflow, version stamping, ZIP
  • hu.json — metadata schema, changelog, local assets
  • Advanced — MU-plugins, debugging, WP-CLI, reliability features

License

MIT — see LICENSE.