Upload via Git Manager GUI - footer.php

This commit is contained in:
2026-03-29 20:27:47 +00:00
parent 1a9f2ba8f2
commit cc0de6b5dd

View File

@@ -20,7 +20,13 @@
<!-- Copyright --> <!-- Copyright -->
<div class="site-info"> <div class="site-info">
<?php <?php
$copyright_text = get_theme_mod( 'footer_copyright', '&copy; ' . date('Y') . ' ' . get_bloginfo('name') ); // BUG-FIX: get_theme_mod() mit leerem Default ('') aus dem Customizer
// lieferte einen leeren String statt des Auto-Texts, wenn der User
// das Feld explizit gespeichert hatte. Jetzt wird auf empty() geprüft.
$copyright_text = get_theme_mod( 'footer_copyright', '' );
if ( empty( $copyright_text ) ) {
$copyright_text = '&copy; ' . date('Y') . ' ' . get_bloginfo('name');
}
if ( get_theme_mod('show_footer_credit', true) ) { if ( get_theme_mod('show_footer_credit', true) ) {
$full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit"> $full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit">
@@ -58,13 +64,13 @@
$datenschutz_url = get_theme_mod('footer_datenschutz_url'); $datenschutz_url = get_theme_mod('footer_datenschutz_url');
$links = array(); $links = array();
if ( !empty($impressum_url) ) { if ( ! empty($impressum_url) ) {
$links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>'; $links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>';
} }
if ( !empty($datenschutz_url) ) { if ( ! empty($datenschutz_url) ) {
$links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>'; $links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>';
} }
if ( !empty($links) ) { if ( ! empty($links) ) {
echo implode('', $links); echo implode('', $links);
} }
?> ?>
@@ -74,12 +80,10 @@
</div><!-- Ende footer-bottom-bar --> </div><!-- Ende footer-bottom-bar -->
</div><!-- Ende Container --> </div><!-- Ende Container -->
<!-- FIX: Scroll-to-Top Button war im JS referenziert aber nie im HTML vorhanden -->
<a href="#" id="scroll-to-top" aria-label="Zurück nach oben" title="Nach oben scrollen"> <a href="#" id="scroll-to-top" aria-label="Zurück nach oben" title="Nach oben scrollen">
<i class="fas fa-chevron-up"></i> <i class="fas fa-chevron-up"></i>
</a> </a>
<!-- THEME TOGGLE (Fixiert unten rechts) -->
<button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode"> <button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode">
<div class="theme-toggle-icons"> <div class="theme-toggle-icons">
<svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> <svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">