2017 © Pedro Peláez
 

library wordpress-plugin-on-github

A PHP library to handle WordPress plugin updates from GitHub

image

wpog/wordpress-plugin-on-github

A PHP library to handle WordPress plugin updates from GitHub

  • Wednesday, June 8, 2016
  • by aaronsaray
  • Repository
  • 1 Watchers
  • 1 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

WordPress Plugin on GitHub

This is a drop-in library (or suggested composer install) to handle automatic updates for your GitHub hosted WordPress plugin. This was highly influenced by this article, (*1)

Please note that this does not support private repos at this time., (*2)

Installation Instructions

Install the latest version with, (*3)

$ composer require wpog/wordpress-plugin-on-github

Usage as a Composer Library

There are three parameters to the update watcher. The first is the full file path to the current plugin file. PHP's magic constant of __FILE__ works brilliantly here. Next is the GitHub user name or organization name. Finally, the GitHub project name is required. (Please note, this is the project or repo name - it does not end with .git)., (*4)

Add the following to your main plugin file., (*5)

if (is_admin()) {
    new \WPOG\UpdateWatcher(__FILE__, 'githubUserName', 'projectName');
}

Usage as a Drop in Library

This usage is not recommended. However, in order to do this, drop in the source files into a location in your plugin, and then do a require to bring in the main UpdateWatcher file. This project also has dependencies on Parsedown, so you'll need to install this as well., (*6)

About

Requirements

  • WordPress 4.x
  • PHP 5.4+

FAQ

Should I be versioning my composer vendor library in my WordPress plugin? I thought you normally didn't do this., (*7)

At this point, you need to version the composer vendor folder in your WordPress plugins. In the future, hopefully it won't be like this. :), (*8)

I get warnings when I do an update on a WordPress plugin with this file, (*9)

I know. I don't know a good solution at this point - but it still works. WordPress should be checking if a file exists before opening it - but they don't., (*10)

The Versions

08/06 2016

dev-master

9999999-dev

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

08/06 2016

1.0.0

1.0.0.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

08/06 2016

0.1.6

0.1.6.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

08/06 2016

0.1.5

0.1.5.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

08/06 2016

0.1.4

0.1.4.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

08/06 2016

0.1.3

0.1.3.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

07/06 2016

0.1.2

0.1.2.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

07/06 2016

0.1.1

0.1.1.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires

 

07/06 2016

0.1.0

0.1.0.0

A PHP library to handle WordPress plugin updates from GitHub

  Sources   Download

MIT

The Requires