cutting some roots: removing fout-b-gone

This commit is contained in:
Ben Word
2012-01-03 16:30:51 -07:00
parent 623793379e
commit 333ad3a8b7
3 changed files with 25 additions and 130 deletions

View File

@@ -1,7 +1,6 @@
<?php
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_head', 'roots_foundation_head');
@@ -31,18 +30,6 @@ function roots_google_analytics() {
}
}
function roots_fout_b_gone() {
global $roots_options;
$roots_fout_b_gone = $roots_options['fout_b_gone'];
$template_uri = get_template_directory_uri();
if ($roots_fout_b_gone === true) {
echo "\t<script src=\"$template_uri/js/libs/foutbgone.min.js\"></script>\n";
echo "\t<script>\n";
echo "\t\tfbg.hideFOUT('asap', 100);\n";
echo "\t</script>";
}
}
function roots_1140_head() {
global $roots_options;
$roots_css_framework = $roots_options['css_framework'];
@@ -80,7 +67,7 @@ function roots_foundation_head() {
$roots_css_framework = $roots_options['css_framework'];
$template_uri = get_template_directory_uri();
if ($roots_css_framework === 'foundation') {
echo "\t<!-- Combine and Compress These Javascript Files -->\n";
echo "\t<!-- Combine and Compress These Javascript Files -->\n";
echo "\t<script src=\"$template_uri/js/foundation/jquery.reveal.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/foundation/jquery.orbit-1.3.0.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/foundation/forms.jquery.js\"></script>\n";
@@ -91,7 +78,7 @@ function roots_foundation_head() {
echo "\t<!-- IE Fix for HTML 5 Tags -->\n";
echo "\t<!--[if lt IE 9]>\n";
echo "\t\t<script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script>\n";
echo "\t<![endif]-->\n";
echo "\t<![endif]-->\n";
}
}
@@ -99,35 +86,35 @@ 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'];
$roots_bootstrap_less_js = $roots_options['bootstrap_less_javascript'];
$template_uri = get_template_directory_uri();
if ($roots_css_framework === 'bootstrap_less') {
echo "\t<script src=\"$template_uri/js/bootstrap/less-1.1.3.min.js\"></script>\n";
}
echo "\t<script src=\"$template_uri/js/bootstrap/less-1.1.3.min.js\"></script>\n";
}
if ($roots_bootstrap_js === true) {
$roots_options['bootstrap_less_javascript'] = false;
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-modal.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-alerts.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-twipsy.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-twipsy.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-popover.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-dropdown.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-scrollspy.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-tabs.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-buttons.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-buttons.js\"></script>\n";
}
if ($roots_bootstrap_less_js === true) {
$roots_options['bootstrap_javascript'] = false;
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-modal.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-alerts.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-twipsy.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-twipsy.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-popover.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-dropdown.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-scrollspy.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-tabs.js\"></script>\n";
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-buttons.js\"></script>\n";
}
echo "\t<script src=\"$template_uri/js/bootstrap/bootstrap-buttons.js\"></script>\n";
}
}
function roots_get_stylesheets() {
@@ -169,8 +156,8 @@ function roots_get_stylesheets() {
$styles .= stylesheet_link_tag('/foundation/orbit.css', 1);
$styles .= stylesheet_link_tag('/foundation/reveal.css', 1);
$styles .= stylesheet_link_tag('/foundation/mobile.css', 1);
$styles .= stylesheet_link_tag('/foundation/app.css', 1);
break;
$styles .= stylesheet_link_tag('/foundation/app.css', 1);
break;
case 'less' :
$styles .= stylesheet_link_tag('/less/less.css');
break;
@@ -179,7 +166,7 @@ function roots_get_stylesheets() {
break;
case 'bootstrap_less' :
$styles .= stylesheet_link_tag_boostrap_less('/bootstrap/lib/bootstrap.less');
break;
break;
}
if (class_exists('RGForms')) {
@@ -202,7 +189,7 @@ function roots_get_stylesheets() {
break;
case 'foundation' :
$styles .= "\t<!--[if lt IE 9]>" . stylesheet_link_tag('/foundation/ie.css', 0, false) . "<![endif]-->\n";
break;
break;
}
echo $styles;

View File

@@ -172,16 +172,15 @@ function roots_get_default_theme_options($default_framework = '') {
if ($default_framework == '') { $default_framework = apply_filters('roots_default_css_framework', 'blueprint'); }
$default_framework_settings = $roots_css_frameworks[$default_framework];
$default_theme_options = array(
'css_framework' => $default_framework,
'container_class' => $default_framework_settings['classes']['container'],
'main_class' => $default_framework_settings['classes']['main'],
'sidebar_class' => $default_framework_settings['classes']['sidebar'],
'google_analytics_id' => '',
'root_relative_urls' => true,
'clean_menu' => true,
'fout_b_gone' => false,
'bootstrap_javascript' => false,
'bootstrap_less_javascript' => false
'css_framework' => $default_framework,
'container_class' => $default_framework_settings['classes']['container'],
'main_class' => $default_framework_settings['classes']['main'],
'sidebar_class' => $default_framework_settings['classes']['sidebar'],
'google_analytics_id' => '',
'root_relative_urls' => true,
'clean_menu' => true,
'bootstrap_javascript' => false,
'bootstrap_less_javascript' => false
);
return apply_filters('roots_default_theme_options', $default_theme_options);
@@ -298,17 +297,6 @@ function roots_theme_options_render_page() {
</td>
</tr>
<tr valign="top"><th scope="row"><?php _e('Enable FOUT-B-Gone', 'roots'); ?></th>
<td>
<fieldset><legend class="screen-reader-text"><span><?php _e('Enable FOUT-B-Gone', 'roots'); ?></span></legend>
<select name="roots_theme_options[fout_b_gone]" id="roots_theme_options[fout_b_gone]">
<option value="yes" <?php selected($roots_options['fout_b_gone'], true); ?>><?php echo _e('Yes', 'roots'); ?></option>
<option value="no" <?php selected($roots_options['fout_b_gone'], false); ?>><?php echo _e('No', 'roots'); ?></option>
</select>
</fieldset>
</td>
</tr>
</table>
<?php submit_button(); ?>
@@ -362,16 +350,6 @@ function roots_theme_options_validate($input) {
$output['clean_menu'] = $input['clean_menu'];
}
if (isset($input['fout_b_gone'])) {
if ($input['fout_b_gone'] === 'yes') {
$input['fout_b_gone'] = true;
}
if ($input['fout_b_gone'] === 'no') {
$input['fout_b_gone'] = false;
}
$output['fout_b_gone'] = $input['fout_b_gone'];
}
if (isset($input['bootstrap_javascript'])) {
if ($input['bootstrap_javascript'] === 'yes') {
$input['bootstrap_javascript'] = true;