Merge pull request #1760 from roots/remove-sidebar-defaults

Remove sidebar defaults
This commit is contained in:
Ben Word
2016-11-29 20:10:58 -07:00
committed by GitHub
3 changed files with 2 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
### HEAD
* Remove sidebar defaults ([#1760](https://github.com/roots/sage/pull/1760))
* Remove post formats ([#1759](https://github.com/roots/sage/pull/1759))
### 9.0.0-alpha.4: November 16th, 2016

View File

@@ -5,19 +5,6 @@ namespace App;
use Roots\Sage\Template;
use Roots\Sage\Template\Wrapper;
/**
* Determine which pages should NOT display the sidebar
* @link https://codex.wordpress.org/Conditional_Tags
*/
add_filter('sage/display_sidebar', function ($display) {
// The sidebar will NOT be displayed if ANY of the following return true
return $display ? !in_array(true, [
is_404(),
is_front_page(),
is_page_template('templates/template-custom.php'),
]) : $display;
});
/**
* Add <body> classes
*/

View File

@@ -35,7 +35,7 @@ function asset_path($filename)
function display_sidebar()
{
static $display;
isset($display) || $display = apply_filters('sage/display_sidebar', true);
isset($display) || $display = apply_filters('sage/display_sidebar', false);
return $display;
}