apiki/wpsteak-plugin

一个结构化的WordPress插件。

安装: 68

依赖: 0

建议者: 0

安全: 0

星标: 10

关注者: 2

分支: 5

开放问题: 39

类型:wordpress-plugin

3.1.11 2021-05-25 14:05 UTC

This package is auto-updated.

Last update: 2024-09-27 04:42:08 UTC


README

特性

  • 来自 WPSteak 的所有优势
  • 依赖注入容器;
  • 准备好使用PHPUnit进行单元测试;
  • 使用WordPress编码标准配置的PHP CodeSniffer;
  • wpemerge-theme 中提取的资源处理配置;
  • 为所有源代码和测试提供PHP PSR-4自动加载;

要求

  • PHP >= 7.4
  • Composer

快速开始

  1. 浏览到 wp-content/plugins
  2. 运行 composer create-project apiki/wpsteak-plugin your-plugin-name

目录结构

.
├── dist/                            # Bundles, optimized images etc.
├── languages/                       # Language files.
├── resources/                       # Build process configuration, Scripts, Styles, etc.
├── src/                             # PSR-4 autoloaded classes.
│   ├── Entities/                    # Classes for using on data mapper.
│   │   ├── Categories.php
│   │   ├── Category.php
│   │   ├── ExampleCategory.php
│   │   ├── Example.php
│   │   ├── Examples.php
│   │   ├── Page.php
│   │   ├── Post.php
│   │   ├── Posts.php
│   │   ├── Tag.php
│   │   └── Tags.php
│   ├── Providers/                   # Your hooks declarations.
│   │   ├── Assets
│   │   │   ├── Admin.php
│   │   │   ├── Editor.php
│   │   │   ├── Login.php
│   │   │   └── Theme.php
│   │   ├── Example
│   │   │   ├── PostMeta.php
│   │   │   └── PostType.php
│   │   └── ExampleCategory
│   │       └── Taxonomy.php
│   ├── Repositories/                # Where you put your data handle (includes API).
│   │   ├── Category.php
│   │   ├── Example.php
│   │   ├── Page.php
│   │   ├── Post.php
│   │   └── Tag.php
│   ├── Services/                    # Where your business logic goes on.
│   └── Widgets/                     # Widget classes.
├── tests/                           # PHP Unit tests.
├── views/                           # View files used for metaboxes, shortcodes, etc.
├── config.json.dist
├── config.php                       # Where your providers and services providers will be loaded.
└── wpsteak.php                      # Bootstrap plugin.