Skip to content

Instantly share code, notes, and snippets.

@mushon
Created May 24, 2010 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mushon/412036 to your computer and use it in GitHub Desktop.
Save mushon/412036 to your computer and use it in GitHub Desktop.
<?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