Created
March 8, 2012 01:26
-
-
Save scottnix/1997848 to your computer and use it in GitHub Desktop.
Thematic Theme Framework HTML5 Boilerplate Header
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
// recreates the doctype section, html5boilerplate.com style with conditional classes | |
// http://scottnix.com/html5-header-with-thematic/ | |
function childtheme_create_doctype() { | |
$content = "<!doctype html>" . "\n"; | |
$content .= '<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" dir="' . get_bloginfo ('text_direction') . '" lang="'. get_bloginfo ('language') . '"> <![endif]-->' . "\n"; | |
$content .= '<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" dir="' . get_bloginfo ('text_direction') . '" lang="'. get_bloginfo ('language') . '"> <![endif]-->'. "\n"; | |
$content .= '<!--[if IE 8]> <html class="no-js lt-ie9" dir="' . get_bloginfo ('text_direction') . '" lang="'. get_bloginfo ('language') . '"> <![endif]-->' . "\n"; | |
$content .= "<!--[if gt IE 8]><!-->" . "\n"; | |
$content .= "<html class=\"no-js\""; | |
return $content; | |
} | |
add_filter('thematic_create_doctype', 'childtheme_create_doctype'); | |
// creates the head, meta charset, and viewport tags | |
function childtheme_head_profile() { | |
$content = "<!--<![endif]-->"; | |
$content .= "\n" . "<head>" . "\n"; | |
$content .= "<meta charset=\"utf-8\" />" . "\n"; | |
$content .= "<meta name=\"viewport\" content=\"width=device-width\" />" . "\n"; | |
return $content; | |
} | |
add_filter('thematic_head_profile', 'childtheme_head_profile'); | |
// remove meta charset tag, now in the above function | |
function childtheme_create_contenttype() { | |
// silence | |
} | |
add_filter('thematic_create_contenttype', 'childtheme_create_contenttype'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment