Created
April 22, 2016 14:38
-
-
Save hellofromtonya/c12c98634b76b7700b835bcfbeea6745 to your computer and use it in GitHub Desktop.
Proposed fix for Genesis header right widgets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function genesis_header_body_classes( array $classes ) { | |
if ( current_theme_supports( 'custom-header' ) ) { | |
if ( get_theme_support( 'custom-header', 'default-text-color' ) !== get_header_textcolor() || get_theme_support( 'custom-header', 'default-image' ) !== get_header_image() ) | |
$classes[] = 'custom-header'; | |
} | |
if ( 'image' === genesis_get_option( 'blog_title' ) || ( get_header_image() && ! display_header_text() ) ) | |
$classes[] = 'header-image'; | |
// Instead of this conditional to set the header-full-width use the one below instead | |
// if ( ! is_active_sidebar( 'header-right' ) && ! has_action( 'genesis_header_right' ) ) | |
// $classes[] = 'header-full-width'; | |
if ( ! genesis_is_header_right_ok_to_render() ) { | |
$classes[] = 'header-full-width'; | |
} | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the scenario:
It needs an additional check to see if the sidebar is even registered.