Merge pull request #964 from OM4/bodyclass

WooCommerce <body> classes should be sanitised
This commit is contained in:
Coen Jacobs 2012-04-19 02:07:22 -07:00
commit 944080d6e7
2 changed files with 3 additions and 2 deletions

View File

@ -147,6 +147,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Added minus symbol before discount on view order page
* Tweak - Added yards as dimensions unit
* Fix - Replacing use of deprecated function get_current_theme() with wp_get_theme()
* Fix - Body classes now correct for WordPress themes with non alphanumeric characters
* Fix - PayPal http_build_query &amp; -> & on some PHP 5.3 servers
* Fix - update_count_callback for tags
* Localization - Slovak translation by Dušan Beleščák

View File

@ -425,7 +425,7 @@ class Woocommerce {
**/
function wp_head() {
$theme_name = ( function_exists( 'wp_get_theme' ) ) ? wp_get_theme() : get_current_theme();
$this->add_body_class( 'theme-' . strtolower( $theme_name ) );
$this->add_body_class( "theme-{$theme_name}" );
if ( is_woocommerce() ) $this->add_body_class('woocommerce');
@ -1356,7 +1356,7 @@ class Woocommerce {
/** Body Classes **********************************************************/
function add_body_class( $class ) {
$this->_body_classes[] = $class;
$this->_body_classes[] = sanitize_html_class( strtolower($class) );
}
function output_body_class( $classes ) {