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+插件v1.88.zip
共75个文件
php:27个
png:15个
po:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 80 浏览量
2022-04-05
14:39:50
上传
评论
收藏 909KB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件v1.88 PW WooCommerce Black Friday & Cyber Monday Pro PW Woocommerce Black Friday&Cyeber Monday Pro" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源详情
资源评论
资源推荐
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件v1.88.zip (75个子文件)
pw-black-friday
changelog.txt 7KB
templates
woocommerce
pw-black-friday
promo.php 2KB
countdown.php 5KB
sale-price-html.php 1KB
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
font-awesome.min.css 30KB
icon-style.css 92B
jquery-ui-style.min.css 29KB
style.css 9KB
images
pimwick.png 3KB
pimwick-icon-120x120.png 4KB
fonts
fontawesome-webfont.eot 162KB
fontawesome-webfont.woff 96KB
FontAwesome.otf 132KB
fontawesome-webfont.svg 434KB
fontawesome-webfont.woff2 75KB
fontawesome-webfont.ttf 162KB
js
script.js 20KB
.DS_Store 6KB
languages
pw-black-friday.pot 16KB
pw-black-friday-it_IT.po 24KB
pw-black-friday-it_IT.mo 17KB
pw-black-friday-es_ES.po 24KB
pw-black-friday-de_DE.po 24KB
pw-black-friday-nl_NL.mo 17KB
pw-black-friday-nl_NL.po 23KB
pw-black-friday-ru_RU.mo 23KB
pw-black-friday-fr_FR.po 24KB
pw-black-friday-ru_RU.po 29KB
pw-black-friday-da_DK.mo 17KB
pw-black-friday-fr_FR.mo 18KB
pw-black-friday-de_DE.mo 18KB
pw-black-friday-da_DK.po 23KB
pw-black-friday-es_ES.mo 17KB
ui
edit-countdowns.php 4KB
more.php 18KB
footer.php 887B
index.php 17KB
edit-deal.php 3KB
activation.php 2KB
intro.php 2KB
header.php 522B
deals
step1.php 8KB
step3.php 4KB
step2.php 12KB
step4.php 2KB
edit-promo.php 2KB
edit-event.php 3KB
first-event.php 2KB
pw-black-friday.php 89KB
includes
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
共 75 条
- 1
Lee达森
- 粉丝: 966
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0