Giter Site home page Giter Site logo

wp-fleet / auto-update Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 52 KB

Composer package that implements 1 click updates for WordPress self hosted plugins.

Home Page: https://wp-fleet.com

PHP 100.00%
wp-fleet wordpress wordpress-plugins auto-update plugin-update wordpress-plugin-update

auto-update's Introduction

wp-fleet/auto-update

PHP Package to handle the WordPress plugins and themes auto update functionality.

Getting Started

Minimum requirements and dependencies

AutoUpdate requires:

  • PHP >= 7.0
  • WP Fleet plugin to be installed from https://wp-fleet.com/
  • WordPress - latest
  • Composer to be installed

Installation

Install via composer

composer require wp-fleet/auto-update

Usage

Basic usage

In your plugin's main file, require vendor file and call the auto update loader class as follows:

// Define update plugin info and call the function to manage it.
$update_args = [
    'api_url' => 'https://your-website.tld/',
    'plugin_full_path' => __FILE__,
    'allowed_hosts' => [
        'https://your-website.tld'
    ],
    'plugin_name' => plugin_basename( __FILE__ ),
    'license_key' => 'required',
];
( new WpFleet\AutoUpdate\Loader( $update_args ) );

Parameters and arguments:

api_url - [required] site url where WP Fleet plugin is installed.
plugin_full_path - [required] expects to receive __FILE__ value. The full path of the current plugin (that will be updated automatically)
allowed_hosts - [optional] the url of the allowed external hosts to allow plugin updated (where WP Fleet plugin is installed)
plugin_name - [optional] the name of the current plugin (that will be updated automatically) 
license_key - [optional] if true|1|required, a new page will be added under WP Admin -> Plugins -> License Keys and user will have to submit a valid license key to be able to automatically update plugin. If no license key is required, set it to false.  
license_page_parent_slug - [optional] set the admin parent page slug.
license_page_description - [optional] a description that will be displayed on the license page.

License

wp-fleet/auto-update code is licensed under MIT license.

auto-update's People

Contributors

ionvv avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dexit dheia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.