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

+6 -6
View File
@@ -16,7 +16,7 @@ if (!is_user_logged_in()) {
}
$user_id = get_current_user_id();
$can_submit = class_exists('AKSRT_Front_Submit') && AKSRT_Front_Submit::get_instance()->can_submit($user_id);
$can_submit = class_exists('\AKSRT\Core\FrontSubmit') && \AKSRT\Core\FrontSubmit::get_instance()->can_submit($user_id);
if (!$can_submit) {
wp_redirect(home_url('/'));
@@ -38,8 +38,8 @@ get_header();
// Submit settings
$submit_settings = [];
if (class_exists('AKSRT_Settings')) {
$all = AKSRT_Settings::get_all();
if (class_exists('\AKSRT\Settings\Settings')) {
$all = \AKSRT\Settings\Settings::get_all();
$submit_settings = [
'enabled' => !empty($all['front_submit_enabled']),
'review_mode' => $all['front_submit_review_mode'] ?? 'pending',
@@ -68,8 +68,8 @@ if ($edit_post && taxonomy_exists('topics')) {
// §3.4 custom_filter: load dimension definitions for submit form
$custom_dimensions = [];
if (!empty($submit_settings['custom_filter_s']) && class_exists('AKSRT_Settings')) {
$filter_all = AKSRT_Settings::get_post_filter_settings();
if (!empty($submit_settings['custom_filter_s']) && class_exists('\AKSRT\Settings\Settings')) {
$filter_all = \AKSRT\Settings\Settings::get_post_filter_settings();
$custom_dimensions = $filter_all['custom_filter'];
}
@@ -280,7 +280,7 @@ if (file_exists($front_submit_path)) {
(string) filemtime($front_submit_path),
true
);
$ai_available = class_exists('AKSRT_AI') && AKSRT_AI::get_instance()->is_available();
$ai_available = class_exists('\AKSRT\Ai\AI') && \AKSRT\Ai\AI::get_instance()->is_available();
wp_localize_script('aksrt-front-submit', 'aksrtSubmitData', [
'ajaxUrl' => admin_url('admin-ajax.php'),
'nonce' => wp_create_nonce('aksrt_submit_nonce'),