diff --git a/editor-style.css b/css/editor-style.css similarity index 100% rename from editor-style.css rename to css/editor-style.css diff --git a/footer.php b/footer.php index 75d168d..9fad81d 100644 --- a/footer.php +++ b/footer.php @@ -4,7 +4,7 @@ diff --git a/functions.php b/functions.php index 4b5dfa1..55d456d 100644 --- a/functions.php +++ b/functions.php @@ -1,76 +1,43 @@ - __('Primary Navigation', 'roots'), + )); - // http://codex.wordpress.org/Post_Thumbnails + // Add post thumbnails (http://codex.wordpress.org/Post_Thumbnails) add_theme_support('post-thumbnails'); // set_post_thumbnail_size(150, 150, false); + // add_image_size('category-thumb', 300, 9999); // 300px wide (and unlimited height) - // http://codex.wordpress.org/Post_Formats + // Add post formats (http://codex.wordpress.org/Post_Formats) // add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat')); - // http://codex.wordpress.org/Function_Reference/register_nav_menus - register_nav_menus(array( - 'primary_navigation' => __('Primary Navigation', 'roots') - )); + // Tell the TinyMCE editor to use a custom stylesheet + add_editor_style('css/editor-style.css'); + } add_action('after_setup_theme', 'roots_setup'); - -// http://codex.wordpress.org/Function_Reference/register_sidebar -function roots_register_sidebars() { - $sidebars = array('Sidebar', 'Footer'); - - foreach($sidebars as $sidebar) { - register_sidebar( - array( - 'id' => 'roots-' . sanitize_title($sidebar), - 'name' => __($sidebar, 'roots'), - 'description' => __($sidebar, 'roots'), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

' - ) - ); - } -} - -add_action('widgets_init', 'roots_register_sidebars'); - -// return post entry meta information -function roots_entry_meta() { - echo ''; - echo '

'. __('Written by', 'roots') .'

'; -} \ No newline at end of file diff --git a/inc/roots-actions.php b/inc/actions.php similarity index 93% rename from inc/roots-actions.php rename to inc/actions.php index 8430846..aa060a2 100644 --- a/inc/roots-actions.php +++ b/inc/actions.php @@ -20,4 +20,4 @@ function roots_google_analytics() { } } -add_action('roots_footer', 'roots_google_analytics'); \ No newline at end of file +add_action('roots_footer', 'roots_google_analytics'); diff --git a/inc/roots-activation.php b/inc/activation.php similarity index 100% rename from inc/roots-activation.php rename to inc/activation.php diff --git a/inc/roots-cleanup.php b/inc/cleanup.php similarity index 99% rename from inc/roots-cleanup.php rename to inc/cleanup.php index 56c59aa..4c6747b 100644 --- a/inc/roots-cleanup.php +++ b/inc/cleanup.php @@ -74,7 +74,7 @@ function roots_root_relative_attachment_urls() { } function enable_root_relative_urls() { - return !(is_admin() && in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))) && ROOT_RELATIVE_URLS; + return !(is_admin() && in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))) && current_theme_supports('root-relative-urls'); } if (enable_root_relative_urls()) { diff --git a/inc/config.php b/inc/config.php new file mode 100644 index 0000000..522dc8e --- /dev/null +++ b/inc/config.php @@ -0,0 +1,24 @@ +'. sprintf(__('Posted on %s at %s.', 'roots'), get_the_date(), get_the_time()) .''; + echo '

'. __('Written by', 'roots') .'

'; +} diff --git a/inc/roots-utils.php b/inc/util.php similarity index 99% rename from inc/roots-utils.php rename to inc/util.php index ec7caed..db05b6c 100644 --- a/inc/roots-utils.php +++ b/inc/util.php @@ -23,4 +23,5 @@ function add_filters($tags, $function) { foreach($tags as $tag) { add_filter($tag, $function); } -} \ No newline at end of file +} + diff --git a/inc/roots-widgets.php b/inc/widgets.php similarity index 89% rename from inc/roots-widgets.php rename to inc/widgets.php index f8a0544..81d6644 100644 --- a/inc/roots-widgets.php +++ b/inc/widgets.php @@ -1,5 +1,30 @@ __('Primary Sidebar', 'roots'), + 'id' => 'sidebar-primary', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + )); + register_sidebar(array( + 'name' => __('Footer', 'roots'), + 'id' => 'sidebar-footer', + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + )); + + // Register widgets + register_widget('Roots_Vcard_Widget'); +} +add_action('widgets_init', 'roots_widgets_init'); + +// Example vCard widget class Roots_Vcard_Widget extends WP_Widget { function Roots_Vcard_Widget() { $widget_ops = array('classname' => 'widget_roots_vcard', 'description' => __('Use this widget to add a vCard', 'roots')); @@ -126,9 +151,3 @@ class Roots_Vcard_Widget extends WP_Widget { - + \ No newline at end of file diff --git a/style.css b/style.css index bb71e6d..ff2018b 100644 --- a/style.css +++ b/style.css @@ -1,6 +1,6 @@ /* Theme Name: Roots -Theme URI: http://rootstheme.com/ +Theme URI: http://www.rootstheme.com/ Description: Roots is a starting WordPress theme made for developers that's based on HTML5 Boilerplate and Bootstrap from Twitter. Contribute on GitHub Version: 5.1.0 Author: Ben Word