diff --git a/CHANGELOG.md b/CHANGELOG.md index a3addc2..e2556f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### 7.0.3: December 18th, 2014 +* Use `get_the_archive_title` +* Remove `wp_title`, add title-tag theme support +* Remove `Roots_Nav_Walker` as default for all menus +* Update to Bootstrap 3.3.1 +* Add some base comment styling +* Make search tearm `required` in search form + ### 7.0.2: October 24th, 2014 * Simplify comments, use core comment form and list * Remove HTML5 shiv from Modernizr build diff --git a/assets/less/components/_comments.less b/assets/less/components/_comments.less new file mode 100644 index 0000000..4b301a2 --- /dev/null +++ b/assets/less/components/_comments.less @@ -0,0 +1,19 @@ +.comment-list { + &:extend(.list-unstyled all); +} +.comment-list ol { + list-style: none; +} +.comment-form p { + &:extend(.form-group all); +} +.comment-form input[type="text"], +.comment-form input[type="email"], +.comment-form input[type="url"], +.comment-form textarea { + &:extend(.form-control all); +} +.comment-form input[type="submit"] { + &:extend(.btn all); + &:extend(.btn-primary all); +} diff --git a/assets/styles/components/_media.less b/assets/styles/components/_media.less index 349fe12..4918f7b 100644 --- a/assets/styles/components/_media.less +++ b/assets/styles/components/_media.less @@ -4,7 +4,7 @@ } .wp-caption-text { - &:extend(.thumbnail .caption); + &:extend(.thumbnail .caption all); } // Gallery shortcode diff --git a/assets/styles/main.less b/assets/styles/main.less index 49f61a5..544da42 100644 --- a/assets/styles/main.less +++ b/assets/styles/main.less @@ -8,6 +8,7 @@ // Roots @import "_global"; // Base styling & custom mixins @import "components/_buttons"; // Button tweaks +@import "components/_comments"; // Comment styling @import "components/_forms"; // Form tweaks @import "components/_media"; // WordPress media @import "components/_wp-classes"; // WordPress generated classes diff --git a/bower.json b/bower.json index 69539c0..322883d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "roots", - "version": "7.0.2", + "version": "7.0.3", "homepage": "http://roots.io", "authors": [ "Ben Word " diff --git a/lib/activation.php b/lib/activation.php index 4b677d6..fef50f7 100644 --- a/lib/activation.php +++ b/lib/activation.php @@ -15,7 +15,7 @@ function roots_theme_activation_options_init() { } add_action('admin_init', 'roots_theme_activation_options_init'); -function roots_activation_options_page_capability($capability) { +function roots_activation_options_page_capability() { return 'edit_theme_options'; } add_filter('option_page_capability_roots_activation_options', 'roots_activation_options_page_capability'); @@ -24,7 +24,7 @@ function roots_theme_activation_options_add_page() { $roots_activation_options = roots_get_theme_activation_options(); if (!$roots_activation_options) { - $theme_page = add_theme_page( + add_theme_page( __('Theme Activation', 'roots'), __('Theme Activation', 'roots'), 'edit_theme_options', @@ -141,7 +141,7 @@ function roots_theme_activation_action() { 'post_type' => 'page' ); - $result = wp_insert_post($add_default_pages); + wp_insert_post($add_default_pages); } $home = get_page_by_title(__('Home', 'roots')); diff --git a/lib/config.php b/lib/config.php index 4118848..4019a76 100644 --- a/lib/config.php +++ b/lib/config.php @@ -34,31 +34,36 @@ add_filter('body_class', 'roots_sidebar_body_class'); * See lib/sidebar.php for more details */ function roots_display_sidebar() { - $sidebar_config = new Roots_Sidebar( - /** - * Conditional tag checks (http://codex.wordpress.org/Conditional_Tags) - * Any of these conditional tags that return true won't show the sidebar - * - * To use a function that accepts arguments, use the following format: - * - * array('function_name', array('arg1', 'arg2')) - * - * The second element must be an array even if there's only 1 argument. - */ - array( - 'is_404', - 'is_front_page' - ), - /** - * Page template checks (via is_page_template()) - * Any of these page templates that return true won't show the sidebar - */ - array( - 'template-custom.php' - ) - ); + static $display; - return apply_filters('roots/display_sidebar', $sidebar_config->display); + if (!isset($display)) { + $sidebar_config = new Roots_Sidebar( + /** + * Conditional tag checks (http://codex.wordpress.org/Conditional_Tags) + * Any of these conditional tags that return true won't show the sidebar + * + * To use a function that accepts arguments, use the following format: + * + * array('function_name', array('arg1', 'arg2')) + * + * The second element must be an array even if there's only 1 argument. + */ + array( + 'is_404', + 'is_front_page' + ), + /** + * Page template checks (via is_page_template()) + * Any of these page templates that return true won't show the sidebar + */ + array( + 'template-custom.php' + ) + ); + $display = apply_filters('roots/display_sidebar', $sidebar_config->display); + } + + return $display; } /** diff --git a/lib/extras.php b/lib/extras.php index f4d9810..a7b2821 100644 --- a/lib/extras.php +++ b/lib/extras.php @@ -2,21 +2,7 @@ /** * Clean up the_excerpt() */ -function roots_excerpt_more($more) { +function roots_excerpt_more() { return ' … ' . __('Continued', 'roots') . ''; } add_filter('excerpt_more', 'roots_excerpt_more'); - -/** - * Manage output of wp_title() - */ -function roots_wp_title($title) { - if (is_feed()) { - return $title; - } - - $title .= get_bloginfo('name'); - - return $title; -} -add_filter('wp_title', 'roots_wp_title', 10); diff --git a/lib/gallery.php b/lib/gallery.php index 67f4d01..975a8ed 100644 --- a/lib/gallery.php +++ b/lib/gallery.php @@ -123,7 +123,6 @@ if (current_theme_supports('bootstrap-gallery')) { * Add class="thumbnail img-thumbnail" to attachment items */ function roots_attachment_link_class($html) { - $postid = get_the_ID(); $html = str_replace('name); - } elseif (is_post_type_archive()) { - return apply_filters('the_title', get_queried_object()->labels->name); - } elseif (is_day()) { - return sprintf(__('Daily Archives: %s', 'roots'), get_the_date()); - } elseif (is_month()) { - return sprintf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y')); - } elseif (is_year()) { - return sprintf(__('Yearly Archives: %s', 'roots'), get_the_date('Y')); - } elseif (is_author()) { - $author = get_queried_object(); - return sprintf(__('Author Archives: %s', 'roots'), apply_filters('the_author', is_object($author) ? $author->display_name : null)); - } else { - return single_cat_title('', false); - } + return get_the_archive_title(); } elseif (is_search()) { return sprintf(__('Search Results for %s', 'roots'), get_search_query()); } elseif (is_404()) { diff --git a/lib/utils.php b/lib/utils.php index 93e5116..fb8d737 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -8,7 +8,7 @@ function is_element_empty($element) { } // Tell WordPress to use searchform.php from the templates/ directory -function roots_get_search_form($form) { +function roots_get_search_form() { $form = ''; locate_template('/templates/searchform.php', true, false); return $form; diff --git a/lib/wrapper.php b/lib/wrapper.php index c5bd4b1..a281cb5 100644 --- a/lib/wrapper.php +++ b/lib/wrapper.php @@ -15,7 +15,13 @@ function roots_sidebar_path() { class Roots_Wrapping { // Stores the full path to the main template file - static $main_template; + public static $main_template; + + // basename of template file + public $slug; + + // array of templates + public $templates; // Stores the base name of the template file; e.g. 'page' for 'page.php' etc. static $base; @@ -36,6 +42,11 @@ class Roots_Wrapping { } static function wrap($main) { + // Check for other filters returning null + if (!is_string($main)) { + return $main; + } + self::$main_template = $main; self::$base = basename(self::$main_template, '.php'); diff --git a/package.json b/package.json index 2d4e926..938ee51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "roots", - "version": "7.0.2", + "version": "7.0.3", "author": "Ben Word ", "homepage": "http://roots.io", "repository": { diff --git a/style.css b/style.css index 1fecc68..ff3eb04 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ Theme Name: Roots Starter Theme Theme URI: http://roots.io/starter-theme/ Description: Roots is a WordPress starter theme based on HTML5 Boilerplate & Bootstrap. Contribute on GitHub -Version: 7.0.2 +Version: 7.0.3 Author: Roots Author URI: http://roots.io/ diff --git a/templates/head.php b/templates/head.php index 76f4e77..d081d0c 100644 --- a/templates/head.php +++ b/templates/head.php @@ -3,10 +3,9 @@ - <?php wp_title('|', true, 'right'); ?> - - + + diff --git a/templates/header.php b/templates/header.php index 6639eb7..9c2e7f2 100644 --- a/templates/header.php +++ b/templates/header.php @@ -13,7 +13,7 @@ diff --git a/templates/searchform.php b/templates/searchform.php index 2d00878..497045d 100644 --- a/templates/searchform.php +++ b/templates/searchform.php @@ -1,7 +1,7 @@