我有一个自定义主题,用于许多客户端站点。我定期更新主题,需要一种方法,当主题更新时通知网站。
我试过使用https://github.com/UCF/Theme-Updater 但由于它不再受支持,也没有更新,我无法将其与WP 4.1.1一起使用。
我在WP中收到更新通知,但更新不会加载。我每次都会出错。
是否有其他方法更新自定义主题?
我有一个自定义主题,用于许多客户端站点。我定期更新主题,需要一种方法,当主题更新时通知网站。
我试过使用https://github.com/UCF/Theme-Updater 但由于它不再受支持,也没有更新,我无法将其与WP 4.1.1一起使用。
我在WP中收到更新通知,但更新不会加载。我每次都会出错。
是否有其他方法更新自定义主题?
以下是有关如何执行此操作的完整文档:Github updater - Documentation
Upload in wordpress
下载最新标记的存档(选择“zip“选项)。解压缩存档文件,将文件夹正确重命名为github-updater, 然后re-zip 文件。
转到插件->添加新屏幕,然后单击上载选项卡。
直接上传压缩的归档文件。
转到插件屏幕并单击激活。
[Description]
该插件旨在简单地更新任何GitHub托管的WordPress插件或主题。您的插件或主题必须在样式中包含标题。css标头或插件标头中表示GitHub上的位置。格式如下。
GitHub Plugin URI: afragen/github-updater
GitHub Plugin URI: https://github.com/afragen/github-updater
GitHub Theme URI: afragen/test-child
GitHub Theme URI: https://github.com/afragen/test-child
https://github.com/<owner>/<repo>
或短格式<owner>/<repo>
. 你不需要两者兼而有之。只需要一个插件或主题URI。You must not 包括任何扩展,如.git
.[Usage]
一Github updater - Documentation定有GitHub Plugin URI
, Bitbucket Plugin URI
, 或GitLab Plugin URI
插件标题中的声明。/*
Plugin Name: GitHub Updater
Plugin URI: https://github.com/afragen/github-updater
Description: A plugin to automatically update GitHub, Bitbucket or GitLab hosted plugins and themes. It also allows for remote installation of plugins or themes into WordPress.
Version: 1.0.0
Author: Andy Fragen
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Domain Path: /languages
Text Domain: github-updater
GitHub Plugin URI: https://github.com/afragen/github-updater
GitHub Branch: master
*/
Themes
一定有GitHub Theme URI
, Bitbucket Theme URI
, 或GitLab Theme URI
中的声明style.css
文件最初添加主题时,目录must 与回购名称相同。/*
Theme Name: Test
Theme URI: http://thefragens.net/
Version: 0.1.0
Description: Child theme of TwentyTwelve.
Author: Andy Fragen
Template: twentytwelve
Template Version: 1.0.0
GitHub Theme URI: https://github.com/afragen/test-child
GitHub Branch: master
*/
希望这有帮助。请让我知道
如果你正在寻找一个简单的解决方案,你不必担心自己编码,我建议你去看看wp-updates.com.
我认为注册一个帐户是免费的,它适用于自定义主题和自定义插件,而且他们声称您只需2行代码就可以集成该服务。
用两行代码为您的高级WordPress主题和插件提供自动更新。
它是由位于Dev7studios, 他们在高级WordPress插件领域备受尊敬。
祝你好运
如果我写一个私有插件,有没有办法使用WordPress自动更新机制来更新它 我想封装这个功能,但它是我自己的5个博客特有的,所以它不是公共插件资源的好候选。但我喜欢这种简单的更新机制 有没有办法做到这一点