Minecraft-Modern-Theme/footer.php aktualisiert
This commit is contained in:
@@ -1,78 +1,84 @@
|
|||||||
<footer id="colophon" class="site-footer">
|
<footer id="colophon" class="site-footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="footer-widgets-container">
|
<!-- 1. OBERER BEREICH: Widgets -->
|
||||||
<div class="footer-widgets">
|
<div class="footer-widgets">
|
||||||
<?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
|
<?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
|
||||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div>
|
<div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
|
<?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
|
||||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div>
|
<div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
|
<?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
|
||||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div>
|
<div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 2. UNTERER BEREICH: Menü, Copyright, Legal -->
|
||||||
|
<div class="footer-bottom-bar">
|
||||||
|
|
||||||
|
<div class="footer-left-group">
|
||||||
|
<!-- Copyright -->
|
||||||
|
<div class="site-info">
|
||||||
|
<?php
|
||||||
|
$copyright_text = get_theme_mod( 'footer_copyright', '© ' . date('Y') . ' ' . get_bloginfo('name') );
|
||||||
|
|
||||||
|
if ( get_theme_mod('show_footer_credit', true) ) {
|
||||||
|
$full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit">
|
||||||
|
<a href="https://m-viper.de" target="_blank" rel="noopener noreferrer">
|
||||||
|
Minecraft Theme by M_Viper
|
||||||
|
</a>
|
||||||
|
</span>';
|
||||||
|
} else {
|
||||||
|
$full_footer_text = $copyright_text;
|
||||||
|
}
|
||||||
|
echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer Menü ( falls vorhanden ) -->
|
||||||
|
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
||||||
|
<nav class="footer-navigation">
|
||||||
|
<?php
|
||||||
|
wp_nav_menu(
|
||||||
|
array(
|
||||||
|
'theme_location' => 'footer',
|
||||||
|
'menu_class' => 'footer-menu',
|
||||||
|
'container' => false,
|
||||||
|
'depth' => 1, // Nur eine Ebene
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</nav>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
|
||||||
<nav class="footer-navigation">
|
|
||||||
<?php
|
|
||||||
wp_nav_menu(
|
|
||||||
array(
|
|
||||||
'theme_location' => 'footer',
|
|
||||||
'menu_class' => 'footer-menu',
|
|
||||||
'container' => false,
|
|
||||||
)
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</nav>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div class="site-info">
|
|
||||||
<?php
|
|
||||||
// Den Copyright-Text aus dem Customizer holen
|
|
||||||
$copyright_text = get_theme_mod( 'footer_copyright', '© ' . date('Y') . ' ' . get_bloginfo('name') );
|
|
||||||
|
|
||||||
// Prüfen, ob der Credit angezeigt werden soll
|
<div class="footer-right-group">
|
||||||
if ( get_theme_mod('show_footer_credit', true) ) {
|
<!-- Impressum & Datenschutz -->
|
||||||
$full_footer_text = $copyright_text . ' | <span class="footer-credit">
|
<div class="footer-legal-links">
|
||||||
<a href="https://m-viper.de" target="_blank" rel="noopener noreferrer"
|
<?php
|
||||||
style="color: inherit; text-decoration: none;">
|
$impressum_url = get_theme_mod('footer_impressum_url');
|
||||||
Minecraft Theme Erstellt von M_Viper 2025
|
$datenschutz_url = get_theme_mod('footer_datenschutz_url');
|
||||||
</a>
|
$links = array();
|
||||||
</span>';
|
|
||||||
} else {
|
|
||||||
$full_footer_text = $copyright_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!empty($impressum_url)) {
|
||||||
|
$links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>';
|
||||||
|
}
|
||||||
|
|
||||||
// Den kompletten Text ausgeben
|
if (!empty($datenschutz_url)) {
|
||||||
echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>';
|
$links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>';
|
||||||
?>
|
}
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- NEU: Impressum & Datenschutz Links -->
|
if (!empty($links)) {
|
||||||
<div class="footer-legal-links">
|
echo implode('', $links); // Kein Trennzeichen mehr, da wir Icons haben
|
||||||
<?php
|
}
|
||||||
$impressum_url = get_theme_mod('footer_impressum_url');
|
?>
|
||||||
$datenschutz_url = get_theme_mod('footer_datenschutz_url');
|
</div>
|
||||||
$links = array();
|
</div>
|
||||||
|
|
||||||
if (!empty($impressum_url)) {
|
</div> <!-- Ende footer-bottom-bar -->
|
||||||
$links[] = '<a href="' . esc_url($impressum_url) . '">Impressum</a>';
|
</div> <!-- Ende Container -->
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($datenschutz_url)) {
|
<!-- THEME TOGGLE (Fixiert unten rechts) -->
|
||||||
$links[] = '<a href="' . esc_url($datenschutz_url) . '">Datenschutz</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nur anzeigen, wenn mindestens ein Link vorhanden ist
|
|
||||||
if (!empty($links)) {
|
|
||||||
echo implode(' | ', $links);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Ovaler Dark / Light Mode Toggle mit Sonne & Mond -->
|
|
||||||
<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">
|
||||||
|
|||||||
Reference in New Issue
Block a user