Linux 软件免费装
Banner图

Version Pilot

开发者 wowown
更新时间 2025年7月9日 16:50
PHP版本: 7.0 及以上
WordPress版本: 6.8
版权: GPL v2 or later
版权网址: 版权信息

标签

updater update plugin update self-hosted github updater

下载

2.0.0

详情介绍:

[English] Version Pilot offers a decentralized and seamless update solution for WordPress plugin developers who host their plugins outside the official repository. It perfectly mimics the native WordPress update experience without relying on a central server. This solution consists of two parts:
  1. Author-side Plugin ("Version Pilot"): You install this plugin on your own WordPress site. It provides a clean interface to manage all your plugins' update information. This information is then exposed via a secure REST API endpoint.
  2. Client-side Integration Code: A lightweight PHP snippet that you, the developer, embed in your distributed plugins. This code uses WordPress's built-in hooks to periodically check your Version Pilot API for updates. When a new version is detected, it integrates seamlessly into the standard WordPress update system, allowing your users to update with a single click from their admin dashboard, just like any official plugin.
Key Features in Version 2.0: "Version Pilot" 为那些在官方插件库之外托管插件的 WordPress 开发者提供了一个去中心化的、无缝的更新解决方案。它完美地模拟了 WordPress 的原生更新体验,且无需依赖任何中央服务器。 该解决方案包含两个部分:
  1. 作者端插件 ("Version Pilot"): 您将此插件安装在您自己的 WordPress 站点上。它提供了一个简洁的界面,用于管理您所有插件的更新信息。这些信息会通过一个安全的 REST API 端点提供。
  2. 用户端集成代码: 一段轻量级的 PHP 代码,由您(开发者)嵌入到您分发的插件中。该代码利用 WordPress 的内置钩子,定期向您的 "Version Pilot" API 查询更新。当检测到新版本时,它会无缝地集成到标准的 WordPress 更新系统中,让您的用户可以像更新官方插件一样,在后台一键完成更新。
2.0 版本核心特性:

安装:

[English] This plugin has two installation processes: one for you (the plugin author) and one for integrating the updater into your plugins. Part 1: For You (The Plugin Author)
  1. Upload the version-pilot folder to the /wp-content/plugins/ directory on your own website.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Navigate to the new "Version Pilot" menu in your admin sidebar.
  4. Go to "All Plugins" and click "Add New".
  5. Fill in your plugin's permanent information (e.g., Plugin Name, Plugin Slug, Homepage) and Publish. The "Plugin Slug" must be unique and match the one used in the client code.
  6. Return to the "All Plugins" list. Find your plugin and click the "Add New Version" link.
  7. Fill in the version-specific details (e.g., Version Number, Package URL, Changelog) and Publish.
  8. Your update API is now live for that version!
Part 2: Integrating the Updater into Your Plugin
  1. Copy the version-pilot-client-updater.php file (from the /client/ directory) into your own plugin's folder.
  2. In your plugin's main PHP file, include and instantiate the updater class.
```php // Include the updater class. require_once dirname( FILE ) . '/path/to/version-pilot-client-updater.php'; // Instantiate the updater. new Version_Pilot_Client_Updater( 'https://your-author-site.com', // The URL where your Version Pilot plugin is installed. 'my-awesome-plugin', // The unique slug for THIS plugin. plugin_basename( FILE ), // The plugin's basename (e.g., my-awesome-plugin/my-awesome-plugin.php). '1.0.0' // The CURRENT version of THIS plugin. ); ``` That's it! Your plugin will now automatically check for updates. [简体中文] 本插件有两个安装流程:一个是为您(插件作者)自己安装,另一个是将更新器集成到您分发给用户的插件中。 第一部分:为您自己(插件作者)
  1. version-pilot 文件夹上传到您自己网站的 /wp-content/plugins/ 目录。
  2. 在 WordPress 的“插件”菜单中激活该插件。
  3. 在您的后台侧边栏中找到新增的 "Version Pilot" 菜单。
  4. 进入“所有插件”页面,然后点击“添加插件”。
  5. 填写您插件的永久性信息(如:插件名称、插件 Slug、主页等)然后发布。请注意,“插件 Slug”必须是唯一的,且与您在客户端代码中使用的 Slug 完全匹配。
  6. 回到“所有插件”列表,找到您刚才添加的插件,点击下方的“添加新版本”链接。
  7. 填写该版本专属的信息(如:版本号、压缩包 URL、更新日志等)然后发布
  8. 现在,您这个版本的更新 API 已经生效!
第二部分:将更新器集成到您的插件中
  1. version-pilot-client-updater.php 文件(位于本插件的 /client/ 目录下)复制到您自己插件的文件夹中。
  2. 在您插件的主 PHP 文件中,引入并实例化更新器类。
```php // 引入更新器类文件 require_once dirname( FILE ) . '/path/to/version-pilot-client-updater.php'; // 实例化更新器 new Version_Pilot_Client_Updater( 'https://your-author-site.com', // 您安装了 Version Pilot 插件的网站 URL 'my-awesome-plugin', // 当前插件的唯一 Slug plugin_basename( FILE ), // 当前插件的基准名 (例如, my-awesome-plugin/my-awesome-plugin.php) '2.0.0' // 当前插件的当前版本号 ); ``` 完成了!现在,您的插件将会自动检查更新。

屏幕截图:

  • **"All Plugins" Management Interface**: The main screen to manage all your plugin projects.
  • **"All Versions" Management Interface**: A complete history of all releases, with filtering and quick status toggles.
  • **"Add New Plugin" Screen**: The clean interface for adding a new plugin's core information.
  • **"Add New Version" Screen**: The streamlined process for releasing a new update for an existing plugin.
  • **User's Update Experience**: The standard WordPress 'Plugins' page showing an update notification for your plugin.
  • **"View Details" Modal**: The update details pop-up, populated with information served by the Version Pilot API.
  • **“所有插件”管理界面**: 管理您所有插件项目的主屏幕。
  • **“所有版本”管理界面**: 完整的发布历史记录,带筛选功能和快捷状态切换。
  • **“添加插件”页面**: 用于添加插件核心信息的简洁界面。
  • **“添加新版本”页面**: 为现有插件发布新更新的简化流程。
  • **用户的更新体验**: 标准 WordPress“插件”页面的截图,显示您的插件的更新通知。
  • **“查看详情”弹窗**: 更新详情弹窗,其中填充了由 Version Pilot API 提供的数据。

升级注意事项:

2.0.0 This is a major update that completely refactors the plugin's architecture. It is highly recommended to back up your database before upgrading. [简体中文] 2.0.0 这是一个重大的版本更新,完全重构了插件的底层架构。强烈建议在升级前备份您的数据库。

常见问题:

Do my users need to install Version Pilot?

[English] No. That is the main advantage. Your users do not need to install any extra plugins. The update logic is bundled within your own plugin.

Is this secure for my users?

Yes. All communication should be over HTTPS (which you must configure on your server). Furthermore, WordPress itself performs validations on the update package before installation. Version Pilot simply informs WordPress where to get the update.

Will this slow down my users' websites?

No. The update check leverages WordPress's built-in transient API. WordPress only checks for updates twice a day (every 12 hours), so the impact on performance is negligible. [简体中文]

我的用户需要安装 "Version Pilot" 吗?

不需要。这正是它的主要优点。您的用户无需安装任何额外的插件,更新逻辑已经捆绑在您自己的插件中了。

这对我的用户来说安全吗?

是的。所有通信都应通过 HTTPS 进行(您必须在服务器上配置)。此外,WordPress 本身在安装前也会对更新包进行验证。"Version Pilot" 的作用仅仅是告知 WordPress 从哪里获取更新。

这会拖慢我的用户网站的速度吗?

不会。更新检查利用了 WordPress 内置的瞬态(Transient)API。WordPress 默认每天只检查两次更新(每 12 小时),因此对性能的影响可以忽略不计。

更新日志:

2.0.0 1.0.0