zombie-flesh-eaters/mu-loader
最新稳定版本:v0.0.3
Composer 安装命令:
composer require zombie-flesh-eaters/mu-loader
包简介
Composer 2 plugin that generates a WordPress MU-plugin autoloader file from configured folders.
README 文档
README
Composer 2 plugin for WordPress that generates a single MU-plugin loader file from one or more configured folders.
Install
composer require zombie-flesh-eaters/mu-loader
How it works
On Composer autoload dump (install, update, or dump-autoload), this package:
- Scans configured MU-plugin folders and includes:
- top-level
.phpfiles in the MU root - one entry file per plugin directory (
<slug>/<slug>.php)
- top-level
- Writes a generated loader file with
require_oncestatements.
Default output file:
wp-content/mu-plugins/000-mu-loader.php
Configuration
Set config in your project composer.json under extra.mu-loader.
{
"extra": {
"mu-loader": {
"paths": [
"wp-content/mu-plugins",
"web/app/mu-plugins"
],
"output": "wp-content/mu-plugins/000-mu-loader.php",
"exclude": [
"wp-content/mu-plugins/some-file-to-skip.php"
]
}
}
}
Options
paths(string|array, default:["wp-content/mu-plugins"])output(string, default: first existing path +/000-mu-loader.php)exclude(string|array, default:[]) absolute or relative file paths to skip
Notes
- The output file is generated; manual edits are overwritten.
- Only existing directories in
pathsare scanned.
Testing
Run the integration test:
composer run test:integration
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-19