fix(ui): float VIP duplicates, hover cards, UC menu and light-theme contrast

This commit is contained in:
2026-07-21 18:54:16 +08:00
parent f9b495eb14
commit 56434a9255
8 changed files with 388 additions and 108 deletions
+3 -6
View File
@@ -483,17 +483,14 @@ if ($floating_enabled) :
<?php endif; ?>
</a>
<?php endif; ?>
<?php
// Commerce floats when admin list omits them.
<?php endforeach;
// After loop: inject missing shop cart once. Never auto-inject pay_vip
// (admin may already add one; previous in-loop inject created duplicates).
$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; ?>