Fix #347 - Properly enqueue stylesheets
This commit is contained in:
@@ -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 !== '') {
|
||||
|
||||
Reference in New Issue
Block a user