sashoknekulin/wpautoupdate

自动从GitHub仓库更新WordPress主题和插件

v1.2 2019-03-18 15:41 UTC

This package is auto-updated.

Last update: 2024-09-19 09:57:53 UTC


README

自动从GitHub仓库更新WordPress主题和插件。

自动更新wordpress主题和插件来自github仓库。

响应仓库中的发布。转到“发布”选项卡,单击“创建新版本”。在这里,您可以找到一些需要填写的字段。最重要的字段是“标签版本”。在这里,我们将放置我们插件当前版本的发布。

主题连接

在您的主题文件中添加以下内容:

$theme = new SashokNekulin\WpAutoUpdate\ThemeUpdateg( get_template_directory() );

$theme->set_username( 'USER' ); // 用户名

$theme->set_repository( 'REPO' ); // 仓库

// $theme->authorize( 'CODE_REPOS' ); // 如果仓库是封闭的,则使用密钥

$theme->initialize();

插件连接

在您的插件文件中添加以下内容:

$plugin = new SashokNekulin\WpAutoUpdate\PluginUpdate( FILE );

$plugin->set_username( 'USER' ); // 用户名

$plugin->set_repository( 'REPO' ); // 仓库

// $plugin->authorize( 'CODE_REPOS' ); // 如果仓库是封闭的,则使用密钥

$plugin->initialize();

灵感来源于此处

http://oddstyle.ru/wordpress-2/stati-wordpress/razvertyvanie-wordpress-plaginov-cherez-github-s-pomoshhyu-transients.html