feat(header): user-box density 1:1 (check-in, wallet, VIP, signout)
Add payvip/check-in/wallet/badges strips, guest OAuth strip, confirm signout modal + REST check-in wiring for zibll header parity.
This commit is contained in:
+34
-1
@@ -303,11 +303,32 @@ if (!empty($aksrt_bg_styles)) {
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (function_exists('aksrt_header_payvip_bar')) {
|
||||
echo aksrt_header_payvip_bar(get_current_user_id()); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
if (function_exists('aksrt_header_user_checkin_btn')) {
|
||||
$checkin = aksrt_header_user_checkin_btn(get_current_user_id());
|
||||
if ($checkin !== '') {
|
||||
echo '<div class="mt6 em09" style="padding:2px;">' . $checkin . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
}
|
||||
if (function_exists('aksrt_header_user_wallet_mini')) {
|
||||
echo '<div class="mt6" style="padding:2px;">' . aksrt_header_user_wallet_mini(get_current_user_id()) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
} else {
|
||||
?>
|
||||
<div class="user-dropdown__credits">
|
||||
<i class="fas fa-coins" aria-hidden="true"></i>
|
||||
<span class="user-dropdown__credits-label"><?php echo esc_html($aksrt_currency_name); ?></span>
|
||||
<span class="user-dropdown__credits-value"><?php echo esc_html(number_format_i18n($aksrt_user_credit)); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if (function_exists('aksrt_header_user_badges_row')) {
|
||||
echo aksrt_header_user_badges_row(get_current_user_id()); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="user-dropdown__sep"></div>
|
||||
|
||||
@@ -326,7 +347,7 @@ if (!empty($aksrt_bg_styles)) {
|
||||
<span><?php esc_html_e('发布内容', 'aksrt'); ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a class="user-dropdown__action is-danger" href="<?php echo esc_url(wp_logout_url(home_url('/'))); ?>">
|
||||
<a class="user-dropdown__action is-danger" href="javascript:;" data-toggle="modal" data-target="#modal_signout">
|
||||
<span class="user-dropdown__action-icon is-red"><i class="fas fa-sign-out-alt" aria-hidden="true"></i></span>
|
||||
<span><?php esc_html_e('退出登录', 'aksrt'); ?></span>
|
||||
</a>
|
||||
@@ -370,6 +391,16 @@ if (!empty($aksrt_bg_styles)) {
|
||||
<span><?php esc_html_e('找回密码', 'aksrt'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (class_exists('\AKSRT\Auth\OAuth') && method_exists(\AKSRT\Auth\OAuth::get_instance(), 'render_social_buttons')) {
|
||||
$oauth_html = (string) \AKSRT\Auth\OAuth::get_instance()->render_social_buttons(__('快速登录', 'aksrt'));
|
||||
if ($oauth_html !== '') {
|
||||
echo '<div class="social_loginbar mt10">' . $oauth_html . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -385,6 +416,8 @@ if (!empty($aksrt_bg_styles)) {
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<?php if (function_exists('aksrt_render_signout_modal')) { aksrt_render_signout_modal(); } ?>
|
||||
|
||||
|
||||
<?php if (!empty($aksrt_header_settings['mobile_drawer'])) : ?>
|
||||
<div class="mobile-header nav-drawer-backdrop" id="nav-drawer-backdrop" aria-hidden="true"></div>
|
||||
|
||||
Reference in New Issue
Block a user