@@ -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
|
||||
|
||||
|
||||
2
base.php
2
base.php
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<?php if (roots_display_sidebar()) : ?>
|
||||
<aside id="sidebar" class="<?php echo roots_sidebar_class(); ?>" role="complementary">
|
||||
<?php get_template_part('templates/sidebar'); ?>
|
||||
<?php include roots_sidebar_path(); ?>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
</div><!-- /#content -->
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user