cleanup. adding load_theme_textdomain support, moved some things into

after_setup_theme similar to twentyeleven, reverting
92e91d3bb5 after unexpected behavior
This commit is contained in:
Ben Word
2011-07-31 01:45:49 -06:00
parent f121c93a98
commit 0d537df73e

View File

@@ -1,13 +1,13 @@
<?php <?php
locate_template(array('inc/roots-activation.php'), true, true); // activation require_once get_template_directory() . '/inc/roots-activation.php'; // activation
locate_template(array('inc/roots-options.php'), true, true); // theme options menu require_once get_template_directory() . '/inc/roots-options.php'; // theme options
locate_template(array('inc/roots-cleanup.php'), true, true); // code cleanup/removal require_once get_template_directory() . '/inc/roots-cleanup.php'; // cleanup
locate_template(array('inc/roots-htaccess.php'), true, true); // assets rewrites and h5bp htaccess require_once get_template_directory() . '/inc/roots-htaccess.php'; // rewrites for assets, h5bp htaccess
locate_template(array('inc/roots-hooks.php'), true, true); // hooks require_once get_template_directory() . '/inc/roots-hooks.php'; // hooks
locate_template(array('inc/roots-actions.php'), true, true); // actions require_once get_template_directory() . '/inc/roots-actions.php'; // actions
locate_template(array('inc/roots-widgets.php'), true, true); // widgets require_once get_template_directory() . '/inc/roots-widgets.php'; // widgets
locate_template(array('inc/roots-custom.php'), true, true); // custom functions require_once get_template_directory() . '/inc/roots-custom.php'; // custom functions
$roots_options = roots_get_theme_options(); $roots_options = roots_get_theme_options();
@@ -21,25 +21,32 @@ if (!isset($content_width)) {
case '960gs_16': $content_width = 940; break; case '960gs_16': $content_width = 940; break;
case '960gs_24': $content_width = 940; break; case '960gs_24': $content_width = 940; break;
case '1140': $content_width = 1140; break; case '1140': $content_width = 1140; break;
case 'adapt': $content_width = 940; break;
default: $content_width = 950; break; default: $content_width = 950; break;
} }
} }
// tell the TinyMCE editor to use editor-style.css function roots_setup() {
// if you have issues with getting the editor to show your changes then use the following line: load_theme_textdomain('roots', get_template_directory() . '/lang');
// add_editor_style('editor-style.css?' . time());
add_editor_style('editor-style.css');
add_theme_support('post-thumbnails'); // tell the TinyMCE editor to use editor-style.css
// if you have issues with getting the editor to show your changes then use the following line:
// add_editor_style('editor-style.css?' . time());
add_editor_style('editor-style.css');
// http://codex.wordpress.org/Post_Formats add_theme_support('post-thumbnails');
// add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
add_theme_support('menus'); // http://codex.wordpress.org/Post_Formats
register_nav_menus(array( // add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
'primary_navigation' => __('Primary Navigation', 'roots'),
'utility_navigation' => __('Utility Navigation', 'roots') add_theme_support('menus');
)); register_nav_menus(array(
'primary_navigation' => __('Primary Navigation', 'roots'),
'utility_navigation' => __('Utility Navigation', 'roots')
));
}
add_action('after_setup_theme', 'roots_setup');
// create widget areas: sidebar, footer // create widget areas: sidebar, footer
$sidebars = array('Sidebar', 'Footer'); $sidebars = array('Sidebar', 'Footer');
@@ -52,5 +59,4 @@ foreach ($sidebars as $sidebar) {
)); ));
} }
?> ?>