Files
sage/lib/config.php
2015-10-10 12:28:19 -05:00

40 lines
1.1 KiB
PHP

<?php
namespace Roots\Sage\Config;
use Roots\Sage\ConditionalTagCheck;
/**
* Enable theme features
*/
add_theme_support('soil-clean-up'); // Enable clean up from Soil
add_theme_support('soil-nav-walker'); // Enable cleaner nav walker from Soil
add_theme_support('soil-relative-urls'); // Enable relative URLs from Soil
add_theme_support('soil-nice-search'); // Enable nice search from Soil
add_theme_support('soil-jquery-cdn'); // Enable to load jQuery from the Google CDN
/**
* Configuration values
*/
if (!defined('DIST_DIR')) {
// Path to the build directory for front-end assets
define('DIST_DIR', '/dist/');
}
/**
* Determine which pages should NOT display the sidebar
*/
function display_sidebar() {
static $display;
isset($display) || $display = !in_array(true, [
// The sidebar will NOT be displayed if ANY of the following return true.
// @link https://codex.wordpress.org/Conditional_Tags
is_404(),
is_front_page(),
is_page_template('template-custom.php'),
]);
return apply_filters('sage/display_sidebar', $display);
}