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

+2 -2
View File
@@ -16,7 +16,7 @@ if (!is_user_logged_in()) {
$topic_id = get_the_ID();
$user_id = get_current_user_id();
$forum = class_exists('AKSRT_Forum') ? AKSRT_Forum::get_instance() : null;
$forum = class_exists('\AKSRT\Forum\Forum') ? \AKSRT\Forum\Forum::get_instance() : null;
if (!$forum || !$forum->can_edit_topic($user_id, $topic_id)) {
wp_safe_redirect(get_permalink($topic_id));
@@ -74,7 +74,7 @@ $vote_options_raw = get_post_meta($topic_id, '_aksrt_vote_options', true) ?: [];
$vote_options_text = is_array($vote_options_raw) ? implode("\n", array_column($vote_options_raw, 'label')) : '';
// Settings & capabilities
$forum_settings = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_forum_settings() : [];
$forum_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_forum_settings() : [];
$title_maxlen = max(5, min(100, (int) ($forum_settings['other']['title_strlen_limit'] ?? 30)));
$vote_max = (int) ($forum_settings['other']['vote_max'] ?? 8);
$caps = $forum->get_compose_capabilities($user_id);