Created
June 17, 2014 09:48
-
-
Save michaelbragg/e1a7efcba3c721861b98 to your computer and use it in GitHub Desktop.
WordPress lt-ie8
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
/** | |
* HTML5 Shiv | |
* Enables use of HTML5 sectioning elements in legacy Internet | |
* Explorer and provides basic HTML5 styling for Internet Explorer 6-9 | |
*/ | |
// add ie conditional html5 shim to header | |
function add_ie_html5_shim () { | |
echo '<!--[if lt IE 9]>'; | |
echo '<script src="'. get_stylesheet_directory_uri() .'/js/lib/html5shiv-printshiv.js"></script>'; | |
echo '<![endif]-->'; | |
} | |
add_action('wp_head', 'add_ie_html5_shim'); | |
/** | |
* Respond | |
* A fast & lightweight polyfill for min/max-width CSS3 Media Queries | |
* (for IE 6-8, and more). | |
*/ | |
// add ie conditional respond to header | |
function add_ie_respond () { | |
echo '<!--[if lt IE 9]>'; | |
echo '<script src="'. get_stylesheet_directory_uri() .'/js/lib/respond.min.js"></script>'; | |
echo '<![endif]-->'; | |
} | |
add_action('wp_head', 'add_ie_respond'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment