Search code examples
phpwordpressthemesprivateupdates

Creating an Updates for Private WordPress themes


I've followed this tutorial for creating Private WordPress themes that check for updates

http://w-shadow.com/blog/2011/06/02/automatic-updates-for-commercial-themes/ everything is working fine. However I've hit a bit of problem with this method and wondered if there is a solution.

Because the function to check is in the themes functions.php it only runs if the theme is active meaning that the push notification do not work on multisite's network admin or if the theme is not currently being used.

Is there anyway to solve this?


Solution

  • You have 2 options:

    • Ship a plugin with the theme that is installed separately. Use this plugin to update your theme(s), that way your theme files will be updates regardless of whether it is active or not.
    • If you aren't distributing your theme publicly, and it's only used on your own sites then you could easily write your own cron task that runs the update script - but that depends on your situation