定制 davidanderson684/simba-plugin-manager-updater 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

davidanderson684/simba-plugin-manager-updater

Composer 安装命令:

composer require davidanderson684/simba-plugin-manager-updater

包简介

This class is an updates checker and UI for WordPress plugins that are hosted using the Simba Plugin Manager plugin

README 文档

README

This class is an updates checker and UI for WordPress plugins that are hosted using the Simba Plugin Manager plugin.

It is intended for plugins that require the supply of access credentials (a customer email address and password) to gain access to updates. For plugins that are available to everyone, you should instead use Yahnis Elsts' plugin update class without any modifications: https://github.com/YahnisElsts/plugin-update-checker

How to use this class

There are two ways you can install this class, depending on whether you wish to use composer or not. We recommend using composer, so that your dependencies remain up-to-date without having to take manual actions.

1. Install: Method one: Via composer (recommended)

If you do not already have a composer.json file, then create one.

{
    "require": {
		"davidanderson684/simba-plugin-manager-updater": "1.9.*"
    }
}

If you already have one, then just add davidanderson684/simba-plugin-manager-updater to the list of requirements (remember to keep the JSON valid, of course).

Then, in the same directory, run "composer update" (assuming you already have composer installed).

Note that this project's versioning principles are that any A.B.C release is compatible with any other A.B.D release; there are no further guarantees. Thus, if you use the above recommended line in composer, then any composer update operations will only update to compatible versions. If you choose to use something else then you must look to any consequences of that yourself.

1. Install: Install manually (it's better to use composer, but if you insist...)

Check out a copy of Yahnis' Elsts' plugin update class, version (https://github.com/YahnisElsts/plugin-update-checker).

Download from https://github.com/YahnisElsts/plugin-update-checker and you can place it in a subdirectory "puc", relative to where this class is housed, such that the plugin updater class is in puc/plugin-update-checker.php. It will be looked for there if the composer directory does not exist. You should read the file composer.json which is part of this (the update manager class) project to see which versions are compatible (don't download an incompatible version).

2. Include the class in your plugin

Now that you're installed, you need to include the class. Your plugin's constructor is a good place to do this.

If you are using composer, you should copy the updater.php file into your plugin (if you edit the bundled copy in-place, then it will get over-written when you update), in the same directory as your composer.json and vendor directory are (or if otherwise, modify the paths mentioned in it).

include_once('path/to/your/plugin/updater.php');

3. Edit updater.php to point to where your plugins are hosted

updater.php is a very short file. Find this line ...

new Updraft_Manager_Updater_1_9('https://example.com/your/WP/mothership/homeurl', 1, 'plugin-dir/plugin-file.php');

... and:

  1. Change it to point to the home URL of your WordPress site that is hosting the plugin (i.e. that is running the Simba Plugin Manager).

  2. Change the 1 to be the user ID of the user on your WordPress plugin-distributing site who is hosting this plugin (i.e. the user ID logging into Simba Plugin Manager to provide updates of this plugin).

  3. Change the plugin path to be the path (relative to the WP plugin directory, by default wp-content/plugins) to your plugin's main file.

That's it! A fourth parameter is also available, an options array. Available options (specified as key/value pairs) include: debug (boolean), require_login (boolean), auto_backoff (boolean), interval_hours (integer).

davidanderson684/simba-plugin-manager-updater 适用场景与选型建议

davidanderson684/simba-plugin-manager-updater 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53.64k 次下载、GitHub Stars 达 27, 最近一次更新时间为 2016 年 09 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 davidanderson684/simba-plugin-manager-updater 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 davidanderson684/simba-plugin-manager-updater 我们能提供哪些服务?
定制开发 / 二次开发

基于 davidanderson684/simba-plugin-manager-updater 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 27
  • Watchers: 4
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-09-07