Enable automatic updates for your GitHub-hosted WordPress plugins.
This is a variant of Andy Fragen's excellent GitHub Updater plugin. If you need all the bells and whistles (BitBucket, private repositories, etc), please use Andy's plugin!
Add the following line to your plugin's meta information, replacing owner/repo
with your public repository.
GitHub URI: owner/repo
Then, add github-updater.php
to your plugin folder, and include()
it from within your main plugin file. Make sure it loads before the plugins_loaded
action fires.
include( dirname( __FILE__ ) . '/github-updater.php' );
The code fetches git tags to determine whether updates are available.
That's it, have fun!