From a068183c08a1e0533b0abc4bf9d2241a9898d4ee Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 28 Mar 2018 11:50:47 -0600 Subject: [PATCH] Left-sidebar-check improvement Make php logic more fail-proof. --- global-templates/left-sidebar-check.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/global-templates/left-sidebar-check.php b/global-templates/left-sidebar-check.php index 2d0c63c..8addadf 100644 --- a/global-templates/left-sidebar-check.php +++ b/global-templates/left-sidebar-check.php @@ -15,20 +15,22 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' ); -'; } else { $html .= 'col-md-12 content-area" id="primary">'; } echo $html; // WPCS: XSS OK. - } elseif ( is_active_sidebar( 'right-sidebar' ) && is_active_sidebar( 'left-sidebar' ) ) { + } elseif ( 'both' === $sidebar_pos ) { $html = '
'; + } elseif ( is_active_sidebar( 'right-sidebar' ) || is_active_sidebar( 'left-sidebar' ) ) { + $html .= 'col-md-8 content-area" id="primary">'; } else { $html .= 'col-md-12 content-area" id="primary">'; } @@ -36,4 +38,3 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' ); } else { echo '
'; } -