refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
namespace AKSRT\Settings;
|
||||
namespace Jio\Settings;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -32,7 +32,7 @@ class PaymentRuntime {
|
||||
'vip_free_download' => false,
|
||||
'vip_exempt_roles' => [],
|
||||
'catalog_note' => '',
|
||||
'manual_delivery_note' => __('付费或人工确认内容请在订单备注中记录交付方式。', 'aksrt'),
|
||||
'manual_delivery_note' => __('付费或人工确认内容请在订单备注中记录交付方式。', 'jio'),
|
||||
'no_logged_in' => !isset($settings['pay_no_logged_in']) || !empty($settings['pay_no_logged_in']),
|
||||
'free_logged_show' => !isset($settings['pay_free_logged_show']) || !empty($settings['pay_free_logged_show']),
|
||||
'down_alone_page' => !empty($settings['down_alone_page']),
|
||||
@@ -93,7 +93,7 @@ class PaymentRuntime {
|
||||
'desc' => $desc,
|
||||
'packages_raw' => $packages,
|
||||
'package_count' => self::count_structured_lines($packages),
|
||||
'help_text' => $desc !== '' ? $desc : __('当前支持人工确认与测试联调;接入真实网关时复用同一组字段。', 'aksrt'),
|
||||
'help_text' => $desc !== '' ? $desc : __('当前支持人工确认与测试联调;接入真实网关时复用同一组字段。', 'jio'),
|
||||
'product' => [
|
||||
'name' => sanitize_text_field((string) ($settings['pay_balance_product_name'] ?? '')),
|
||||
'price' => self::money_decimal($settings['pay_balance_price'] ?? '0.00', '0.00'),
|
||||
@@ -151,8 +151,8 @@ class PaymentRuntime {
|
||||
}
|
||||
|
||||
$filename = 'vip-' . $level . '.svg';
|
||||
if (defined('AKSRT_DIR') && is_file(AKSRT_DIR . '/assets/img/user/vip/' . $filename)) {
|
||||
return defined('AKSRT_URI') ? AKSRT_URI . '/assets/img/user/vip/' . $filename : '';
|
||||
if (defined('JIO_DIR') && is_file(JIO_DIR . '/assets/img/user/vip/' . $filename)) {
|
||||
return defined('JIO_URI') ? JIO_URI . '/assets/img/user/vip/' . $filename : '';
|
||||
}
|
||||
|
||||
return '';
|
||||
@@ -175,22 +175,22 @@ class PaymentRuntime {
|
||||
$name1 = sanitize_text_field(wp_strip_all_tags($name1_html));
|
||||
$name2 = sanitize_text_field(wp_strip_all_tags($name2_html));
|
||||
if ($name1 === '') {
|
||||
$name1 = __('黄金会员', 'aksrt');
|
||||
$name1 = __('黄金会员', 'jio');
|
||||
$name1_html = $name1;
|
||||
}
|
||||
if ($name2 === '') {
|
||||
$name2 = __('钻石会员', 'aksrt');
|
||||
$name2 = __('钻石会员', 'jio');
|
||||
$name2_html = $name2;
|
||||
}
|
||||
|
||||
$badge = $vip2_enabled ? $name2 : ($vip1_enabled ? $name1 : __('VIP', 'aksrt'));
|
||||
$badge = $vip2_enabled ? $name2 : ($vip1_enabled ? $name1 : __('VIP', 'jio'));
|
||||
|
||||
$renew_price_type = sanitize_key((string) ($settings['vip_renew_price_type'] ?? 'discount'));
|
||||
if (!in_array($renew_price_type, ['same', 'discount', 'reduce', 'customize'], true)) {
|
||||
$renew_price_type = 'discount';
|
||||
}
|
||||
|
||||
$desc = wp_kses_post((string) ($settings['pay_user_vip_desc'] ?? __('开通VIP会员,享受会员专属折扣以及多项特权', 'aksrt')));
|
||||
$desc = wp_kses_post((string) ($settings['pay_user_vip_desc'] ?? __('开通VIP会员,享受会员专属折扣以及多项特权', 'jio')));
|
||||
$more = (string) ($settings['pay_user_vip_more'] ?? '<div>购买后不支持退款</div><div>VIP权益仅适用于本站</div><div>欢迎与站长联系</div>');
|
||||
|
||||
return [
|
||||
@@ -208,7 +208,7 @@ class PaymentRuntime {
|
||||
'enabled' => $vip1_enabled,
|
||||
'name' => $name1,
|
||||
'name_html' => $name1_html,
|
||||
'desc' => wp_kses_post((string) ($settings['pay_user_vip_1_desc'] ?? __('尊享专属特权', 'aksrt'))),
|
||||
'desc' => wp_kses_post((string) ($settings['pay_user_vip_1_desc'] ?? __('尊享专属特权', 'jio'))),
|
||||
'equity' => wp_kses_post((string) (($settings['pay_user_vip_1_equity'] ?? '') !== '' ? $settings['pay_user_vip_1_equity'] : '<li>全站资源折扣购买</li><li>部分内容免费阅读</li><li>一对一技术指导</li><li>VIP用户专属QQ群</li>')),
|
||||
'img_icon' => self::get_vip_icon_url(1, (string) ($settings['vip_1_img_icon'] ?? '')),
|
||||
'product_s' => !isset($settings['vip_1_product_s']) || !empty($settings['vip_1_product_s']),
|
||||
@@ -220,7 +220,7 @@ class PaymentRuntime {
|
||||
'enabled' => $vip2_enabled,
|
||||
'name' => $name2,
|
||||
'name_html' => $name2_html,
|
||||
'desc' => wp_kses_post((string) ($settings['pay_user_vip_2_desc'] ?? __('尊享专属特权', 'aksrt'))),
|
||||
'desc' => wp_kses_post((string) ($settings['pay_user_vip_2_desc'] ?? __('尊享专属特权', 'jio'))),
|
||||
'equity' => wp_kses_post((string) (($settings['pay_user_vip_2_equity'] ?? '') !== '' ? $settings['pay_user_vip_2_equity'] : '<li>全站资源折扣购买</li><li>部分内容免费阅读</li><li>一对一技术指导</li><li>VIP用户专属QQ群</li>')),
|
||||
'img_icon' => self::get_vip_icon_url(2, (string) ($settings['vip_2_img_icon'] ?? '')),
|
||||
'product_s' => !isset($settings['vip_2_product_s']) || !empty($settings['vip_2_product_s']),
|
||||
@@ -273,7 +273,7 @@ class PaymentRuntime {
|
||||
'vip2' => $clamp_ratio($settings['payment_revenue_points_ratio_vip_2'] ?? 0),
|
||||
],
|
||||
],
|
||||
'note' => $note !== '' ? wp_kses_post($note) : __('<p>订单完成并经过结算周期后,作者分成会自动转入对应的钱包。</p>', 'aksrt'),
|
||||
'note' => $note !== '' ? wp_kses_post($note) : __('<p>订单完成并经过结算周期后,作者分成会自动转入对应的钱包。</p>', 'jio'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ class PaymentRuntime {
|
||||
|
||||
public static function affiliate_enabled(): bool { return !empty(self::get_payment_affiliate_settings()['enabled']); }
|
||||
public static function affiliate_ratio_for_user(int $user_id): int {
|
||||
$level = function_exists('aksrt_get_user_vip_level') ? (int) aksrt_get_user_vip_level($user_id) : 0;
|
||||
$level = function_exists('jio_get_user_vip_level') ? (int) jio_get_user_vip_level($user_id) : 0;
|
||||
return self::affiliate_ratio_for_level($level);
|
||||
}
|
||||
public static function affiliate_ratio_for_level(int $level): int {
|
||||
@@ -384,7 +384,7 @@ class PaymentRuntime {
|
||||
|| !empty($settings['pay_vip_pass_charge_s']);
|
||||
|
||||
return [
|
||||
'help_text' => __('微信 / 支付宝可在官方与易支付之间选择;PayPal、Stripe 独立开关。异步回调由各网关验签。', 'aksrt'),
|
||||
'help_text' => __('微信 / 支付宝可在官方与易支付之间选择;PayPal、Stripe 独立开关。异步回调由各网关验签。', 'jio'),
|
||||
'wechat_sdk_options' => $wechat,
|
||||
'alipay_sdk_options' => $alipay,
|
||||
'paypal_enabled' => $paypal_enabled,
|
||||
@@ -416,7 +416,7 @@ class PaymentRuntime {
|
||||
}
|
||||
|
||||
/**
|
||||
* Order display / checkout policy (legacy pay_* + AKSRT order ops).
|
||||
* Order display / checkout policy (legacy pay_* + Jio order ops).
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
@@ -585,7 +585,7 @@ class PaymentRuntime {
|
||||
if (!is_string($value)) {
|
||||
throw new \InvalidArgumentException('money_decimal_must_be_string');
|
||||
}
|
||||
$amount = \AKSRT\Ledger\AssetAmount::balance(trim($value));
|
||||
$amount = \Jio\Ledger\AssetAmount::balance(trim($value));
|
||||
return $amount->minor() <= $max_minor ? $amount->decimal() : $default;
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
return $default;
|
||||
|
||||
Reference in new issue
Block a user