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

+5 -5
View File
@@ -22,7 +22,7 @@ $obk = '';
if (isset($_GET['obk'])) {
$obk = sanitize_text_field($_GET['obk']);
$oauth_data = AKSRT_Auth_Service::get_oauth_bind_context($obk);
$oauth_data = \AKSRT\Auth\Service::get_oauth_bind_context($obk);
}
if (! $oauth_data || ! is_array($oauth_data)) {
@@ -31,7 +31,7 @@ if (! $oauth_data || ! is_array($oauth_data)) {
$bind_error = __('绑定会话已过期,请重新使用第三方登录', 'aksrt');
}
} else {
$provider_name = AKSRT_Auth_Service::get_oauth_provider_name($oauth_data['provider'] ?? '');
$provider_name = \AKSRT\Auth\Service::get_oauth_provider_name($oauth_data['provider'] ?? '');
}
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['log'], $_POST['pwd']) && empty($bind_error)) {
@@ -40,10 +40,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['log'], $_POST['pwd'])
}
if ($oauth_data === null && $obk !== '') {
$oauth_data = AKSRT_Auth_Service::get_oauth_bind_context($obk);
$oauth_data = \AKSRT\Auth\Service::get_oauth_bind_context($obk);
}
$result = AKSRT_Auth_Service::bind_oauth_account($_POST, $oauth_data);
$result = \AKSRT\Auth\Service::bind_oauth_account($_POST, $oauth_data);
if (empty($result['success'])) {
$bind_error = $result['error'] ?? __('绑定失败,请稍后重试', 'aksrt');
$bind_verify_url = $result['verify_url'] ?? '';
@@ -126,7 +126,7 @@ get_header();
</button>
</form>
<?php if (class_exists('AKSRT_Settings') ? AKSRT_Settings::registration_enabled() : get_option('users_can_register')) :
<?php if (class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::registration_enabled() : get_option('users_can_register')) :
$register_url = aksrt_get_register_url();
$register_url = add_query_arg('obk', sanitize_text_field($_GET['obk']), $register_url);
?>