Skip to content

Commit

Permalink
Use apply_filters for main and sidebar classes
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Mar 31, 2014
1 parent 1a9b71e commit ea5699f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base.php
Expand Up @@ -19,11 +19,11 @@

<div class="wrap container" role="document">
<div class="content row">
<main class="main <?php echo roots_main_class(); ?>" role="main">
<main class="main <?php echo apply_filters('roots/main_class'); ?>" role="main">
<?php include roots_template_path(); ?>
</main><!-- /.main -->
<?php if (roots_display_sidebar()) : ?>
<aside class="sidebar <?php echo roots_sidebar_class(); ?>" role="complementary">
<aside class="sidebar <?php echo apply_filters('roots/sidebar_class'); ?>" role="complementary">
<?php include roots_sidebar_path(); ?>
</aside><!-- /.sidebar -->
<?php endif; ?>
Expand Down
2 changes: 2 additions & 0 deletions lib/config.php
Expand Up @@ -28,13 +28,15 @@ function roots_main_class() {

return $class;
}
add_filter('roots/main_class', 'roots_main_class');

/**
* .sidebar classes
*/
function roots_sidebar_class() {
return 'col-sm-4';
}
add_filter('roots/sidebar_class', 'roots_sidebar_class');

/**
* Define which pages shouldn't have the sidebar
Expand Down

0 comments on commit ea5699f

Please sign in to comment.