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:
1 parent
8f349b40fb
commit
aaf458af1c
404 files changed
+13602
-7705
No files matched your search
@@ -85,8 +85,8 @@ add_action('init', 'aksrt_register_topics_taxonomy');
|
||||
function aksrt_register_forum_cpt() {
|
||||
// Respect bbs_s switch — skip CPT registration when forum is disabled.
|
||||
// Admin context always registers so the backend settings page works.
|
||||
if (!is_admin() && class_exists('AKSRT_Settings')) {
|
||||
$forum = AKSRT_Settings::get_forum_settings();
|
||||
if (!is_admin() && class_exists('\AKSRT\Settings\Settings')) {
|
||||
$forum = \AKSRT\Settings\Settings::get_forum_settings();
|
||||
if (empty($forum['enabled'])) {
|
||||
return;
|
||||
}
|
||||
@@ -97,8 +97,8 @@ function aksrt_register_forum_cpt() {
|
||||
$topic_slug = 'topic';
|
||||
$forum_enabled = true;
|
||||
$forum_settings = [];
|
||||
if (class_exists('AKSRT_Settings')) {
|
||||
$forum_settings = AKSRT_Settings::get_forum_settings();
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$forum_settings = \AKSRT\Settings\Settings::get_forum_settings();
|
||||
$plate_slug = !empty($forum_settings['other']['plate_slug']) ? $forum_settings['other']['plate_slug'] : 'board';
|
||||
$topic_slug = !empty($forum_settings['other']['posts_slug']) ? $forum_settings['other']['posts_slug'] : 'topic';
|
||||
$forum_enabled = !empty($forum_settings['enabled']);
|
||||
@@ -202,8 +202,8 @@ add_action('init', 'aksrt_register_forum_cpt');
|
||||
// ============================================================
|
||||
|
||||
function aksrt_register_forum_plate_cpt() {
|
||||
if (!is_admin() && class_exists('AKSRT_Settings')) {
|
||||
$forum = AKSRT_Settings::get_forum_settings();
|
||||
if (!is_admin() && class_exists('\AKSRT\Settings\Settings')) {
|
||||
$forum = \AKSRT\Settings\Settings::get_forum_settings();
|
||||
if (empty($forum['enabled'])) {
|
||||
return;
|
||||
}
|
||||
@@ -212,8 +212,8 @@ function aksrt_register_forum_plate_cpt() {
|
||||
$plate_slug = 'board';
|
||||
$forum_enabled = true;
|
||||
$forum = [];
|
||||
if (class_exists('AKSRT_Settings')) {
|
||||
$forum = AKSRT_Settings::get_forum_settings();
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$forum = \AKSRT\Settings\Settings::get_forum_settings();
|
||||
$plate_slug = !empty($forum['other']['plate_slug']) ? $forum['other']['plate_slug'] : 'board';
|
||||
$forum_enabled = !empty($forum['enabled']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user