定制 veronalabs/forge 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

veronalabs/forge

最新稳定版本:v1.0.0

Composer 安装命令:

composer create-project veronalabs/forge

包简介

VeronaLabs WordPress plugin starter template

README 文档

README

Craft production-ready WordPress plugins from a battle-tested foundation.

Quick Start

composer create-project veronalabs/forge my-plugin
cd my-plugin
./configure

The configure script will ask for your plugin name, namespace, and other details, then scaffold everything automatically.

What's Inside

  • Service Container — Lazy-loading DI with register/boot lifecycle
  • Service Providers — Two-phase initialization (register factories, then boot)
  • React Dashboard — Vite + React 19 with manifest-based PHP enqueue
  • SCSS + Entry Points — Admin/frontend SCSS and IIFE bundles via Vite
  • Premium Template — Unified premium model with module loader system
  • PHPUnit Tests — WordPress test library integration
  • wp-scoper — Vendor namespace isolation for conflict-free distribution

Architecture

my-plugin/
├── src/
│   ├── Bootstrap.php              # Plugin initialization
│   ├── Container/                 # DI container + service providers
│   ├── Components/                # Utilities (View, etc.)
│   └── Service/                   # Business logic (Admin, Assets, etc.)
├── resources/
│   ├── react/src/                 # React dashboard app
│   ├── entries/                   # Admin/frontend IIFE bundles
│   └── scss/                      # Stylesheets
├── views/                         # PHP templates
├── tests/                         # PHPUnit tests
└── premium/                       # Premium plugin template
    └── pro/
        ├── src/                   # Premium bootstrap + module loader
        └── modules/               # Auto-discovered premium modules

Development

# Install dependencies
composer install
npm install

# Start dev server (React + scripts + SCSS watch)
npm run dev

# Production build
npm run build

# Run tests
composer test

Premium Plugin

The premium/ directory contains a complete premium plugin template. During ./configure, it's copied to a sibling directory as {slug}-premium/. The premium plugin:

  1. Bundles the free plugin via symlinks
  2. Boots after the free core via the {hook}_loaded action
  3. Auto-discovers modules from pro/modules/ via manifest.json

Creating a Module

pro/modules/my-feature/
├── manifest.json
└── src/
    └── MyFeatureModule.php

manifest.json:

{
    "slug": "my-feature",
    "name": "My Feature",
    "version": "1.0.0",
    "namespace": "MyPlugin\\Pro\\Modules\\MyFeature",
    "main_class": "MyPlugin\\Pro\\Modules\\MyFeature\\MyFeatureModule"
}

License

MIT

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固