Wordpress - Making update notification functionality for my themes

You can also hook into the core update routine. (I'm looking for tutorial links, but my Google-fu is failing me this morning.)

EDIT:

See if this tutorial helps. It explains how to implement automatic upgrades for private/commercial (i.e. non-repository-hosted) Plugins.


An interest question! In fact, I think you should make a service to check update! Such as yourdomain.comn/api/update-check! Then this can return XML or JSON or some useful information related to update such as version, the url of update file (updated file should be a zip file)!

In your theme you can have:

    <?php define('OWN_THEME_VERSION', '1.1');

So, when you detected an update from above url(yourdomain.comn/api/update-check), assume it returns JSO data as following: {"version":"1.2","file":"theme.zip"}

You compare version to check for new update! Then switch to default theme with this function http://codex.wordpress.org/Function_Reference/switch_theme (in order when users access the site, they see a worlking site)! Next, your code can use curl or even file_get_contents to download zip file (theme.zip in this case)! Next, you delete all file of in your theme folder, then extrat zip file and copy its content into theme folder! I think this way it should work!

You may want to take a look on what WordPress did! I found it's in file wp-admin/includes/update-core.php, line 288, function update_core