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
@@ -15,8 +15,8 @@ if (!function_exists('aksrt_get_user_identity_signals')) {
|
||||
if ($user_id <= 0) {
|
||||
return [];
|
||||
}
|
||||
if (class_exists('AKSRT_User_Home')) {
|
||||
$signals = AKSRT_User_Home::get_instance()->get_profile_signals($user_id);
|
||||
if (class_exists('\AKSRT\User\Home')) {
|
||||
$signals = \AKSRT\User\Home::get_instance()->get_profile_signals($user_id);
|
||||
return is_array($signals) ? array_values($signals) : [];
|
||||
}
|
||||
return [];
|
||||
@@ -217,13 +217,13 @@ if (!function_exists('aksrt_is_blog_comment_hot')) {
|
||||
return true;
|
||||
}
|
||||
$threshold = 10;
|
||||
if (class_exists('AKSRT_Settings') && method_exists('AKSRT_Settings', 'get_comment_display_settings')) {
|
||||
$display = AKSRT_Settings::get_comment_display_settings();
|
||||
if (class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_comment_display_settings')) {
|
||||
$display = \AKSRT\Settings\Settings::get_comment_display_settings();
|
||||
if (isset($display['hot_threshold'])) {
|
||||
$threshold = max(1, (int) $display['hot_threshold']);
|
||||
}
|
||||
}
|
||||
$all = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_all() : [];
|
||||
$all = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
|
||||
if (isset($all['comment_hot_threshold'])) {
|
||||
$threshold = max(1, (int) $all['comment_hot_threshold']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user