fix(homepage): unify runtime rendering contract

This commit is contained in:
kate522 committed 2026-07-28 02:54:18 +08:00
1 parent bd6f55c42e
commit bcebd37807
13 files changed
+951 -926

No files matched your search

+8 -1
View File
@@ -1036,10 +1036,17 @@ $hmb_js = get_template_directory() . '/assets/js/header-newadd.js';
$enqueue_module('header-components'); // header-slider / hero
$enqueue_module('post-card');
$homepage_css_path = get_template_directory() . '/assets/css/frontend/homepage-fixed.css';
$homepage_style_deps = file_exists($frontend_bundle)
? ['aksrt-frontend-bundle', 'aksrt-header-components', 'aksrt-post-card']
: ['aksrt-zibll-compat-vars', 'aksrt-layout', 'aksrt-widgets', 'aksrt-header-components', 'aksrt-post-card'];
$homepage_style_deps = array_values(array_filter(
$homepage_style_deps,
static fn(string $handle): bool => wp_style_is($handle, 'registered')
));
wp_enqueue_style(
'aksrt-homepage-fixed',
$base_uri . '/assets/css/frontend/homepage-fixed.css',
['aksrt-zibll-compat-vars', 'aksrt-layout', 'aksrt-widgets', 'aksrt-post-card'],
$homepage_style_deps,
file_exists($homepage_css_path) ? (string) filemtime($homepage_css_path) : $version
);
}