feat(shell): header multifunc + window._win + float cart/VIP

Multi-type publish/VIP CTA in nav, zibll-like _win runtime bridge for
lightbox flags, and floating shop_cart/pay_vip commerce buttons.
This commit is contained in:
kate522 committed 2026-07-18 22:16:17 +08:00
1 parent 09029116ae
commit f929cc649c
9 files changed
+994 -441

No files matched your search

+23 -1
View File
@@ -396,6 +396,18 @@ if ($floating_enabled) :
<i class="fas fa-sun float-btn__icon-sun" aria-hidden="true"></i>
<i class="fas fa-moon float-btn__icon-moon" aria-hidden="true"></i>
</a>
<?php elseif ($item_type === 'shop_cart') :
$cart_html = function_exists('aksrt_get_float_shop_cart_html') ? aksrt_get_float_shop_cart_html($item) : '';
if ($cart_html !== '') {
echo $cart_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
<?php elseif ($item_type === 'pay_vip') :
$vip_html = function_exists('aksrt_get_float_pay_vip_html') ? aksrt_get_float_pay_vip_html($item) : '';
if ($vip_html !== '') {
echo $vip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
<?php elseif ($item_type === 'service_wechat') :
$item_class .= ' service-wechat';
$wechat_img = $item['wechat_img'] ?? ($item['qrcode_img'] ?? '');
@@ -471,7 +483,17 @@ if ($floating_enabled) :
<?php endif; ?>
</a>
<?php endif; ?>
<?php endforeach; ?>
<?php
// Commerce floats when admin list omits them.
$float_types = array_column($floating_items, 'type');
if (!in_array('shop_cart', $float_types, true) && function_exists('aksrt_get_float_shop_cart_html')) {
echo aksrt_get_float_shop_cart_html(['icon' => 'fas fa-shopping-cart']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
if (!in_array('pay_vip', $float_types, true) && function_exists('aksrt_get_float_pay_vip_html')) {
echo aksrt_get_float_pay_vip_html(['icon' => 'fa fa-diamond']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
<?php endforeach; ?>
</div>
<?php endif; ?>