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
+5 -5
View File
@@ -25,8 +25,8 @@ if (function_exists('aksrt_render_post')) {
$mode = $args['mode'];␍
} elseif (function_exists('aksrt_get_post_flow') && aksrt_get_post_flow(get_the_ID()) === 'cms') {␍
$mode = 'grid-cms';␍
} elseif (class_exists('AKSRT_Settings')) {␍
$archive_layout = AKSRT_Settings::get_archive_layout();␍
} elseif (class_exists('\AKSRT\Settings\Settings')) {␍
$archive_layout = \AKSRT\Settings\Settings::get_archive_layout();␍
$mode = in_array($archive_layout, ['card', 'list', 'grid-cms'], true) ? $archive_layout : 'card';␍
}␍
␍
@@ -49,7 +49,7 @@ if (function_exists('aksrt_render_post')) {
␍
$args = isset($args) && is_array($args) ? $args : [];␍
␍
$lazy_cfg = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_lazyload_config() : ['enabled' => false, 'placeholder_url' => ''];␍
$lazy_cfg = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_lazyload_config() : ['enabled' => false, 'placeholder_url' => ''];␍
$lazy_on = !empty($lazy_cfg['enabled']);␍
$placeholder_url = !empty($lazy_cfg['placeholder_url']) ? (string) $lazy_cfg['placeholder_url'] : (get_template_directory_uri() . '/assets/img/placeholder.svg');␍
␍
@@ -59,8 +59,8 @@ if (is_string($forced_layout) && in_array($forced_layout, ['card', 'list', 'maso
$layout = $forced_layout;␍
} elseif (function_exists('aksrt_get_post_flow') && aksrt_get_post_flow(get_the_ID()) === 'cms') {␍
$layout = 'grid-cms';␍
} elseif (class_exists('AKSRT_Settings')) {␍
$layout = AKSRT_Settings::get_archive_layout();␍
} elseif (class_exists('\AKSRT\Settings\Settings')) {␍
$layout = \AKSRT\Settings\Settings::get_archive_layout();␍
}␍
␍
$post_id = get_the_ID();␍