From 67d12e61224d2fe5e1ba60db1c7516059c1cad94 Mon Sep 17 00:00:00 2001 From: rchq <design@rchq.com> Date: Mon, 12 Jan 2015 10:05:09 -0800 Subject: [PATCH 1/2] Update class-Shoestrap_Branding.php check HTTPS if logo is not empty. --- .../bootstrap/includes/class-Shoestrap_Branding.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/bootstrap/includes/class-Shoestrap_Branding.php b/framework/bootstrap/includes/class-Shoestrap_Branding.php index c0b5c790e0..57cbf4724f 100755 --- a/framework/bootstrap/includes/class-Shoestrap_Branding.php +++ b/framework/bootstrap/includes/class-Shoestrap_Branding.php @@ -48,11 +48,12 @@ function icons() { public static function logo() { global $ss_settings; $logo = $ss_settings['logo']; - - $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https:" : "http:"; - $logo['url'] = $protocol. str_replace(array('http:', 'https:'), '', $logo['url']); - + if ( ! empty( $logo['url'] ) ) { + //added to aid with SSL + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https:" : "http:"; + $logo['url'] = $protocol. str_replace(array('http:', 'https:'), '', $logo['url']); + $branding = '<img id="site-logo" src="' . $logo['url'] . '" alt="' . get_bloginfo( 'name' ) . '">'; } else { $branding = '<span class="sitename">' . get_bloginfo( 'name' ) . '</span>'; From 343b7000a30862640175930f3bd5f968e6bb16aa Mon Sep 17 00:00:00 2001 From: rchq <design@rchq.com> Date: Mon, 12 Jan 2015 10:06:52 -0800 Subject: [PATCH 2/2] Update class-Shoestrap_Menus.php Pulls the branding function which checks if HTTPS --- framework/bootstrap/includes/class-Shoestrap_Menus.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/bootstrap/includes/class-Shoestrap_Menus.php b/framework/bootstrap/includes/class-Shoestrap_Menus.php index 438ae1be52..1986b1a7c3 100755 --- a/framework/bootstrap/includes/class-Shoestrap_Menus.php +++ b/framework/bootstrap/includes/class-Shoestrap_Menus.php @@ -182,7 +182,7 @@ function navbar_css() { * and then add the appropriate logo or sitename. */ function navbar_brand() { - global $ss_settings, $ss_framework; + global $ss_settings; $logo = $ss_settings['logo']; $branding_class = ! empty( $logo['url'] ) ? 'logo' : 'text'; @@ -190,13 +190,13 @@ function navbar_brand() { if ( $ss_settings['navbar_brand'] === 'on' ) { $branding = '<a class="navbar-brand ' . $branding_class . '" href="' . home_url('/') . '">'; - $branding .= $ss_settings['navbar_logo'] == 1 ? $ss_framework->logo() : get_bloginfo( 'name' ); + $branding .= $ss_settings['navbar_logo'] == 1 ? Shoestrap_Branding::logo() : get_bloginfo( 'name' ); $branding .= '</a>'; } elseif ( $ss_settings['navbar_brand'] === 'off' ){ $branding = ''; } elseif ( $ss_settings['navbar_brand'] === 'both' ){ $branding = '<a class="navbar-brand ' . $branding_class . '" href="' . home_url('/') . '">'; - $branding .= $ss_framework->logo(); + $branding .= Shoestrap_Branding::logo(); $branding .= '</a>'; $branding .= '<span class="navbar-sitename">' .get_bloginfo( 'name' ) .'</span>'; }