Created
October 10, 2012 22:09
-
-
Save nunomorgadinho/3868800 to your computer and use it in GitHub Desktop.
WordPress-GitHub-Plugin-Updater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe line 9 should have a comma after 'true' - https://gist.github.com/olipayne/2dd91de48939bff4137e