Skip to content

Instantly share code, notes, and snippets.

@tjtate
Created October 11, 2013 16:05
Show Gist options
  • Save tjtate/6937446 to your computer and use it in GitHub Desktop.
Save tjtate/6937446 to your computer and use it in GitHub Desktop.
public function main_css() {
$versionNum = '2.0';
if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT'])) {
echo '<link rel="stylesheet" href="'.site_url( 'dr-content/themes/dr' ) . '/css/main.css?ver='.$versionNum.'" type="text/css" media="all" />';
}
else {
wp_enqueue_style( 'dr-main-css', site_url( 'dr-content/themes/dr' ) . '/css/main.css', array(), $versionNum );
}
}
add_action( 'wp_enqueue_scripts', array( $this, 'main_css' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment