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
@@ -17,7 +17,7 @@ if (!have_posts()) {
|
||||
|
||||
the_post();
|
||||
|
||||
$forum = class_exists('AKSRT_Forum') ? AKSRT_Forum::get_instance() : null;
|
||||
$forum = class_exists('\AKSRT\Forum\Forum') ? \AKSRT\Forum\Forum::get_instance() : null;
|
||||
$current_user_id = get_current_user_id();
|
||||
$topic_id = get_the_ID();
|
||||
$view = $forum ? $forum->get_topic_view($topic_id, $current_user_id) : [
|
||||
@@ -37,7 +37,7 @@ $visibility_options = $view['visibility_options'] ?? [];
|
||||
$review_options = $view['review_options'] ?? [];
|
||||
|
||||
// Forum settings for names, breadcrumbs, reply
|
||||
$forum_settings = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_forum_settings() : [];
|
||||
$forum_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_forum_settings() : [];
|
||||
$forum_names = $forum_settings['names'] ?? [];
|
||||
$forum_bc = $forum_settings['post_page'] ?? [];
|
||||
$reply_settings = $forum_settings['reply'] ?? [];
|
||||
@@ -86,8 +86,8 @@ if (empty($topic['can_view'])) :
|
||||
<?php elseif ($deny_vis === 'pay' && is_user_logged_in()) : ?>
|
||||
<?php
|
||||
$viewer_id = get_current_user_id();
|
||||
$price_info = class_exists('AKSRT_Forum')
|
||||
? AKSRT_Forum::get_instance()->resolve_topic_pay_price($topic_id, $viewer_id)
|
||||
$price_info = class_exists('\AKSRT\Forum\Forum')
|
||||
? \AKSRT\Forum\Forum::get_instance()->resolve_topic_pay_price($topic_id, $viewer_id)
|
||||
: ['amount' => (float) $pay_price, 'is_free' => false, 'label' => '', 'base' => (float) $pay_price];
|
||||
$charge_amount = (float) ($price_info['amount'] ?? 0);
|
||||
$is_free_vip = !empty($price_info['is_free']);
|
||||
@@ -164,8 +164,8 @@ if (empty($topic['can_view'])) :
|
||||
<?php elseif ($deny_vis === 'pay') : ?>
|
||||
<?php
|
||||
$viewer_id = get_current_user_id();
|
||||
$price_info = class_exists('AKSRT_Forum')
|
||||
? AKSRT_Forum::get_instance()->resolve_topic_pay_price($topic_id, $viewer_id)
|
||||
$price_info = class_exists('\AKSRT\Forum\Forum')
|
||||
? \AKSRT\Forum\Forum::get_instance()->resolve_topic_pay_price($topic_id, $viewer_id)
|
||||
: ['amount' => (float) $pay_price, 'is_free' => false, 'is_vip_price' => false, 'base' => (float) $pay_price, 'label' => ''];
|
||||
$charge_amount = (float) ($price_info['amount'] ?? 0);
|
||||
$base_amount = (float) ($price_info['base'] ?? $charge_amount);
|
||||
|
||||
Reference in new issue
Block a user