Adds option to remove footer logo competely.
This commit is contained in:
parent
3391b9e112
commit
6e3a4a6e79
|
@ -35,19 +35,21 @@
|
|||
} ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-auto pr-0 pr-md-3 d-none d-md-block align-self-md-top">
|
||||
<?php
|
||||
|
||||
if ( get_theme_mod( 'tainacan_footer_logo' ) ) {
|
||||
$footerImage = esc_attr( get_theme_mod( 'tainacan_footer_logo' ) );
|
||||
} else {
|
||||
$footerImage = get_theme_mod( 'tainacan_footer_color', 'dark' ) == 'light' ? esc_url( get_template_directory_uri() ) . '/assets/images/logo.svg' : esc_url( get_template_directory_uri() ) . '/assets/images/logo-footer.svg';
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo get_theme_mod('tainacan_footer_logo_link', 'https://tainacan.org') ?>">
|
||||
<img src="<?php echo $footerImage; ?>" class="tainacan-footer-info--logo" >
|
||||
</a>
|
||||
</div>
|
||||
<?php if (get_theme_mod('tainacan_display_footer_logo', true) == true) : ?>
|
||||
<div class="col-auto pr-0 pr-md-3 d-none d-md-block align-self-md-top">
|
||||
<?php
|
||||
|
||||
if ( get_theme_mod( 'tainacan_footer_logo' ) ) {
|
||||
$footerImage = esc_attr( get_theme_mod( 'tainacan_footer_logo' ) );
|
||||
} else {
|
||||
$footerImage = get_theme_mod( 'tainacan_footer_color', 'dark' ) == 'light' ? esc_url( get_template_directory_uri() ) . '/assets/images/logo.svg' : esc_url( get_template_directory_uri() ) . '/assets/images/logo-footer.svg';
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo get_theme_mod('tainacan_footer_logo_link', 'https://tainacan.org') ?>">
|
||||
<img src="<?php echo $footerImage; ?>" class="tainacan-footer-info--logo" >
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="col-12 tainacan-powered">
|
||||
<span>
|
||||
<?php if ( true == get_theme_mod( 'tainacan_display_powered', false ) ) {
|
||||
|
|
|
@ -69,6 +69,24 @@ function tainacan_customize_register( $wp_customize ) {
|
|||
'choices' => tainacan_get_footer_color_options()
|
||||
) );
|
||||
|
||||
/**
|
||||
* Checkbox to display or no the Logo.
|
||||
*/
|
||||
$wp_customize->add_setting( 'tainacan_display_footer_logo', array(
|
||||
'type' => 'theme_mod',
|
||||
'default' => true,
|
||||
'capability' => 'edit_theme_options',
|
||||
'sanitize_callback' => 'tainacan_callback_sanitize_checkbox'
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'tainacan_display_footer_logo', array(
|
||||
'type' => 'checkbox',
|
||||
'settings' => 'tainacan_display_footer_logo',
|
||||
'section' => 'tainacan_footer_info',
|
||||
'label' => __( 'Display logo', 'tainacan-interface' ),
|
||||
'description' => __( 'Toggle to display or not a logo on the bottom left corner.', 'tainacan-interface' ),
|
||||
) );
|
||||
|
||||
/**
|
||||
* Footer Logo customizer
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue