修复了一些问题

This commit is contained in:
kate522 committed 2026-08-23 20:59:34 +08:00
1 parent af52f9e94d
commit d7634d1ff6
9 files changed
+316 -24

No files matched your search

+3 -5
View File
@@ -34,10 +34,8 @@ remove_action('wp_footer', 'aksrt_render_footer_tabbar', 20);
remove_action('wp_footer', 'aksrt_render_float_buttons', 30);
$ui = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::sign_page_ui() : [];
$images = $ui['background'] ?? [];
if (is_string($images)) {
$images = array_filter(array_map('absint', explode(',', $images)));
}
$background_url = is_array($images) && $images ? (string) wp_get_attachment_url((int) $images[array_rand($images)]) : '';
$background_id = $images ? (int) $images[array_rand($images)] : 0;
$background_url = $background_id > 0 ? (string) wp_get_attachment_image_url($background_id, 'full') : '';
$theme_mode = (string) ($ui['theme_mode'] ?? 'no');
$position = (string) ($ui['card_position'] ?? 'right');
$aksrt_auth_context = [
@@ -59,7 +57,7 @@ $aksrt_auth_context = [
</head>
<body <?php body_class('page-template-user-sign ' . ($theme_mode !== 'no' ? $theme_mode : '')); ?>>
<?php wp_body_open(); ?>
<div class="sign-page-background"<?php echo $background_url !== '' ? ' style="background-image:url(\'' . esc_url($background_url) . '\')"' : ''; ?>></div>
<?php if ($background_url !== '') : ?><div class="sign-page-background" style="background-image:url('<?php echo esc_url($background_url); ?>')"></div><?php endif; ?>
<?php if (!empty($ui['show_header']) && !$interim) : ?><header class="sign-topbar"><a href="<?php echo esc_url(home_url('/')); ?>"><?php echo esc_html(get_bloginfo('name')); ?></a><a href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('返回首页', 'aksrt'); ?></a></header><?php endif; ?>
<main class="sign-page sign-card-position-<?php echo esc_attr($position); ?>">
<div class="sign-page-card">