Git Product home page Git Product logo

wp-update's Introduction

Wp Update

A minimal helper to update wordpress plugin from your own self-hosted WordPress Plugin repository.

Install

composer require springdevs/wp-update

Usage

add_action('init', 'update_plugin');

function update_plugin() {
    new \SpringDevs\WpUpdate\Update(
        PLUGIN_CURRENT_VERSION,
        'https://example.com/check-update',
        'plugin-dir/plugin.php'
    );
}

Host API

Ensure that your check-update api must be return look like these example response :

{
    "name": "Update Pro",
    "slug": "update-pro",
    "author": "<a href='https://springdevs.com'>SpringDevs</a>",
    "author_profile": "http://profiles.wordpress.org/springdevs",
    "version": "1.0.2",
    "homepage": "https://example.com/plugin",
    "download_url": "http://example.com/plugins/update_pro.zip",
    "requires": "3.0",
    "tested": "5.8.2",
    "requires_php": "5.3",
    "last_updated": "2021-12-09 02:10:00",
    "sections": {
        "description": "your plugin description here",
        "installation": "Click the activate button and that's it.",
        "changelog": "<ul><li>Bug fixes.</li><li>Tested up to wp-v5.8.2</li></ul>"
    },
    "banners": {
        "low": "https://plugins.svn.wordpress.org/wc-booking/assets/banner-772x250.jpg",
        "high": "https://plugins.svn.wordpress.org/wc-booking/assets/banner-772x250.jpg"
    }
}

Enjoy!

wp-update's People

Contributors

ok9xnirab avatar

Watchers

 avatar

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.