feat(users): normalize center routes and withdrawal limits
This commit is contained in:
@@ -14,7 +14,7 @@ class DBMigrator {
|
||||
use DBMigratorVip;
|
||||
|
||||
/** Current schema version; changing it re-runs dbDelta. */
|
||||
const SCHEMA_VERSION = '1.21.0';
|
||||
const SCHEMA_VERSION = '1.22.0';
|
||||
|
||||
const OPT_KEY = 'aksrt_db_schema_version';
|
||||
|
||||
|
||||
@@ -224,6 +224,7 @@ trait DBMigratorPart2 {
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
user_id BIGINT UNSIGNED NOT NULL,
|
||||
amount DECIMAL(10,2) NOT NULL DEFAULT 0,
|
||||
gross_amount DECIMAL(10,2) NOT NULL DEFAULT 0,
|
||||
method VARCHAR(32) NOT NULL DEFAULT '',
|
||||
account_info TEXT DEFAULT NULL,
|
||||
status VARCHAR(20) NOT NULL DEFAULT 'pending',
|
||||
@@ -232,6 +233,7 @@ trait DBMigratorPart2 {
|
||||
note TEXT DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY idx_user (user_id),
|
||||
KEY idx_user_created (user_id, created_at),
|
||||
KEY idx_status (status),
|
||||
KEY idx_created (created_at)
|
||||
) {$charset_collate};";
|
||||
|
||||
@@ -292,7 +292,7 @@ $hmb_js = get_template_directory() . '/assets/js/header-newadd.js';
|
||||
$is_resource_archive = function_exists('aksrt_is_resource_archive') && aksrt_is_resource_archive();
|
||||
// /user/{nicename}/ 自定义重写路由(class-aksrt-user.php 注册)
|
||||
// 此路径下 is_page() / is_page_template() 均为 false,需手动识别以正确入队 CSS
|
||||
$is_profile_route = (bool) get_query_var('user_nicename');
|
||||
$is_profile_route = (bool) get_query_var('aksrt_author_identifier');
|
||||
$is_user_center_route = (bool) get_query_var('aksrt_user_center');
|
||||
$is_static_page = is_page() || is_singular('page') || $is_profile_route || $is_user_center_route;
|
||||
$is_auth_route = (bool) get_query_var('aksrt_sign');
|
||||
|
||||
@@ -111,7 +111,7 @@ trait ScriptsPart2 {
|
||||
}
|
||||
if ((function_exists('aksrt_is_user_center_page') && aksrt_is_user_center_page())
|
||||
|| (function_exists('aksrt_is_user_home_page') && aksrt_is_user_home_page())
|
||||
|| get_query_var('user_nicename')) {
|
||||
|| get_query_var('aksrt_author_identifier')) {
|
||||
$classes[] = 'aksrt-profile';
|
||||
}
|
||||
// 区分本人中心与公开主页的 body class
|
||||
|
||||
Reference in New Issue
Block a user