WordPress 3.2.1 — body class changes

WordPress developers take note — somewhere between version 3.1.3 and version 3.2.1 there is a change related to custom themes and body classes that might break your CSS in some certain scenarios.

If you have custom templates with underscores in their names, updating to WordPress 3.2.1 can break your CSS. For example a template file called “template-my_custom_template.php” used to produce body class names *without* underscores prior to verison 3.2.1

<body class="template-mycustomtemplate">

As of version 3.2.1 that body class is now generated with the underscores in place:

<body class="template-my_custom_template">

This is actually the way it should have always been, but can cause havoc if you’ve got any CSS rules that use the old model.