refactor(autoload): migrate theme classes to Composer PSR-4

Move 288 types from global AKSRT_* + inc/classes manual requires into
namespace AKSRT\{Domain} under src/AKSRT/, wire composer.json psr-4,
and slim bootstrap to helpers/modules/hooks only. Split multi-class
widget/gateway files, update admin contract audit paths, and document
the layout in ADR/README.
This commit is contained in:
kate522 committed 2026-07-17 13:29:22 +08:00
1 parent 8f349b40fb
commit aaf458af1c
404 files changed
+13602 -7705

No files matched your search

+9 -9
View File
@@ -67,26 +67,26 @@ function aksrt_get_user_dashboard_view(int $user_id, array $args = []): array {
$user_contacts = [];
}
$user_center_settings = class_exists('AKSRT_Settings')
? AKSRT_Settings::get_user_center_settings()
$user_center_settings = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_user_center_settings()
: ['social_links' => true];
$background_url = get_user_meta($user_id, 'aksrt_background_image', true) ?: '';
$credits_enabled = class_exists('AKSRT_Settings') && AKSRT_Settings::credits_enabled();
$credits_enabled = class_exists('\AKSRT\Settings\Settings') && \AKSRT\Settings\Settings::credits_enabled();
$credit_balance = $credits_enabled && $is_own_profile && function_exists('aksrt_user_credits')
? (float) aksrt_user_credits($user_id)
: 0.0;
$currency_name = $credits_enabled && class_exists('AKSRT_Settings')
? AKSRT_Settings::get_currency_name()
$currency_name = $credits_enabled && class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_currency_name()
: __('积分', 'aksrt');
// Cash wallet (Zibll pay_balance) — separate from points.
$balance_enabled = $is_own_profile && class_exists('AKSRT_Balance') && AKSRT_Balance::enabled();
$wallet_balance = $balance_enabled ? AKSRT_Balance::balance($user_id) : 0.0;
$balance_enabled = $is_own_profile && class_exists('\AKSRT\Credits\Balance') && \AKSRT\Credits\Balance::enabled();
$wallet_balance = $balance_enabled ? \AKSRT\Credits\Balance::balance($user_id) : 0.0;
$user_home_manager = $include_governance && class_exists('AKSRT_User_Home')
? AKSRT_User_Home::get_instance()
$user_home_manager = $include_governance && class_exists('\AKSRT\User\Home')
? \AKSRT\User\Home::get_instance()
: null;
$profile_signals = $user_home_manager ? $user_home_manager->get_profile_signals($user_id) : [];
$profile_notice = $user_home_manager ? $user_home_manager->get_profile_notice($user_id) : [];