Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress-GitHub-Plugin-Updater
if (is_admin()) { // note the use of is_admin() to double check that this is happening in the admin
$config = array(
'slug' => plugin_basename(__FILE__), // this is the slug of your plugin
'proper_folder_name' => 'plugin-name', // this is the name of the folder your plugin lives in
'api_url' => 'https://api.github.com/repos/username/repository-name', // the github API url of your github repo
'raw_url' => 'https://raw.github.com/username/repository-name/master', // the github raw url of your github repo
'github_url' => 'https://github.com/username/repository-name', // the github url of your github repo
'zip_url' => 'https://github.com/username/repository-name/zipball/master', // the zip url of the github repo
'sslverify' => true // wether WP should check the validity of the SSL cert when getting an update, see https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/2 and https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/4 for details
'requires' => '3.0', // which version of WordPress does your plugin require?
'tested' => '3.3', // which version of WordPress is your plugin tested up to?
'readme' => 'README.MD' // which file to use as the readme for the version number
);
new WPGitHubUpdater($config);
}
@olipayne

This comment has been minimized.

Copy link

olipayne commented Aug 25, 2014

I believe line 9 should have a comma after 'true' - https://gist.github.com/olipayne/2dd91de48939bff4137e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.