导入 AKSRT 主题开发源码
This commit is contained in:
1 parent
9681dd3d48
commit
1268a55dd0
595 files changed
+127705
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
trait AKSRT_DB_Migrator_Part_3 {
|
||||
|
||||
|
||||
/**
|
||||
* 表名访问器(其它模块通过此函数取,避免散落硬编码)。
|
||||
*/
|
||||
public static function table(string $name): string {
|
||||
global $wpdb;
|
||||
$allowed = [
|
||||
'credit_log' => 'aksrt_credit_log',
|
||||
'signin_log' => 'aksrt_signin_log',
|
||||
'invite' => 'aksrt_invite',
|
||||
'dl_token' => 'aksrt_dl_token',
|
||||
'notification' => 'aksrt_notification',
|
||||
'conversation' => 'aksrt_conversation',
|
||||
'conv_message' => 'aksrt_conversation_message',
|
||||
'order' => 'aksrt_order',
|
||||
'order_item' => 'aksrt_order_item',
|
||||
'revenue' => 'aksrt_revenue',
|
||||
'withdrawal' => 'aksrt_withdrawal',
|
||||
'report' => 'aksrt_report',
|
||||
'follow' => 'aksrt_follow',
|
||||
'coupon' => 'aksrt_coupon',
|
||||
'after_sale' => 'aksrt_after_sale',
|
||||
'order_shipping' => 'aksrt_order_shipping',
|
||||
'charge_card' => 'aksrt_charge_card',
|
||||
'rebate_log' => 'aksrt_rebate_log',
|
||||
'coupon_usage' => 'aksrt_coupon_usage',
|
||||
'card_key' => 'aksrt_card_key',
|
||||
];
|
||||
if (!isset($allowed[$name])) {
|
||||
return '';
|
||||
}
|
||||
return $wpdb->prefix . $allowed[$name];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user