proteusthemes / edd-theme-updater
用于激活主题并通过EDD商店为用户提供自动更新。
v0.2.1
2016-11-23 14:11 UTC
This package is auto-updated.
Last update: 2024-09-25 06:33:52 UTC
README
用于激活主题并通过EDD商店为用户提供自动更新。
说明
对于您拥有的每个主题,您必须为更新器定义一些参数。您可以将它挂钩到after_setup_theme
/**
* Load EDD theme updater.
*/
public function enable_edd_theme_updater() {
$config = array(
'remote_api_url' => 'https://www.your_site.com', // Site where EDD is hosted.
'item_name' => 'Theme name', // Name of theme.
'theme_slug' => 'themename-slug', // Theme slug.
'version' => '1.0.0', // The current version of this theme.
'author' => 'Author', // The author of this theme.
'download_id' => '', // Optional, used for generating a license renewal link.
'renew_url' => '', // Optional, allows for a custom license renewal link.
);
$edd_updater = new ProteusThemes\EDDThemeUpdater\EDDThemeUpdaterConfig( $config );
}
add_action( 'after_setup_theme', 'enable_edd_theme_updater' );