Fix #347 - Properly enqueue stylesheets

This commit is contained in:
Ben Word
2012-04-10 21:05:36 -06:00
parent 8ca4ca7378
commit 5182162b2e
4 changed files with 15 additions and 36 deletions

View File

@@ -1,30 +1,5 @@
<?php
function roots_get_stylesheets() {
$styles = '';
$styles .= stylesheet_link_tag('/style.css', 1);
$styles .= stylesheet_link_tag('/bootstrap.css', 1);
if (BOOTSTRAP_RESPONSIVE) {
$styles .= stylesheet_link_tag('/bootstrap-responsive.css', 1);
}
$styles .= stylesheet_link_tag('/app.css', 1);
if (is_child_theme()) {
$styles .= "\t<link rel=\"stylesheet\" href=\"" . get_stylesheet_uri(). "\">\n";
}
echo $styles;
}
function stylesheet_link_tag($file, $tabs = 0, $newline = true, $rel = 'stylesheet') {
$indent = str_repeat("\t", $tabs);
return $indent . '<link rel="' . $rel .'" href="' . get_template_directory_uri() . '/css' . $file . '">' . ($newline ? "\n" : "");
}
add_action('roots_stylesheets', 'roots_get_stylesheets');
function roots_google_analytics() {
$roots_google_analytics_id = GOOGLE_ANALYTICS_ID;
if ($roots_google_analytics_id !== '') {