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
@@ -11,7 +11,7 @@ $page_title = get_the_title() ?: __('下载中心', 'aksrt');
|
||||
$page_desc = get_the_excerpt() ?: __('浏览和下载本站提供的各类资源。', 'aksrt');
|
||||
$current_filter = isset($_GET['resource_type']) ? sanitize_key((string) $_GET['resource_type']) : '';
|
||||
$resource_type_labels = function_exists('aksrt_get_pay_types') ? aksrt_get_pay_types() : [];
|
||||
unset($resource_type_labels[AKSRT_Domain_Model::PAY_TYPE_READING]);
|
||||
unset($resource_type_labels[\AKSRT\Core\DomainModel::PAY_TYPE_READING]);
|
||||
|
||||
$resource_count_query = new WP_Query([
|
||||
'post_type' => 'post',
|
||||
@@ -20,7 +20,7 @@ $resource_count_query = new WP_Query([
|
||||
'fields' => 'ids',
|
||||
'meta_query' => [
|
||||
[
|
||||
'key' => AKSRT_Domain_Model::RESOURCE_MARKER_KEY,
|
||||
'key' => \AKSRT\Core\DomainModel::RESOURCE_MARKER_KEY,
|
||||
'value' => '1',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Download Permission Card
|
||||
*
|
||||
* Shows download status and actions from AKSRT_Download_State
|
||||
* Shows download status and actions from \AKSRT\Content\DownloadState
|
||||
* (Content_Visibility + cashier unlock — not per-download credits).
|
||||
*
|
||||
* @package AKSRT
|
||||
@@ -27,8 +27,8 @@ $state = [
|
||||
'need_vip' => false,
|
||||
];
|
||||
|
||||
if (class_exists('AKSRT_Download_State')) {
|
||||
$state = array_merge($state, AKSRT_Download_State::get_instance()->resolve($post_id));
|
||||
if (class_exists('\AKSRT\Content\DownloadState')) {
|
||||
$state = array_merge($state, \AKSRT\Content\DownloadState::get_instance()->resolve($post_id));
|
||||
} elseif (function_exists('aksrt_can_download')) {
|
||||
$gate = aksrt_can_download($post_id);
|
||||
if (is_wp_error($gate)) {
|
||||
|
||||
Reference in new issue
Block a user