定制 alledia/edd-sl-plugin-updater 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alledia/edd-sl-plugin-updater

最新稳定版本:v1.6.23

Composer 安装命令:

composer require alledia/edd-sl-plugin-updater

包简介

EDD Updates Handler for WordPress Plugins

README 文档

README

This library should be used on add-ons or plugins sold on EDD. It handles the updates for plugins integrated with Easy Digital Downloads in WordPress sites.

Requirements

This class can only be used with EDD v1.7 and later.

How to use it

Installing

Add as a requirement using composer:

$ composer require alledia/edd-sl-plugin-updater 

Or add it manually to the composer.json file:

{
  "require": {
    "alledia/edd-sl-plugin-updater": "dev-master"
  }
} 

Loading and initializing

<?php
add_action('admin_init', 'init_updater');

function init_updater()
{
    // The site for the EDD store.
    $apiUrl         = 'https://site-with-edd.com';
    
    $pluginFile     = 'your-plugin/your-plugin.php';
    // The version of your add-on/plugin.
    $currentVersion = '1.0.5';
    // ID for the add-on/plugin on EDD.
    $addonEddId     = '3252';
    
    $author         = 'Your Name';
    
    // Initialize the library.
    $updater = new Alledia\EDD_SL_Plugin_Updater(
        $apiUrl,
        $pluginFile,
        [
            'version' => $currentVersion,
            'license' => get_option('upstream_frontend_edit_license_key'),
            'item_id' => $addonEddId,
            'author'  => $author,
            'beta'    => false,
        ]
    );
}

统计信息

  • 总下载量: 36.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 27
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-09-06