Skip to content

Instantly share code, notes, and snippets.

@samikeijonen
Created September 28, 2012 10:09
Show Gist options
  • Save samikeijonen/3798996 to your computer and use it in GitHub Desktop.
Save samikeijonen/3798996 to your computer and use it in GitHub Desktop.
Florence Child functions.php with HTML5 shiv
<?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