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
@@ -7,7 +7,7 @@
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!class_exists('AKSRT_Points_Free') || !AKSRT_Points_Free::enabled()) {
|
||||
if (!class_exists('\AKSRT\Credits\PointsFree') || !\AKSRT\Credits\PointsFree::enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ $aksrt_points_task_action = static function (string $key): array {
|
||||
$forum_on = false;
|
||||
$forum_home = '';
|
||||
$forum_compose = '';
|
||||
if (class_exists('AKSRT_Settings') && method_exists('AKSRT_Settings', 'get_forum_settings')) {
|
||||
$f = AKSRT_Settings::get_forum_settings();
|
||||
if (class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_forum_settings')) {
|
||||
$f = \AKSRT\Settings\Settings::get_forum_settings();
|
||||
$forum_on = !empty($f['enabled']);
|
||||
}
|
||||
if ($forum_on) {
|
||||
@@ -126,10 +126,10 @@ $aksrt_points_task_action = static function (string $key): array {
|
||||
};
|
||||
|
||||
$user_id = (int) ($user_id ?? get_current_user_id());
|
||||
$today = AKSRT_Points_Free::today_total($user_id);
|
||||
$day_max = (int) AKSRT_Points_Free::settings()['day_max'];
|
||||
$tasks = AKSRT_Points_Free::task_list_for_user($user_id);
|
||||
$detail = AKSRT_Points_Free::date_detail($user_id);
|
||||
$today = \AKSRT\Credits\PointsFree::today_total($user_id);
|
||||
$day_max = (int) \AKSRT\Credits\PointsFree::settings()['day_max'];
|
||||
$tasks = \AKSRT\Credits\PointsFree::task_list_for_user($user_id);
|
||||
$detail = \AKSRT\Credits\PointsFree::date_detail($user_id);
|
||||
$pane = isset($points_tasks_pane) ? sanitize_key((string) $points_tasks_pane) : 'tasks';
|
||||
?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user