承接 onstage2426/wp-hub-updater 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

onstage2426/wp-hub-updater

最新稳定版本:v0.1.9

Composer 安装命令:

composer require onstage2426/wp-hub-updater

包简介

WordPress plugin and theme updater powered by GitHub releases.

README 文档

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 onstage2426/wp-hub-updater

Requirements: PHP 8.3+, WordPress 6.6+

Bundling in a plugin? If your plugin ships with this library, prefix the namespace so it can coexist with other plugins that bundle it too. Your release workflow handles this automatically — see Distribution → Namespace isolation.

Quick start

Plugin — call this at the top level of your main plugin file:

use WpHubUpdater\Plugin\PluginUpdater;

$repo = 'https://github.com/your-org/your-plugin';

PluginUpdater::build($repo, __FILE__)
    ->setAccessToken('ghp_xxxx');  // omit for public repos

Theme — call this in functions.php:

use WpHubUpdater\Theme\ThemeUpdater;

$repo = 'https://github.com/your-org/your-theme';

ThemeUpdater::build($repo, 'your-theme')
    ->setAccessToken('ghp_xxxx');  // omit for public repos

That's it. The updater registers its WordPress hooks and handles everything else automatically.

PluginUpdater::build()

PluginUpdater::build(
    string $repositoryUrl,
    string $pluginFile,
    string $slug        = "",   // defaults to filename without .php
    int    $checkPeriod = 12,   // hours between checks; 0 disables automatic checks
    string $optionName  = "",   // defaults to external_updates-{slug}
): static

Pass __FILE__ as $pluginFile from your plugin's main PHP file.

ThemeUpdater::build()

ThemeUpdater::build(
    string $repositoryUrl,
    string $themeSlug,          // theme directory name, e.g. "my-theme"
    int    $checkPeriod = 12,
    string $optionName  = "",
): static

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
  • plugin.json / theme.json — metadata schema, changelog, local assets
  • Advanced — MU-plugins, debugging, WP-CLI, reliability features

License

MIT — see LICENSE.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固