Files
Minecraft-Modern-Theme/Minecraft-Modern-Theme-Child/functions.php
T
2026-08-13 21:23:43 +00:00

37 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* =============================================================================
* HAUPTFUNKTION: Stylesheets korrekt laden
* =============================================================================
*/
function minecraft_modern_child_enqueue_styles() {
$parent_style = 'minecraft-modern-style';
// Cache-Busting über filemtime() statt der statischen Theme-Version:
// sonst liefern Browser nach einer CSS-Änderung weiter die alte Datei aus.
wp_enqueue_style(
$parent_style,
get_template_directory_uri() . '/style.css',
array(),
filemtime( get_template_directory() . '/style.css' )
);
wp_enqueue_style(
'minecraft-modern-child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
filemtime( get_stylesheet_directory() . '/style.css' )
);
// BUG-FIX: Der Nav-Fix-CSS für .submenu-toggle (Desktop-Ausblendung) stand
// bereits vollständig in child/style.css. Das wp_add_inline_style() hier
// hat exakt denselben CSS-Block ein zweites Mal in den <head> injiziert.
// Entfernt style.css ist die einzige Quelle der Wahrheit.
}
add_action( 'wp_enqueue_scripts', 'minecraft_modern_child_enqueue_styles' );