Skip to content

Commit

Permalink
Add a class of custom-logo to the Branding logo
Browse files Browse the repository at this point in the history
* Only exclude `custom-logo` from the global `img` selector.
  • Loading branch information
Misplon committed Jan 5, 2019
1 parent ae9e3c3 commit f4c9bd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
* @package siteorigin-north
*/

if ( ! function_exists( 'siteorigin_north_display_logo' ) ):
if ( ! function_exists( 'siteorigin_north_display_logo' ) ) :
/**
* Display the logo or site title
*/
function siteorigin_north_display_logo() {
$logo = siteorigin_setting( 'branding_logo' );
if ( ! empty( $logo ) ) {
$attrs = apply_filters( 'siteorigin_north_logo_attributes', array() );
$attrs = apply_filters( 'siteorigin_north_logo_attributes', array( 'class' => 'custom-logo' ) );

?><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<span class="screen-reader-text"><?php esc_html_e( 'Home', 'siteorigin-north' ); ?></span><?php
Expand All @@ -41,11 +41,11 @@ function siteorigin_north_display_logo() {
}
endif;

if ( ! function_exists( 'siteorigin_north_display_retina_logo' ) ):
if ( ! function_exists( 'siteorigin_north_display_retina_logo' ) ) :
/**
* Display a retina ready logo
*/
function siteorigin_north_display_retina_logo( $attr ){
function siteorigin_north_display_retina_logo( $attr ) {
if ( current_filter() == 'wp_get_attachment_image_attributes' ) {
if ( ! isset( $attr['class'] ) || $attr['class'] != 'custom-logo' ) {
return $attr;
Expand Down Expand Up @@ -412,7 +412,7 @@ function siteorigin_north_display_icon( $type ) {
break;

case 'close':
if ( siteorigin_setting( 'icons_close_search' ) ): ?>
if ( siteorigin_setting( 'icons_close_search' ) ) : ?>
<?php siteorigin_north_custom_icon( 'icons_close_search', 'svg-icon-close' ); ?>
<?php else : ?>
<svg version="1.1" class="svg-icon-close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="12px" y="12px"
Expand Down
10 changes: 5 additions & 5 deletions sass/elements/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ figure {
margin-right: 0;
}

img:not(.size-full):not(.custom-logo) {
img:not(.custom-logo) {
height: auto; // Make sure images are scaled correctly.
max-width: 100%; // Adhere to container width.
}
Expand All @@ -48,13 +48,13 @@ code {
}

#page ::-moz-selection {
background-color: $color__primary_accent;
color: #fff;
background-color: $color__primary_accent;
color: #fff;
}

#page ::selection {
background-color: $color__primary_accent;
color: #fff;
background-color: $color__primary_accent;
color: #fff;
}

@import "tables";
2 changes: 1 addition & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit f4c9bd8

@Misplon
Copy link
Member Author

@Misplon Misplon commented on f4c9bd8 Jan 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexGStapleton Please, can you pull and check this for us. Thanks.

Please sign in to comment.