Created
September 28, 2014 11:12
-
-
Save anunay/069e6113bea287c71022 to your computer and use it in GitHub Desktop.
Add wpml-{ICL_LANGUAGE_CODE} class to body tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add wpml-{ICL_LANGUAGE_CODE} class to body tag | |
*/ | |
function wpml_body_class( $classes ) { | |
if ( defined( 'ICL_LANGUAGE_CODE' ) ) | |
$classes[] = 'wpml-' . strtolower( ICL_LANGUAGE_CODE ); | |
return $classes; | |
} | |
add_filter( 'body_class', 'wpml_body_class' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment