closes #81 - moving get_roots_stylesheets to the hooks
This commit is contained in:
@@ -4,6 +4,7 @@ add_action('roots_head', 'roots_google_analytics');
|
||||
add_action('roots_head', 'roots_fout_b_gone');
|
||||
add_action('roots_head', 'roots_1140_head');
|
||||
add_action('roots_head', 'roots_adapt_head');
|
||||
add_action('roots_stylesheets', 'roots_get_stylesheets');
|
||||
add_action('roots_header_before', 'roots_1140_header_before');
|
||||
add_action('roots_header_after', 'roots_1140_header_after');
|
||||
add_action('roots_footer_before', 'roots_1140_footer_before');
|
||||
@@ -68,6 +69,47 @@ function roots_adapt_head() {
|
||||
}
|
||||
}
|
||||
|
||||
function roots_get_stylesheets() {
|
||||
global $roots_options;
|
||||
$roots_css_framework = $roots_options['css_framework'];
|
||||
|
||||
$template_uri = get_template_directory_uri();
|
||||
$styles = '';
|
||||
|
||||
if ($roots_css_framework === 'blueprint') {
|
||||
$styles .= "<link rel=\"stylesheet\" href=\"$template_uri/css/blueprint/screen.css\">\n";
|
||||
} elseif ($roots_css_framework === '960gs_12' || $roots_css_framework === '960gs_16') {
|
||||
$styles .= "<link rel=\"stylesheet\" href=\"$template_uri/css/960/reset.css\">\n";
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"$template_uri/css/960/text.css\">\n";
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"$template_uri/css/960/960.css\">\n";
|
||||
} elseif ($roots_css_framework === '960gs_24') {
|
||||
$styles .= "<link rel=\"stylesheet\" href=\"$template_uri/css/960/reset.css\">\n";
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"$template_uri/css/960/text.css\">\n";
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"$template_uri/css/960/960_24_col.css\">\n";
|
||||
} elseif ($roots_css_framework === '1140') {
|
||||
$styles .= "<link rel=\"stylesheet\" href=\"$template_uri/css/1140/1140.css\">\n";
|
||||
} elseif ($roots_css_framework === 'adapt') {
|
||||
$styles .= "<link rel=\"stylesheet\" href=\"$template_uri/css/adapt/master.css\">\n";
|
||||
$styles .= "\t<noscript>\n";
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"$template_uri/css/adapt/mobile.css\">\n";
|
||||
$styles .= "\t</noscript>\n";
|
||||
}
|
||||
|
||||
if (class_exists('RGForms')) {
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"" . plugins_url(). "/gravityforms/css/forms.css\">\n";
|
||||
}
|
||||
|
||||
$styles .= "\t<link rel=\"stylesheet\" href=\"$template_uri/css/style.css\">\n";
|
||||
|
||||
if ($roots_css_framework === 'blueprint') {
|
||||
$styles .= "\t<!--[if lt IE 8]><link rel=\"stylesheet\" href=\"$template_uri/css/blueprint/ie.css\"><![endif]-->\n";
|
||||
} elseif ($roots_css_framework === '1140') {
|
||||
$styles .= "\t<!--[if lt IE 8]><link rel=\"stylesheet\" href=\"$template_uri/css/1140/ie.css\"><![endif]-->\n";
|
||||
}
|
||||
|
||||
echo $styles;
|
||||
}
|
||||
|
||||
function roots_1140_header_before() {
|
||||
global $roots_options;
|
||||
$roots_css_framework = $roots_options['css_framework'];
|
||||
|
||||
Reference in New Issue
Block a user