ThematicTheme / Thematic

Thematic is a free, open-source, highly extensible, search-engine optimized WordPress Theme Framework featuring 13 widget-ready areas, grid-based layout samples, styling for popular plugins, and a whole community behind it. It's perfect for beginner bloggers and WordPress development professionals. Download it today and set your WordPress-powered site on a rock-solid foundation.
http://thematictheme.com
92 stars 42 forks source link

Feature/html5 theme support #113

Closed middlesister closed 10 years ago

middlesister commented 10 years ago

@scottnix @emhr Headsup: Let's hide the checkbox for xhtml mode in the theme options by default. Upgrading child themes will need to use add_theme_support('thematic_html5') to get the html5 markup. Checkbox is confusing UI to begin with, and this ensures no accidental switches with potential disastrous results.

I added unit tests and tried with upgrading a couple of themes, but more testing is always better.

See #111

scottnix commented 10 years ago

@middlesister Thanks for all the hard work. I do like the ability to set the layout through add_theme_support much better, one less thing to have other people worry about when using child themes.

I will try to test this on new installs, on my current local install of multisite with the updated Thematic does remove the checkbox, but still retains the HTML5 layout without even adding the add_theme_support, does it know somehow it was already set (maybe this is a feature to not break existing sites using html5 markup)? I will still test on new installs when I get a chance.

middlesister commented 10 years ago

Well yes, if you have set the database option from before that will take precedence. I haven't figured out a way to not use the database option at all, it is still there but not used in the UI. The filter for showing the checkbox have simply been reversed to hide it by default.

The idea is this:

I needed to keep the database option to keep track of upgraded installs since adding theme_support in admin didn't carry over to the frontend. The theme_support overrides the database option but if no special theme_support is declared then the database option determines which markup to use.

scottnix commented 10 years ago

Finally got around to testing this. Tested on the old version of Thematic, tested on the new version of Thematic (this branch), tested in multisite and single installs of both, everything works fine.

middlesister commented 10 years ago

Great! I'm pulling this now. I need to reflect this change in the wiki page. Should also move those pages to the Thematic documentation site now that things are working again.