feat: remove forum feature (Phase 1)

This commit is contained in:
kate522 committed 2026-08-02 20:02:44 +08:00
1 parent f3e4cdd9cf
commit 2bbd7c01a3
173 files changed
+51 -27360

No files matched your search

-45
View File
@@ -7,51 +7,6 @@
defined('ABSPATH') || exit;
if (!function_exists('aksrt_get_float_shop_cart_html')) :
/**
* Floating shop cart button with badge.
*/
function aksrt_get_float_shop_cart_html(array $item = []): string {
if (!is_user_logged_in()) {
return '';
}
$shop_on = true;
if (class_exists('\AKSRT\Settings\Settings')) {
$shop = \AKSRT\Settings\Settings::get_shop_settings();
$shop_on = !empty($shop['enabled']);
}
if (!$shop_on) {
return '';
}
// Skip on cart page.
if (function_exists('is_page_template') && is_page_template('templates/pages/page-cart.php')) {
return '';
}
$url = function_exists('aksrt_get_cart_page_url') ? aksrt_get_cart_page_url() : '';
if ($url === '') {
return '';
}
$count = 0;
if (class_exists('\AKSRT\Shop\Shop')) {
$count = (int) \AKSRT\Shop\Shop::get_instance()->get_cart_count(get_current_user_id());
}
$icon = !empty($item['icon']) ? (string) $item['icon'] : 'fas fa-shopping-cart';
$style = [];
if (!empty($item['color'])) {
$style[] = '--this-color:' . esc_attr((string) $item['color']);
}
if (!empty($item['bg'])) {
$style[] = '--this-bg:' . esc_attr((string) $item['bg']);
}
$style_attr = $style ? ' style="' . implode(';', $style) . '"' : '';
$badge = $count > 0 ? (string) min(99, $count) : '';
return '<a class="float-btn float-btn-shop-cart nowave" href="' . esc_url($url) . '" title="' . esc_attr__('购物车', 'aksrt') . '"' . $style_attr . '>'
. '<i class="' . esc_attr($icon) . '" aria-hidden="true"></i>'
. '<badge cart-count="' . esc_attr($badge) . '">' . esc_html($badge) . '</badge>'
. '</a>';
}
endif;
if (!function_exists('aksrt_get_float_pay_vip_html')) :
/**
* Floating VIP open button.