Giter Club home page Giter Club logo

github-plugin-updater's Introduction

This is still a working draft....

How does this plugin work?

The challenge I faced when updating a plugin from GitHub was the naming of the zipball archive. When extracted the foldername is not of your choice. But I do like to think that you should be able to dictate the foldername of your plugin. So after some research I came up with the solution to download the zipball, open it with the native php ZipArchive (WordPress uses this as well), rename the folder, save the zipball and offer that as the download. To achieve this I had to let de update-url point to wp-admin where I supply the name of the github repo and the cookie required to login to wp-admin. The admin_init hook will then take over and sets headers equal to that of a zipball from GitHub and sends the zipball, then cleans it up.

Now, though my research was pretty extensive (for my doing at least), I am not completely sure this is the best approach. So I any feedback is most welcome.

Other than that, this structure will allows a pretty native WordPress plugin update experience. We should be able to:

  • Supply extra information before updating
  • The plugin author can support this plugin directly or the end-user can add any repo to the functions.php
  • Adding a GUI is also very possible and if this plugin is good in what it claims to do, it will be added

Again, any feedback and testing on various platforms/ configurations is very welcome.

github-plugin-updater's People

Watchers

ANDREY SEVIDOFF 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.