Plugin Update Checker
=====================
This is a custom update checker library for WordPress plugins. It lets you add automatic update notifications and one-click upgrades to your commercial and private plugins. All you need to do is put your plugin details in a JSON file, place the file on your server, and pass the URL to the library. The library periodically checks the URL to see if there's a new version available and displays an update notification to the user if necessary.
From the users' perspective, it works just like with plugins hosted on WordPress.org. The update checker uses the default plugin upgrade UI that will already be familiar to most WordPress users.
[See this blog post](http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/) for more information and usage instructions.
Getting Started
---------------
### Self-hosted Plugins
1. Make a JSON file that describes your plugin. Here's a minimal example:
```json
{
"name" : "My Cool Plugin",
"version" : "2.0",
"author" : "John Smith",
"download_url" : "http://example.com/plugins/my-cool-plugin.zip",
"sections" : {
"description" : "Plugin description here. You can use HTML."
}
}
```
See [this table](https://spreadsheets.google.com/pub?key=0AqP80E74YcUWdEdETXZLcXhjd2w0cHMwX2U1eDlWTHc&authkey=CK7h9toK&hl=en&single=true&gid=0&output=html) for a full list of supported fields.
2. Upload this file to a publicly accessible location.
3. Download [the update checker](https://github.com/YahnisElsts/plugin-update-checker/releases/latest), unzip the archive and copy the `plugin-update-checker` directory to your plugin.
4. Add the following code to the main plugin file:
```php
require 'plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = PucFactory::buildUpdateChecker(
'http://example.com/path/to/metadata.json',
__FILE__,
'unique-plugin-slug'
);
```
#### Notes
- You can use [wp-update-server](https://github.com/YahnisElsts/wp-update-server) to automatically generate JSON metadata from ZIP packages.
- The second argument passed to `buildUpdateChecker` should be the full path to the main plugin file.
- The `$slug` argument is optional but recommended. If it's omitted, the update checker will use the name of the main plugin file as the slug (e.g. `my-cool-plugin.php` → `my-cool-plugin`). This can lead to conflicts if your plugin has a generic file name like `plugin.php`.
- There are more options available - see the [blog](http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/) for details.
### Plugins Hosted on GitHub
*(GitHub support is experimental.)*
1. Download [the latest release](https://github.com/YahnisElsts/plugin-update-checker/releases/latest), unzip it and copy the `plugin-update-checker` directory to your plugin.
2. Add the following code to the main file of your plugin:
```php
require 'plugin-update-checker/plugin-update-checker.php';
$className = PucFactory::getLatestClassVersion('PucGitHubChecker');
$myUpdateChecker = new $className(
'https://github.com/user-name/plugin-repo-name/',
__FILE__,
'master'
);
```
The third argument specifies the branch to use for updating your plugin. The default is `master`. If the branch name is omitted or set to `master`, the update checker will use the latest release or tag (if available). Otherwise it will use the specified branch.
3. Optional: Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/about/readme.txt). The contents of this file will be shown when the user clicks the "View version 1.2.3 details" link.
#### Notes
If your GitHub repository requires an access token, you can specify it like this:
```php
$myUpdateChecker->setAccessToken('your-token-here');
```
The GitHub version of the library will pull update details from the following parts of a release/tag/branch:
- Changelog
- The "Changelog" section of `readme.txt`.
- One of the following files:
CHANGES.md, CHANGELOG.md, changes.md, changelog.md
- Release notes.
- Version number
- The "Version" plugin header.
- The latest release or tag name.
- Required and tested WordPress versions
- The "Requires at least" and "Tested up to" fields in `readme.txt`.
- The following plugin headers:
`Required WP`, `Tested WP`, `Requires at least`, `Tested up to`
- "Last updated" timestamp
- The creation timestamp of the latest release.
- The latest commit of the selected tag or branch that changed the main plugin file.
- Number of downloads
- The `download_count` statistic of the latest release.
- If you're not using GitHub releases, there will be no download stats.
- Other plugin details - author, homepage URL, description
- The "Description" section of `readme.txt`.
- Remote plugin headers (i.e. the latest version on GitHub).
- Local plugin headers (i.e. the currently installed version).
- Ratings, banners, screenshots
- Not supported.
Resources
---------
- [Theme Update Checker](http://w-shadow.com/blog/2011/06/02/automatic-updates-for-commercial-themes/)
- [Debug Bar](https://wordpress.org/plugins/debug-bar/) - useful for testing and debugging the update checker.
- [Securing download links](http://w-shadow.com/blog/2013/03/19/plugin-updates-securing-download-links/) - a general overview.
- [A GUI for entering download credentials](http://open-tools.net/documentation/tutorial-automatic-updates.html#wordpress)
没有合适的资源?快使用搜索试试~ 我知道了~
【WordPress插件】2022年最新版完整功能demo+插件v2.30.zip
共75个文件
php:34个
png:15个
mo:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 51 浏览量
2022-04-06
17:00:02
上传
评论
收藏 359KB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件v2.30 PW WooCommerce Affiliates Pro PW Woocommerce Affiliates Pro" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源详情
资源评论
资源推荐
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件v2.30.zip (75个子文件)
pw-affiliates
pw-affiliates.php 12KB
admin
assets
css
pw-affiliates-admin.pro.css 6KB
icon-style.css 92B
images
pimwick.png 3KB
pimwick-icon-120x120.png 4KB
js
pw-affiliates-admin.pro.js 16KB
fontawesome-solid.min.js 415KB
fontawesome.min.js 29KB
ui
more.php 18KB
table-header.php 969B
footer.php 913B
index.php 2KB
products-table.php 3KB
activation.php 889B
sections
affiliates-report.php 5KB
products-report.php 2KB
commissions.php 3KB
create.php 3KB
settings.php 617B
header.php 515B
affiliates-table.php 4KB
admin.php 30KB
changelog.txt 3KB
templates
woocommerce
pw-affiliates-report.php 3KB
cart
pw-affiliates-cart-totals-before-order-total.php 407B
emails
pw-affiliates-enroll.php 831B
plain
pw-affiliates-enroll.php 575B
pw-affiliates-enroll.php 3KB
checkout
pw-affiliates-review-order-before-order-total.php 403B
assets
css
images
ui-icons_222222_256x240.png 7KB
ui-icons_454545_256x240.png 7KB
ui-bg_glass_75_dadada_1x400.png 262B
ui-icons_cd0a0a_256x240.png 4KB
ui-bg_glass_75_e6e6e6_1x400.png 262B
ui-icons_888888_256x240.png 7KB
ui-bg_flat_0_aaaaaa_40x100.png 212B
ui-bg_highlight-soft_75_cccccc_1x100.png 280B
ui-bg_glass_65_ffffff_1x400.png 207B
ui-icons_2e83ff_256x240.png 4KB
ui-bg_glass_55_fbf9ee_1x400.png 335B
ui-bg_flat_75_ffffff_40x100.png 208B
ui-bg_glass_95_fef1ec_1x400.png 332B
jquery-ui-style.min.css 29KB
js
pw-affiliates.pro.js 681B
languages
pw-woocommerce-affiliates-fr_FR.mo 13KB
pw-woocommerce-affiliates-fr_FR.po 21KB
pw-woocommerce-affiliates-de_DE.po 20KB
pw-woocommerce-affiliates.pot 15KB
pw-woocommerce-affiliates-it_IT.po 20KB
pw-woocommerce-affiliates-es_ES.mo 13KB
pw-woocommerce-affiliates-de_DE.mo 13KB
pw-woocommerce-affiliates-nl_NL.po 20KB
pw-woocommerce-affiliates-es_ES.po 20KB
pw-woocommerce-affiliates-ru_RU.mo 17KB
pw-woocommerce-affiliates-ru_RU.po 24KB
pw-woocommerce-affiliates-it_IT.mo 13KB
pw-woocommerce-affiliates-nl_NL.mo 13KB
includes
pwwa-functions.php 18KB
pw-affiliates-email-manager.php 1KB
plugin-update-checker
css
puc-debug-bar.css 1KB
composer.json 630B
plugin-update-checker.php 52KB
debug-bar-plugin.php 3KB
github-checker.php 13KB
vendor
readme-parser.php 12KB
ParsedownLegacy.php 36KB
Parsedown.php 37KB
debug-bar-panel.php 5KB
license.txt 1KB
js
debug-bar.js 2KB
README.md 5KB
class-pimwick-license-manager.php 15KB
class-pw-affiliate.php 6KB
pw-affiliates-shortcodes.php 2KB
emails
class-wc-email-pw-affiliates-enroll.php 5KB
共 75 条
- 1
Lee达森
- 粉丝: 968
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 适用于中小型游戏的通用排行榜后台系统.zip
- 一秒99条的短信接口.zip
- 基于jsp+servlet+mysql的javaweb健身房俱乐部系统
- 110_c6ce6db7048c08aee35a7a2675732d54.apk (1).1
- sql查询数据库表结构(sql server适用)
- HTTP CLENT处理加密证书程序参考
- update9-20240601.5.205.slice.img.7z.002
- 微信小程序优惠券页面前端模板源码
- 林子雨编著《Spark编程基础(Python版)》 实验7 Spark机器学习库MLib编程实践数据
- 一种支持微信文本限制长度限制使用的,在合适的位置截取限制字节长度的字符串子串的java算法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0