diff --git a/functions.php b/functions.php index a7c067b..b253a6b 100644 --- a/functions.php +++ b/functions.php @@ -19,15 +19,15 @@ if (!isset($content_width)) { global $roots_options; $roots_css_framework = $roots_options['css_framework']; switch ($roots_css_framework) { - case 'blueprint': $content_width = 950; break; - case '960gs_12': $content_width = 940; break; - case '960gs_16': $content_width = 940; break; - case '960gs_24': $content_width = 940; break; - case '1140': $content_width = 1140; break; - case 'adapt': $content_width = 940; break; - case 'bootstrap': $content_width = 940; break; - case 'foundation': $content_width = 980; break; - default: $content_width = 950; break; + case 'blueprint': $content_width = 950; break; + case '960gs_12': $content_width = 940; break; + case '960gs_16': $content_width = 940; break; + case '960gs_24': $content_width = 940; break; + case '1140': $content_width = 1140; break; + case 'adapt': $content_width = 940; break; + case 'bootstrap': $content_width = 940; break; + case 'foundation': $content_width = 980; break; + default: $content_width = 950; break; } } diff --git a/inc/roots-actions.php b/inc/roots-actions.php index 662a8e5..9109cff 100644 --- a/inc/roots-actions.php +++ b/inc/roots-actions.php @@ -1,122 +1,10 @@ \n"; - echo "\t\tvar _gaq=[['_setAccount','$get_roots_google_analytics_id'],['_trackPageview'],['_trackPageLoadTime']];\n"; - echo "\t\t(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\n"; - echo "\t\tg.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';\n"; - echo "\t\ts.parentNode.insertBefore(g,s)}(document,'script'));\n"; - echo "\t\n"; - } -} - -function roots_1140_head() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - $template_uri = get_template_directory_uri(); - if ($roots_css_framework === '1140') { - echo "\t"; - } -} - -function roots_adapt_head() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - $template_uri = get_template_directory_uri(); - if ($roots_css_framework === 'adapt') { - echo "\n\t\n"; - echo "\t"; - } -} - -function roots_foundation_head() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - $template_uri = get_template_directory_uri(); - if ($roots_css_framework === 'foundation') { - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - } -} - -function roots_bootstrap_head() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - $roots_bootstrap_js = $roots_options['bootstrap_javascript']; - $roots_bootstrap_less_js = $roots_options['bootstrap_less_javascript']; - $template_uri = get_template_directory_uri(); - if ($roots_css_framework === 'bootstrap_less') { - echo "\t\n"; - } - if ($roots_bootstrap_js === true) { - $roots_options['bootstrap_less_javascript'] = false; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - } - if ($roots_bootstrap_less_js === true) { - $roots_options['bootstrap_javascript'] = false; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - echo "\t\n"; - } -} function roots_get_stylesheets() { global $roots_options; - $roots_css_framework = $roots_options['css_framework']; + global $roots_css_framework; $styles = ''; @@ -162,7 +50,7 @@ function roots_get_stylesheets() { $styles .= stylesheet_link_tag('/bootstrap/bootstrap.css'); break; case 'bootstrap_less' : - $styles .= stylesheet_link_tag_boostrap_less('/bootstrap/lib/bootstrap.less'); + $styles .= less_stylesheet_link_tag('/bootstrap/lib/bootstrap.less'); break; } @@ -197,74 +85,153 @@ function stylesheet_link_tag($file, $tabs = 0, $newline = true) { return $indent . '' . ($newline ? "\n" : ""); } -function stylesheet_link_tag_boostrap_less($file, $tabs = 0, $newline = true) { +function less_stylesheet_link_tag($file, $tabs = 0, $newline = true) { $indent = str_repeat("\t", $tabs); return $indent . '' . ($newline ? "\n" : ""); } -function roots_1140_header_before() { +add_action('roots_footer', 'roots_google_analytics'); + +function roots_google_analytics() { global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - if ($roots_css_framework === '1140') { - echo '