修复了一些问题
This commit is contained in:
@@ -13,13 +13,13 @@ if (is_user_logged_in() || (class_exists('\AKSRT\Settings\Settings') && \AKSRT\S
|
||||
|
||||
$modal_ui = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::modal_ui() : [];
|
||||
$images = $modal_ui['background'] ?? [];
|
||||
if (is_string($images)) {
|
||||
$images = array_filter(array_map('absint', explode(',', $images)));
|
||||
}
|
||||
$image_url = '';
|
||||
if (is_array($images) && $images) {
|
||||
$image_url = (string) wp_get_attachment_url((int) $images[array_rand($images)]);
|
||||
}
|
||||
$image_id = $images ? (int) $images[array_rand($images)] : 0;
|
||||
$image_html = $image_id > 0 ? wp_get_attachment_image($image_id, 'full', false, [
|
||||
'class' => 'fit-cover radius8',
|
||||
'alt' => get_bloginfo('name'),
|
||||
'loading' => 'lazy',
|
||||
'decoding' => 'async',
|
||||
]) : '';
|
||||
$auto = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::sign_modal_auto() : ['enabled' => false, 'waiting' => 5, 'expires' => 1];
|
||||
$wechat = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_weixingzh_settings() : [];
|
||||
$initial_tab = !empty($wechat['priority']) && class_exists('\AKSRT\Auth\WeixinGzh') && \AKSRT\Auth\WeixinGzh::is_enabled() ? 'oauth' : 'signin';
|
||||
@@ -30,12 +30,12 @@ $aksrt_auth_context = [
|
||||
'redirect_to' => home_url('/'),
|
||||
];
|
||||
?>
|
||||
<div id="u_sign" class="aksrt-auth-modal<?php echo $image_url !== '' ? ' has-sign-img' : ''; ?>" aria-hidden="true" role="dialog" aria-modal="true" data-auth-modal data-auto="<?php echo !empty($auto['enabled']) ? '1' : '0'; ?>" data-auto-wait="<?php echo esc_attr((string) $auto['waiting']); ?>" data-auto-expires="<?php echo esc_attr((string) $auto['expires']); ?>">
|
||||
<div id="u_sign" class="aksrt-auth-modal<?php echo $image_html !== '' ? ' has-sign-img' : ''; ?>" aria-hidden="true" role="dialog" aria-modal="true" data-auth-modal data-auto="<?php echo !empty($auto['enabled']) ? '1' : '0'; ?>" data-auto-wait="<?php echo esc_attr((string) $auto['waiting']); ?>" data-auto-expires="<?php echo esc_attr((string) $auto['expires']); ?>">
|
||||
<div class="auth-modal-backdrop" data-auth-close></div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<button type="button" class="auth-modal-close" data-auth-close aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>"><i class="fa fas fa-times"></i></button>
|
||||
<?php if ($image_url !== '') : ?><div class="sign-img" style="background-image:url('<?php echo esc_url($image_url); ?>')"></div><?php endif; ?>
|
||||
<?php if ($image_html !== '') : ?><div class="sign-img"><?php echo $image_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div><?php endif; ?>
|
||||
<?php require get_template_directory() . '/templates/parts/auth-content.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user