Merge pull request 'refactor: flatten src/AKSRT → src (drop theme-identifier dir)' (#358) from worktree-flatten-src-akrt into main
Reviewed-on: CYL/wordpress-theme-aksrt#358
This commit is contained in:
commit
aa5778b9b6
285 files changed
+26
-3600
No files matched your search
@@ -28,11 +28,11 @@ AKSRT 是一款现代化的 WordPress 主题,采用**原生 WordPress 主题
|
|||||||
AKSRT-theme/
|
AKSRT-theme/
|
||||||
├── functions.php # 入口:常量 + Composer autoload + bootstrap + 单例 init
|
├── functions.php # 入口:常量 + Composer autoload + bootstrap + 单例 init
|
||||||
├── style.css # WordPress 主题声明头
|
├── style.css # WordPress 主题声明头
|
||||||
├── composer.json # 第三方依赖 + 主题 PSR-4(AKSRT\ → src/AKSRT/)
|
├── composer.json # 第三方依赖 + 主题 PSR-4(AKSRT\ → src/)
|
||||||
│
|
│
|
||||||
├── *.php # WP 核心模板保留根目录
|
├── *.php # WP 核心模板保留根目录
|
||||||
│
|
│
|
||||||
├── src/AKSRT/ # Composer PSR-4 类型根(namespace AKSRT\)
|
├── src/ # Composer PSR-4 类型根(namespace AKSRT\)
|
||||||
│ ├── Admin/ # SPA 编排 + 域控制器 + Schema + Native ops
|
│ ├── Admin/ # SPA 编排 + 域控制器 + Schema + Native ops
|
||||||
│ ├── Auth/ # 登录 / OAuth / 审核 / 邮箱
|
│ ├── Auth/ # 登录 / OAuth / 审核 / 邮箱
|
||||||
│ ├── Content/ # 下载 token / 付费内容 / VIP / 可见性
|
│ ├── Content/ # 下载 token / 付费内容 / VIP / 可见性
|
||||||
@@ -94,7 +94,7 @@ AKSRT-theme/
|
|||||||
|
|
||||||
## 安装方式
|
## 安装方式
|
||||||
|
|
||||||
主题类型(`AKSRT\…`)通过 Composer PSR-4 从 `src/AKSRT/` 自动加载;`vendor/` 不进 Git。**部署或更新主题后必须在主题根目录生成 autoload**,否则会出现 `Class "AKSRT\Core\DomainModel" not found` 等致命错误。
|
主题类型(`AKSRT\…`)通过 Composer PSR-4 从 `src/` 自动加载;`vendor/` 不进 Git。**部署或更新主题后必须在主题根目录生成 autoload**,否则会出现 `Class "AKSRT\Core\DomainModel" not found` 等致命错误。
|
||||||
|
|
||||||
### 前置:Composer(必做)
|
### 前置:Composer(必做)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"AKSRT\\": "src/AKSRT/"
|
"AKSRT\\": "src/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -63,7 +63,7 @@ if (!function_exists('aksrt_get_setting')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// 加载 Composer 依赖(第三方库 + 主题 PSR-4:AKSRT\ → src/AKSRT/)
|
// 加载 Composer 依赖(第三方库 + 主题 PSR-4:AKSRT\ → src/)
|
||||||
// ============================================================
|
// ============================================================
|
||||||
$composer_autoload = AKSRT_DIR . '/vendor/autoload.php';
|
$composer_autoload = AKSRT_DIR . '/vendor/autoload.php';
|
||||||
if (!file_exists($composer_autoload)) {
|
if (!file_exists($composer_autoload)) {
|
||||||
@@ -75,7 +75,7 @@ if (!file_exists($composer_autoload)) {
|
|||||||
}
|
}
|
||||||
require_once $composer_autoload;
|
require_once $composer_autoload;
|
||||||
|
|
||||||
// Theme classes live under src/AKSRT/ and only load via Composer PSR-4.
|
// Theme classes live under src/ and only load via Composer PSR-4.
|
||||||
// Stale vendor/ (e.g. install before composer.json gained "AKSRT\\") leaves
|
// Stale vendor/ (e.g. install before composer.json gained "AKSRT\\") leaves
|
||||||
// autoload_psr4 without AKSRT\ and fatals on the first DomainModel reference.
|
// autoload_psr4 without AKSRT\ and fatals on the first DomainModel reference.
|
||||||
if (!class_exists(\AKSRT\Core\DomainModel::class, true)) {
|
if (!class_exists(\AKSRT\Core\DomainModel::class, true)) {
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
* AKSRT Theme Bootstrap Loader
|
* AKSRT Theme Bootstrap Loader
|
||||||
*
|
*
|
||||||
* Helpers + procedural modules + core hooks.
|
* Helpers + procedural modules + core hooks.
|
||||||
* Domain classes load via Composer PSR-4 (src/AKSRT).
|
* Domain classes load via Composer PSR-4 (src/).
|
||||||
*
|
*
|
||||||
* @package AKSRT
|
* @package AKSRT
|
||||||
* @version 3.4.0
|
* @version 3.4.0
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 285 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user