=== Theme Updater === Contributors: blurback Tags: github, theme, upgrader, updater Requires at least: 3.1.2 Tested up to: 3.1.2 Stable tag: v1.3.2 A theme updater for GitHub hosted WordPress themes == Description == A theme updater for GitHub hosted WordPress themes. This plugin automatically checks GitHub for new project tags and enables automatic install. == Installation == #### For the Impatient 1. Install and activate the plugin. 1. [Here](https://github.com/UCF/Theme-Updater-Demo) is a sample theme. [Download (.zip)](https://github.com/UCF/Theme-Updater-Demo/zipball/v1.1.0) #### Theme Prep ##### 1- Publish Theme to a public GitHub Repository Note: lacks support for private repositories. ##### 2- Update Your Theme's `style.css` Add `Github Theme URI` to your `style.css` header, this will be where the plugin looks for updates. I also recommend using [semantic versioning](http://semver.org/) for the version number. example header: Theme Name: Example Theme URI: http://example.com/ Github Theme URI: https://github.com/username/repo Description: My Example Theme Author: person Version: v1.0.0 Push these changes back to the project ##### 3- Create a new tag $ git tag v1.0.0 $ git push origin v1.0.0 Note: your tag numbers and theme version numbers should be in accord. ##### 4- Download and install the plugin The next time you push a new tag, it will be recognized by the plugin and you will be notified in the wp-admin. == Screenshots == 1. A new update is available. 2. Clicked "Update automatically". 3. Everything is up-to-date. == Changelog == = v1.3.2 = * Stable, import from git project == Upgrade Notice == = v1.3.2 = Because git > svn == Code Comments == The flow of the plugin is: ##### Get the Theme's Update URI Code is a mashup of Wordpress source. I'm looking at: * [`get_themes()`](http://core.trac.wordpress.org/browser/trunk/wp-includes/theme.php?rev=17978#L249) * [`get_theme_data()`](http://core.trac.wordpress.org/browser/trunk/wp-includes/theme.php?rev=17978#L163) Unfortunately `Theme URI` is not available via default [`get_theme_data()`](http://codex.wordpress.org/Function_Reference/get_theme_data), which is probably for the best because I don't want to conflict with standard [wordpress conventions](http://codex.wordpress.org/Theme_Development#Theme_Stylesheet). ##### Get the github tags Pull the tags trough the [Repository Refs API](http://develop.github.com/p/repo.html). ##### Notify Worpress of the Update Publish the update details to the `response` array in the `update_themes` transient, similar to how [Wordpress updates themes](http://core.trac.wordpress.org/browser/trunk/wp-includes/update.php?rev=17978#L188).