Custom WordPress Theme Flagged As Requiring Upgrade

A strange thing happened the other day. I built a basic custom theme for WordPress, gave it a name, version and deployed it locally. Immediately my updates page was complaining that 1.0.0 was out of date and that I should install 2.0.1

Hovering over the link to the update gave me a clue as to what was going on. The *directory* name into which my custom plugin was installed is picked up by WordPress as the theme name slug and passed to the WordPress.org API to check for updates along with the version I specified in the theme files.

That means that even on an intranet, unless you block WordPress.org API calls, you mustn’t have any collisions in the theme names with the repository. This also means that if you come up with a completely novel and custom name for a theme that currently isn’t in the repository, the day a developer releases one with the same name and your version differs, your custom, private theme will be flagged as out of date.

I’m not suggesting that this behaviour is wrong on the part of WordPress, I’m not really sure they could do anything else, I just wanted to flag it up as something you may come across. If anyone has any API hooks that can be used in a theme functions.php to block checks then this may well be a solution – feel free to post a comment!

 

Possibly related articles

Leave a Comment

If you want support for Calendar then please do not post a comment or send an email. There is a dedicated forum and FAQ available for this purpose. Praise, criticism etc. about Calendar is welcome in comments on Calendar related articles.

Subscribe without commenting