Merge branch 'master' of github.com:roots/sage

This commit is contained in:
kalenjohnson
2016-12-03 10:22:45 -08:00
4 changed files with 3 additions and 15 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

@@ -172,7 +172,7 @@ let webpackConfig = {
/* eslint-disable global-require */ /** Let's only load dependencies as needed */
if (config.env.optimize) {
if (config.enabled.optimize) {
webpackConfig = mergeWithConcat(webpackConfig, require('./webpack.config.optimize'));
}

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;
}