Created
December 20, 2018 09:05
-
-
Save aslamahamed13/a9288c002f51f333752064c64f9815b2 to your computer and use it in GitHub Desktop.
Electro - Change logo url link
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
if ( ! function_exists ( 'electro_header_logo' ) ) { | |
function electro_header_logo() { | |
$header_logo_src = apply_filters( 'electro_header_logo_src', get_template_directory_uri() . '/assets/images/logo.png' ); | |
if ( ! empty( $header_logo_src ) ) { | |
$your_link ='#'; | |
ob_start(); | |
?> | |
<div class="<?php if ( current_filter() !== 'electro_header_logo_area' ) : ?>header-logo<?php else: ?>header-site-branding<?php endif; ?>"> | |
<a href="<?php echo esc_url( $your_link ); ?>" class="header-logo-link"> | |
<?php electro_get_template( 'global/logo-svg.php' ); ?> | |
</a> | |
</div> | |
<?php | |
echo apply_filters( 'electro_header_logo_html', ob_get_clean() ); | |
} | |
} | |
} | |
if ( ! function_exists( 'redux_apply_header_logo' ) ) { | |
function redux_apply_header_logo( $logo ) { | |
global $electro_options; | |
if ( ! empty( $electro_options['site_header_logo']['url'] ) ) { | |
$logo_image_src = $electro_options['site_header_logo']['url']; | |
if ( is_ssl() ) { | |
$logo_image_src = str_replace( 'http:', 'https:', $logo_image_src ); | |
} | |
$your_link = '#'; | |
ob_start(); | |
?> | |
<div class="header-site-branding"> | |
<a href="<?php echo esc_url( $your_link ); ?>" class="header-logo-link"> | |
<img src="<?php echo esc_url( $logo_image_src ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" class="img-header-logo" width="<?php echo esc_attr( $electro_options['site_header_logo']['width'] ); ?>" height="<?php echo esc_attr( $electro_options['site_header_logo']['height'] ); ?>" /> | |
</a> | |
</div> | |
<?php | |
$logo = ob_get_clean(); | |
} | |
return $logo; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment