erayalakese/envato-update-checker
最新稳定版本:v1.3.2
Composer 安装命令:
composer require erayalakese/envato-update-checker
包简介
Checks Envato WordPress plugins' updates and download its if any update available
README 文档
README
Envato Update Checker is a library for WordPress theme and plugin developers. When you use this library, it downloads when plugin or theme update is available.
HOW IT WORKS?
It's just a PHP class and asking for some informations about your plugin while creating an instance.
First of all you need to create a JSON file. This file will contain latest version string of your plugin. Let's say your plugin's name is Hello World and hewo is slug. Your remote JSON file will be like this:
{
"hewo":"1.1.2"
}
This will tell to library, latest version of the hewo plugin is 1.1.2 . Library will compare it with your installed plugin's version and warns users if any updates available.
Check out my remote file : http://erayalakese.com/envato-update-checker.json
INSTALLATION
You can use Composer to install it. Composer If you are using Composer to manage dependencies of your WordPress plugins / themes. You can install Envato Update Checker via Composer.
composer require erayalakese/envato-update-checker
composer update
USAGE
If you don't have any autoloader for your Composer vendors, you should put this to your plugin's index.php file or theme's functions.php file.
require_once(__DIR__.'/vendor/autoload.php');
Now just creating an instance of Envato_Update_Checker class is enough. Class constructor will do the rest. Constructor needs 5 arguments as parameter.
new \erayalakese\Envato_Update_Checker(PLUGINNAME, PLUGINSLUG, PLUGINVERSION, REMOTEFILE, APIKEY);
PLUGINNAME - Name of your plugin. PLUGINSLUG - alphanumerical slug of your plugin. This will used in your remote file. You can use initials of your plugin name, like vcb, dmw, ... PLUGINVERSION - Installed version of your plugin. This version number will compared with your remote file. REMOTEFILE - URL of your remote JSON file. APIKEY - Envato API Key to verify purchases and download files from Envato. Get your APIKEY from here. Click Register new app button and get your API key. I recommend you to get new API KEYs for your every plugins.
EXAMPLE
<?php
/*
Plugin Name: Test Plugin
Plugin URI: http://eray.rocks
Author: Eray Alakese
Version: 1.0.0
Author URI: http://eray.rocks
*/
require_once(__DIR__.'/vendor/autoload.php');
new erayalakese\Envato_Update_Checker("Test Plugin", "tp", "1.0.0", "http://erayalakese.com/envato-update-checker.json", "XYZ...ABC");
/** Your plugin codes here **/
License
GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
erayalakese/envato-update-checker 适用场景与选型建议
erayalakese/envato-update-checker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 289 次下载、GitHub Stars 达 8, 最近一次更新时间为 2015 年 08 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 erayalakese/envato-update-checker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 erayalakese/envato-update-checker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 289
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL
- 更新时间: 2015-08-20