diff --git a/functions.php b/functions.php index 1d7afc2..25c81d1 100644 --- a/functions.php +++ b/functions.php @@ -2,31 +2,32 @@ if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__)); -require_once locate_template( '/inc/roots-activation.php' ); // activation -require_once locate_template( '/inc/roots-options.php' ); // theme options -require_once locate_template( '/inc/roots-cleanup.php' ); // cleanup -require_once locate_template( '/inc/roots-htaccess.php' ); // rewrites for assets, h5bp htaccess -require_once locate_template( '/inc/roots-hooks.php' ); // hooks -require_once locate_template( '/inc/roots-actions.php' ); // actions -require_once locate_template( '/inc/roots-widgets.php' ); // widgets -require_once locate_template( '/inc/roots-custom.php' ); // custom functions +require_once locate_template('/inc/roots-activation.php'); // activation +require_once locate_template('/inc/roots-options.php'); // theme options +require_once locate_template('/inc/roots-cleanup.php'); // cleanup +require_once locate_template('/inc/roots-htaccess.php'); // rewrites for assets, h5bp htaccess +require_once locate_template('/inc/roots-hooks.php'); // hooks +require_once locate_template('/inc/roots-actions.php'); // actions +require_once locate_template('/inc/roots-widgets.php'); // widgets +require_once locate_template('/inc/roots-custom.php'); // custom functions $roots_options = roots_get_theme_options(); // set the maximum 'Large' image width to the maximum grid width +// http://wordpress.stackexchange.com/q/11766 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; } } @@ -34,8 +35,8 @@ function roots_setup() { load_theme_textdomain('roots', get_template_directory() . '/lang'); // 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()); + // if you have issues with getting the editor to show your changes then + // use this instead: add_editor_style('editor-style.css?' . time()); add_editor_style('editor-style.css'); // http://codex.wordpress.org/Post_Thumbnails @@ -60,7 +61,7 @@ function roots_setup() { __('Primary Navigation', 'roots'), 'utility_navigation' => __('Utility Navigation', 'roots') @@ -69,15 +70,13 @@ function roots_setup() { add_action('after_setup_theme', 'roots_setup'); -/** - * Register default roots sidebars. - * Hook into 'widgets_init' function with a lower priority in your child - * theme to remove these sidebars. - */ +// http://codex.wordpress.org/Function_Reference/register_sidebar +// hook into 'widgets_init' function with a lower priority in your +// child theme to remove these sidebars function roots_register_sidebars() { register_sidebar( array( - 'id'=> 'roots-sidebar', + 'id'=> 'roots-sidebar', 'name' => __('Sidebar', 'roots'), 'description' => __('Sidebar', 'roots'), 'before_widget' => '
', @@ -87,7 +86,7 @@ function roots_register_sidebars() { )); register_sidebar( array( - 'id'=> 'roots-footer', + 'id'=> 'roots-footer', 'name' => __('Footer', 'roots'), 'description' => __('Footer', 'roots'), 'before_widget' => '
', @@ -97,7 +96,7 @@ function roots_register_sidebars() { )); } -add_action( 'widgets_init', 'roots_register_sidebars' ); +add_action('widgets_init', 'roots_register_sidebars'); // return post entry meta information function roots_entry_meta() { @@ -105,4 +104,4 @@ function roots_entry_meta() { echo ''; } -?> +?> \ No newline at end of file