From 1724452e3520714b0ed8a1f142dbd380497a5698 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 20 Jan 2013 15:21:04 -0600 Subject: [PATCH 01/23] Fix #643 - Fix PHP notice on search with no results --- CHANGELOG.md | 1 + index.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d1ff9..bac43c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Fix PHP notice on search with no results * Update to jQuery 1.9.0 ### 6.2.0: January 13th, 2013 diff --git a/index.php b/index.php index 4002ffe..06e72f3 100644 --- a/index.php +++ b/index.php @@ -1,2 +1,4 @@ - \ No newline at end of file + + + \ No newline at end of file From 0abc07d11c5ab0a7d16ec526d884bfc8acb63858 Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Wed, 23 Jan 2013 15:43:31 -0500 Subject: [PATCH 02/23] Add dynamic sidebars to template wrapper --- lib/utils.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/utils.php b/lib/utils.php index 0b07bb1..223b3d7 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -45,8 +45,11 @@ function roots_template_path() { return Roots_Wrapping::$main_template; } -class Roots_Wrapping { +function roots_sidebar_path() { + return Roots_Wrapping::sidebar(); +} +class Roots_Wrapping { // Stores the full path to the main template file static $main_template; @@ -65,7 +68,17 @@ class Roots_Wrapping { $templates = array('base.php'); if (self::$base) { - array_unshift($templates, sprintf('base-%s.php', self::$base )); + array_unshift($templates, sprintf('base-%s.php', self::$base)); + } + + return locate_template($templates); + } + + static function sidebar() { + $templates = array('templates/sidebar.php'); + + if (self::$base) { + array_unshift($templates, sprintf('templates/sidebar-%s.php', self::$base)); } return locate_template($templates); From f6f86aa2686e74b20da8305974ffae1eabe2de32 Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Wed, 23 Jan 2013 15:44:21 -0500 Subject: [PATCH 03/23] Replace sidebar template call with path function --- base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.php b/base.php index 9133ed7..89d618b 100644 --- a/base.php +++ b/base.php @@ -19,7 +19,7 @@ From 429cd0b3becb55da735f06b6223956aa41fcaafa Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Wed, 23 Jan 2013 15:52:10 -0500 Subject: [PATCH 04/23] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bac43c4..db764c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Add support for dynamic sidebar templates * Fix PHP notice on search with no results * Update to jQuery 1.9.0 From 17c2dfa691d449bd45cdd9fabc49451d408fe9c2 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 27 Jan 2013 20:32:57 -0600 Subject: [PATCH 05/23] Close #646 - Replace ID's with classes --- CHANGELOG.md | 1 + assets/css/app.css | 12 ++++++------ base.php | 16 ++++++++-------- doc/lib.md | 4 ++-- lib/widgets.php | 4 ++-- templates/comments.php | 4 ++-- templates/content-single.php | 4 ++-- templates/content.php | 4 ++-- templates/footer.php | 8 +++++--- templates/header-top-navbar.php | 4 ++-- templates/header.php | 4 ++-- 11 files changed, 34 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db764c4..b5fe5e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Replace ID's with classes * Add support for dynamic sidebar templates * Fix PHP notice on search with no results * Update to jQuery 1.9.0 diff --git a/assets/css/app.css b/assets/css/app.css index e075905..7446a03 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -10,7 +10,7 @@ body { } Header ========================================================================== */ -#banner { } +.banner { } /* Fixed Topbar Navigation */ body.top-navbar { padding-top: 60px; } @@ -22,7 +22,7 @@ body.admin-bar .navbar-fixed-top { top: 28px; } Content ========================================================================== */ -#content { } +.content { } @@ -30,7 +30,7 @@ body.admin-bar .navbar-fixed-top { top: 28px; } Primary Content ========================================================================== */ -#main { } +.main { } @@ -38,7 +38,7 @@ body.admin-bar .navbar-fixed-top { top: 28px; } Sidebar ========================================================================== */ -#sidebar { } +.sidebar { } @@ -48,7 +48,7 @@ body.admin-bar .navbar-fixed-top { top: 28px; } .hentry header { } .hentry time { } -.hentry p.byline { } +.hentry .byline { } .hentry .entry-content { } .hentry footer { } @@ -58,7 +58,7 @@ body.admin-bar .navbar-fixed-top { top: 28px; } Footer ========================================================================== */ -#content-info { } +.content-info { } diff --git a/base.php b/base.php index 89d618b..5a661b7 100644 --- a/base.php +++ b/base.php @@ -12,18 +12,18 @@ } ?> -
-
-
+
+
+
-
+
- -
-
+
+
diff --git a/doc/lib.md b/doc/lib.md index 0eac4cb..73c3cd1 100644 --- a/doc/lib.md +++ b/doc/lib.md @@ -13,7 +13,7 @@ This file handles the various WordPress clean up. [About the clean up](cleanup.m ### config.php -This file is used to enable various theme features, define which pages get the sidebar, set the CSS classes for `#main` and `#sidebar`, set a Google Analytics ID, and set the post excerpt length. +This file is used to enable various theme features, define which pages get the sidebar, set the CSS classes for `.main` and `.sidebar`, set a Google Analytics ID, and set the post excerpt length. #### Enable theme features @@ -107,7 +107,7 @@ The theme wrapper is used to serve all of the template files. [About the theme w This file registers the custom sidebars and custom widgets. There are two initial sidebars: -1. Primary Sidebar (used by `templates/sidebar.php`, included from `base.php` within `#sidebar`) +1. Primary Sidebar (used by `templates/sidebar.php`, included from `base.php` within `.sidebar`) 2. Footer (used by `templates/footer.php`) The included vCard widget can be used to build additional, custom widgets. diff --git a/lib/widgets.php b/lib/widgets.php index 98e7c6b..ec654dd 100644 --- a/lib/widgets.php +++ b/lib/widgets.php @@ -5,7 +5,7 @@ function roots_widgets_init() { register_sidebar(array( 'name' => __('Primary Sidebar', 'roots'), 'id' => 'sidebar-primary', - 'before_widget' => '
', + 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', @@ -14,7 +14,7 @@ function roots_widgets_init() { register_sidebar(array( 'name' => __('Footer', 'roots'), 'id' => 'sidebar-footer', - 'before_widget' => '
', + 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', diff --git a/templates/comments.php b/templates/comments.php index 5a0f346..27a74cd 100644 --- a/templates/comments.php +++ b/templates/comments.php @@ -1,7 +1,7 @@
  • > -
    +
    %s', 'roots'), get_comment_author_link()); ?> @@ -43,7 +43,7 @@ 1 && get_option('page_comments')) : // are there comments to navigate through ?> -
  • - '')); ?> + '')); ?>
  • ','
  • ','
  • '); ?>
    diff --git a/templates/content.php b/templates/content.php index fc4084e..befb633 100644 --- a/templates/content.php +++ b/templates/content.php @@ -7,7 +7,7 @@ -
    > +
    >

    @@ -22,7 +22,7 @@ max_num_pages > 1) : ?> -