Adds option to remove footer logo competely.
This commit is contained in:
parent
3391b9e112
commit
6e3a4a6e79
|
@ -35,19 +35,21 @@
|
||||||
} ?>
|
} ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</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_display_footer_logo', true) == true) : ?>
|
||||||
<?php
|
<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' ) );
|
if ( get_theme_mod( 'tainacan_footer_logo' ) ) {
|
||||||
} else {
|
$footerImage = esc_attr( get_theme_mod( 'tainacan_footer_logo' ) );
|
||||||
$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';
|
} 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 href="<?php echo get_theme_mod('tainacan_footer_logo_link', 'https://tainacan.org') ?>">
|
||||||
</a>
|
<img src="<?php echo $footerImage; ?>" class="tainacan-footer-info--logo" >
|
||||||
</div>
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
<div class="col-12 tainacan-powered">
|
<div class="col-12 tainacan-powered">
|
||||||
<span>
|
<span>
|
||||||
<?php if ( true == get_theme_mod( 'tainacan_display_powered', false ) ) {
|
<?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()
|
'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
|
* Footer Logo customizer
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue