Created
September 28, 2012 10:09
-
-
Save samikeijonen/3798996 to your computer and use it in GitHub Desktop.
Florence Child functions.php with HTML5 shiv
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 | |
/** | |
* @package Florence Child | |
* @subpackage Functions | |
* @version 0.1 | |
* @author Galin Simeonov | |
* @link http://devpress.com | |
* @license http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
/* Do theme setup on the 'after_setup_theme' hook. */ | |
add_action( 'after_setup_theme', 'florence_child_theme_setup', 11 ); | |
function florence_child_theme_setup() { | |
/* Get action/filter hook prefix. */ | |
$prefix = hybrid_get_prefix(); | |
/* Add html5shiv.js for unsupported browsers. */ | |
add_action( 'wp_head', 'my_html5shiv' ); | |
} | |
function my_html5shiv() { | |
?> | |
<!-- Enables html5 in some unsupported browsers. --> | |
<!--[if (lt IE 9) & (!IEMobile)]> | |
<script type="text/javascript" src="<?php echo trailingslashit( get_stylesheet_directory_uri() ); ?>js/html5shiv.js"></script> | |
<![endif]--> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment