refactor(assets): vendor 资产迁入标准目录并全仓去除 zibll 标识
- assets/vendor 全量迁移: fontawesome5→assets/fontawesome5, css→assets/css, js→assets/js/runtime(避开 14 个同名自有文件), img 合并去重→assets/img, fonts→assets/fonts; 删除 assets/vendor - libs 五个与 widgets/third-party 字节相同的库不重复入库, loader paths 改指向 - 运行时切换: _win.uri=assets 根, loader baseUrl=/js/runtime, enlighter 注入 路径同步; PHP 7 个引用文件切换并改名 $zibll_*→$runtime_* - 去品牌: Qinver 头注释/品牌 console.log/演示链接清除, 默认文案中性化 - 功能标识符改名: zib__→aksrt__, zib_ajax→aksrt_ajax, window.zib→ window.aksrtLegacy, zibllblock/*→aksrtblock/*, .zib-widget→.aksrt-panel, .zib-slider→.aksrt-slider, zib_menu_options meta 键等 - 自有 CSS 改名: legacy-utilities/compat-vars/footer shell - admin SPA 重建; 契约测试同步(路径/断言/文件更名) - 例外保留: tests/visual 对照环境与 fixtures 前缀(外部 Zibll 产品引用) 验证: php -l 133 个改动文件通过; runtime 86 个 JS node --check 通过; 契约测试 68/70(2 个失败经 stash 对照确认为存量问题)
This commit is contained in:
1 parent
4f2391fb64
commit
9375b1c30c
591 files changed
+1690
-11041
No files matched your search
@@ -189,7 +189,7 @@ class Download {
|
||||
$uid = get_current_user_id();
|
||||
$cost = aksrt_resource_download_cost($post);
|
||||
|
||||
// Daily free-download quota (Zibll).
|
||||
// Daily free-download quota (legacy).
|
||||
if ($cost <= 0 && $uid > 0 && function_exists('aksrt_check_free_download_quota')) {
|
||||
$quota = aksrt_check_free_download_quota($uid, $cost);
|
||||
if (is_wp_error($quota)) {
|
||||
|
||||
@@ -224,7 +224,7 @@ trait PayHelpers {
|
||||
'payable' => round($payable, 2),
|
||||
'rebate_price' => round($rebate_price, 2),
|
||||
],
|
||||
// zibll: points_deduction runtime hard-off; card_pass not a content payment method.
|
||||
// legacy: points_deduction runtime hard-off; card_pass not a content payment method.
|
||||
'points_deduction_allowed' => function_exists('aksrt_is_allow_points_deduction')
|
||||
? (bool) aksrt_is_allow_points_deduction('content')
|
||||
: false,
|
||||
@@ -271,7 +271,7 @@ trait PayHelpers {
|
||||
? aksrt_get_user_pay_price($post, $user_id)
|
||||
: ['amount' => 0.0, 'modo' => '0', 'pay_limit' => 0, 'vip_level' => 0, 'is_free' => true, 'base' => 0.0];
|
||||
|
||||
// Free daily quota overbuy: override amount, ignore VIP discount (zibll).
|
||||
// Free daily quota overbuy: override amount, ignore VIP discount (legacy).
|
||||
if ($price_type === 'download_limit_over') {
|
||||
$over = max(0.0, (float) ($meta['download_limit_over_price'] ?? 0));
|
||||
if ($over <= 0) {
|
||||
|
||||
@@ -261,7 +261,7 @@ trait PayOrders {
|
||||
return new \WP_Error('aksrt_wrong_modo', __('该内容仅支持积分支付。', 'aksrt'), ['status' => 400]);
|
||||
}
|
||||
|
||||
// Card pass cannot stack coupon (zibll). Content cashier does not sell via card_pass.
|
||||
// Card pass cannot stack coupon (legacy). Content cashier does not sell via card_pass.
|
||||
$payment_method = sanitize_key($payment_method);
|
||||
if ($payment_method === 'card_pass') {
|
||||
if (!function_exists('aksrt_is_content_card_pass_pay_allowed') || !aksrt_is_content_card_pass_pay_allowed($post)) {
|
||||
|
||||
@@ -121,7 +121,7 @@ trait PayRest {
|
||||
if ($uid <= 0) {
|
||||
return new \WP_Error('aksrt_need_login', __('积分支付请先登录。', 'aksrt'), ['status' => 401]);
|
||||
}
|
||||
// Points path: ignore coupon (zibll parity).
|
||||
// Points path: ignore coupon (legacy parity).
|
||||
return $this->rest_wrap_result($this->create_and_pay_points($post_id, $uid, $price_type));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* VIP modal view model + card HTML (zibll pay-vip modal / vip-card parity).
|
||||
* VIP modal view model + card HTML (legacy pay-vip modal / vip-card parity).
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -143,7 +143,7 @@ trait VipServiceModal {
|
||||
}
|
||||
|
||||
/**
|
||||
* Mini hover card for header (zibll zibpay_get_vip_card).
|
||||
* Mini hover card for header (legacy aksrtpay_get_vip_card).
|
||||
*/
|
||||
public function render_vip_card(int $level, int $user_id = 0): string {
|
||||
$level = max(1, min(2, $level));
|
||||
|
||||
@@ -12,7 +12,7 @@ trait VipServicePackages {
|
||||
|
||||
|
||||
/**
|
||||
* Parse per-level product lines (zibll vip_product).
|
||||
* Parse per-level product lines (legacy vip_product).
|
||||
*
|
||||
* Preferred: price|show_price|time|unit|tag|title
|
||||
* Legacy: price|days|title
|
||||
@@ -121,7 +121,7 @@ trait VipServicePackages {
|
||||
|
||||
|
||||
/**
|
||||
* Build upgrade package items (zibll vip_upgrade_product parity).
|
||||
* Build upgrade package items (legacy vip_upgrade_product parity).
|
||||
*
|
||||
* upgrade.product multi-line formats:
|
||||
* - permanent VIP1: permanent|price|title[|show_price]
|
||||
|
||||
@@ -538,7 +538,7 @@ trait VipServicePurchase {
|
||||
delete_user_meta($user_id, 'aksrt_vip_base_expires');
|
||||
}
|
||||
$fulfilled = false;
|
||||
// unit upgrade: raise level only, keep current expiry (zibll).
|
||||
// unit upgrade: raise level only, keep current expiry (legacy).
|
||||
if ($upgrade_mode === 'unit') {
|
||||
$this->activate_vip($user_id, $level, 0, true);
|
||||
$fulfilled = (int) get_user_meta($user_id, 'aksrt_vip_level', true) >= $level;
|
||||
@@ -598,7 +598,7 @@ trait VipServicePurchase {
|
||||
// Clear expired memory when re-granting.
|
||||
delete_user_meta($user_id, 'aksrt_vip_level_expired');
|
||||
|
||||
// Unit upgrade (zibll): keep vip_exp_date, only raise level.
|
||||
// Unit upgrade (legacy): keep vip_exp_date, only raise level.
|
||||
if ($keep_expiry) {
|
||||
return;
|
||||
}
|
||||
@@ -620,7 +620,7 @@ trait VipServicePurchase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate VIP using calendar duration (zibll month/day).
|
||||
* Activate VIP using calendar duration (legacy month/day).
|
||||
* time=0 → permanent. Extends from max(now, current_exp).
|
||||
*/
|
||||
public function activate_vip_duration(int $user_id, int $level, int $time, string $unit = 'day'): void {
|
||||
|
||||
@@ -90,7 +90,7 @@ class Visibility {
|
||||
(int) $resource_post->ID
|
||||
);
|
||||
}
|
||||
// Guest cookie paid unlock (Zibll pay_no_logged_in).
|
||||
// Guest cookie paid unlock (legacy pay_no_logged_in).
|
||||
if (!$has_paid_order && $uid <= 0 && function_exists('aksrt_guest_has_paid_access')) {
|
||||
$has_paid_order = aksrt_guest_has_paid_access((int) $resource_post->ID);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class Visibility {
|
||||
}
|
||||
$state['user_vip_level'] = $user_vip_level;
|
||||
|
||||
// Member-only purchase restriction (Zibll pay_limit).
|
||||
// Member-only purchase restriction (legacy pay_limit).
|
||||
if ($pay_limit > 0 && $pay_type !== \AKSRT\Core\DomainModel::PAY_TYPE_NO) {
|
||||
$state['need_vip'] = $uid <= 0 || $user_vip_level < $pay_limit;
|
||||
$allowed_member = $uid > 0 && $user_vip_level >= $pay_limit;
|
||||
@@ -158,7 +158,7 @@ class Visibility {
|
||||
}
|
||||
|
||||
if ($pay_type === \AKSRT\Core\DomainModel::PAY_TYPE_DOWNLOAD) {
|
||||
// Zibll: cash = order unlock; points = one-shot cashier order (not per-download deduct).
|
||||
// legacy: cash = order unlock; points = one-shot cashier order (not per-download deduct).
|
||||
$download_cost = 0;
|
||||
if ($pay_modo === 'points' && $price > 0 && !$has_paid_order) {
|
||||
$download_cost = (int) ceil($price);
|
||||
@@ -262,7 +262,7 @@ class Visibility {
|
||||
]);
|
||||
}
|
||||
|
||||
// Zibll daily free-download quota (only when free / already unlocked).
|
||||
// legacy daily free-download quota (only when free / already unlocked).
|
||||
if ($cost <= 0 && function_exists('aksrt_check_free_download_quota')) {
|
||||
// Provide per-post overbuy price to quota error.
|
||||
$over_cb = static function ($over, $uid) use ($resource_post) {
|
||||
|
||||
Reference in new issue
Block a user