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:
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
locate_template(array('inc/roots-activation.php'), true, true); // activation
|
||||
locate_template(array('inc/roots-options.php'), true, true); // theme options menu
|
||||
locate_template(array('inc/roots-cleanup.php'), true, true); // code cleanup/removal
|
||||
locate_template(array('inc/roots-htaccess.php'), true, true); // assets rewrites and h5bp htaccess
|
||||
locate_template(array('inc/roots-hooks.php'), true, true); // hooks
|
||||
locate_template(array('inc/roots-actions.php'), true, true); // actions
|
||||
locate_template(array('inc/roots-widgets.php'), true, true); // widgets
|
||||
locate_template(array('inc/roots-custom.php'), true, true); // custom functions
|
||||
require_once get_template_directory() . '/inc/roots-activation.php'; // activation
|
||||
require_once get_template_directory() . '/inc/roots-options.php'; // theme options
|
||||
require_once get_template_directory() . '/inc/roots-cleanup.php'; // cleanup
|
||||
require_once get_template_directory() . '/inc/roots-htaccess.php'; // rewrites for assets, h5bp htaccess
|
||||
require_once get_template_directory() . '/inc/roots-hooks.php'; // hooks
|
||||
require_once get_template_directory() . '/inc/roots-actions.php'; // actions
|
||||
require_once get_template_directory() . '/inc/roots-widgets.php'; // widgets
|
||||
require_once get_template_directory() . '/inc/roots-custom.php'; // custom functions
|
||||
|
||||
$roots_options = roots_get_theme_options();
|
||||
|
||||
@@ -21,25 +21,32 @@ if (!isset($content_width)) {
|
||||
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;
|
||||
default: $content_width = 950; break;
|
||||
}
|
||||
}
|
||||
|
||||
// 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');
|
||||
function roots_setup() {
|
||||
load_theme_textdomain('roots', get_template_directory() . '/lang');
|
||||
|
||||
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-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
|
||||
add_theme_support('post-thumbnails');
|
||||
|
||||
add_theme_support('menus');
|
||||
register_nav_menus(array(
|
||||
// http://codex.wordpress.org/Post_Formats
|
||||
// add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
|
||||
|
||||
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
|
||||
$sidebars = array('Sidebar', 'Footer');
|
||||
@@ -52,5 +59,4 @@ foreach ($sidebars as $sidebar) {
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user