| title | version | last_updated | author | description | type |
|---|---|---|---|---|---|
{{name}} - WordPress Block Plugin |
{{version}} |
2024-10-18 |
{{author}} |
{{description}} |
documentation |
{{description}}
-
Install Dependencies
npm install composer install
-
Start Development
npm run start
-
Build for Production
npm run build
This plugin uses modern WordPress development practices:
- WordPress Scripts for building and linting
- React/JSX for block editor components
- SCSS for styling
- PHP 8.0+ for server-side functionality
- PHPUnit for PHP testing
- Jest for JavaScript testing
- Playwright for E2E testing
This template uses mustache-style placeholders that should be replaced when scaffolding a new plugin:
| Placeholder | Description | Example |
|---|---|---|
{{slug}} |
Plugin slug (kebab-case) | my-awesome-block |
{{namespace}} |
Plugin namespace (kebab-case) | mycompany |
{{author}} |
Plugin author | John Doe |
{{description}} |
Plugin description | An awesome block plugin |
{{license}} |
License identifier | GPL-3.0-or-later |
{{textdomain}} |
WordPress text domain | my-awesome-block |
{{version}} |
Plugin version | 1.0.0 |
{{name}} |
Human-readable plugin name | My Awesome Block |
{{slug}}/
├── src/
│ ├── {{slug}}/
│ │ ├── block.json # Block metadata
│ │ ├── edit.js # Editor component
│ │ ├── save.js # Save component
│ │ ├── index.js # Block registration
│ │ ├── render.php # Server-side render
│ │ └── style.scss # Block styles
│ ├── scss/
│ │ ├── editor.scss # Editor-only styles
│ │ └── style.scss # Frontend-only styles
│ └── index.js # Main entry point
├── bin/
│ ├── build.sh # Build script
│ ├── test.sh # Test script
│ ├── install-wp-tests.sh # WordPress test setup
│ └── update-version.js # Version update utility
├── tests/
│ ├── date.js # Date utility functions
│ └── date.test.js # Date utility tests
├── .github/
│ └── workflows/
│ └── ci-cd.yml # GitHub Actions workflow
├── .vscode/ # VSCode configuration
├── .husky/ # Git hooks
├── docs/ # Documentation
├── {{slug}}.php # Main plugin file
├── package.json # Node.js dependencies
├── composer.json # PHP dependencies
├── .wp-env.json # WordPress environment
└── CODEOWNERS # Code ownership
npm run build- Build production assetsnpm run start- Start development with watch modenpm run lint- Lint JavaScript and CSSnpm run test- Run all testsnpm run makepot- Generate translation POT filenpm run makejson- Generate JSON translation filesnpm run i18n- Complete i18n workflow (makepot + makejson)npm run env:start- Start WordPress environmentnpm run plugin-zip- Create distribution ZIP
composer run lint- Lint PHP codecomposer run test- Run PHP testscomposer run analyse- Run static analysis
See CONTRIBUTING.md for contribution guidelines.
This project is licensed under the {{license}} License - see the LICENSE file for details.
For support, please see: