Created
May 24, 2010 15:51
-
-
Save mushon/412036 to your computer and use it in GitHub Desktop.
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 | |
//-----------------------ADDING BLUEPRINT CSS----------------------------- | |
function add_blueprint() { | |
// Include main screen styles css | |
$content = "\t"; | |
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\""; | |
$content .= get_bloginfo('stylesheet_directory'); | |
$content .= '/css/blueprint/screen.css'; | |
$content .= "\" media=\"screen, projection\" />"; | |
$content .= "\n"; | |
// Include print css | |
$content .= "\t"; | |
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\""; | |
$content .= get_bloginfo('stylesheet_directory'); | |
$content .= '/css/blueprint/print.css'; | |
$content .= "\" media=\"print\" />"; | |
$content .= "\n"; | |
// Include IE-specific CSS fix | |
$content .= "\t"; | |
$content .= "<!--[if lt IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\""; | |
$content .= get_bloginfo('stylesheet_directory'); | |
$content .= '/css/blueprint/ie.css'; | |
$content .= "\" /><![endif]-->"; | |
$content .= "\n"; | |
// Include the original style.cc again so it overides the blueprint code | |
// ideally we would've also found a way to remove the first reference to styles.css, but I couldn't find how | |
$content .= "\t"; | |
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\""; | |
$content .= get_bloginfo('stylesheet_url'); | |
$content .= "'\" media=\"screen, projection\" />"; | |
$content .= "\n"; | |
// Echo the whole thing | |
echo $content; | |
} | |
add_action ('wp_head', 'add_blueprint'); | |
//-----------------------END ADD BLUEPRINT CSS----------------------------- | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment