Updating Standards - spthemes/best-practices GitHub Wiki
Version Standards
When updating your theme, you should follow the sequence-based versioning system, and follow this format:
- Version naming should be 3-decimal in format.
- The first number should only increment when the theme is a brand-new version, like a redesign. In this scenario, the following numbers will reset to
0
. - The second number should only increment when a feature is added.
- The third number should only increment when a bug is fixed.
When done properly, it should look like 1.1.2
.
Version numbers should change in both the Changelog, Readme (if versioning is included), and to the style.css
and functions.php
constant variables (if included).
Add to Readme
Though not required, adding version change notes to the Readme file can be an easier and clearer way to see version differences. For an example to follow, use this format:
=2.0.0=
* Redesigned the entire theme!
=1.0.1=
* Fix navigation bug that was causing overlapping of menu items.
* Removed conflicting code for gallery.
=1.0.0=
* Initial release.
Use a Changelog
Changelogs are used to log theme updates in the same way we did in the Readme section, but are more official and include GitHub comparison references. This allows users to see changes and helps to show version differences in a comparison format that GitHub utilizes. For an example to follow, see the Genesis Sample Changelog.