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:
2026-07-17 13:29:22 +08:00
parent 8f349b40fb
commit aaf458af1c
404 changed files with 13602 additions and 7705 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
$follow_sub = isset($_GET['follow_sub']) ? sanitize_key(wp_unslash($_GET['follow_sub'])) : 'following';
$follow_sub = in_array($follow_sub, ['following', 'followers'], true) ? $follow_sub : 'following';
$follow_instance = class_exists('AKSRT_Follow') ? AKSRT_Follow::get_instance() : null;
$follow_instance = class_exists('\AKSRT\User\Follow') ? \AKSRT\User\Follow::get_instance() : null;
$following_count = $follow_instance ? (int) $follow_instance->get_following_count((int) $user_id) : 0;
$follower_count = $follow_instance ? (int) $follow_instance->get_follower_count((int) $user_id) : 0;
$list = ['items' => [], 'total' => 0, 'total_pages' => 1];
+2 -2
View File
@@ -136,8 +136,8 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
<?php
$product_page = max(1, isset($_GET['product_page']) ? (int) $_GET['product_page'] : 1);
$product_view = ['items' => [], 'total' => 0, 'max_pages' => 0];
if (class_exists('AKSRT_Shop')) {
$product_view = AKSRT_Shop::get_instance()->get_store_products((int) $user_id, $product_page, (int) $per_page);
if (class_exists('\AKSRT\Shop\Shop')) {
$product_view = \AKSRT\Shop\Shop::get_instance()->get_store_products((int) $user_id, $product_page, (int) $per_page);
}
$product_items = is_array($product_view['items'] ?? null) ? $product_view['items'] : [];
$product_max_pages = (int) ($product_view['max_pages'] ?? 0);