Stable tag: 0.1.0
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 8.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: boilerplate
Contributors: garyj
Short summary about the plugin.
Long description about the plugin.
- Download the latest tagged archive (choose the "zip" option).
- Go to the Plugins → Add New screen and click the Upload tab.
- Upload the zipped archive directly.
- Go to the Plugins screen and click Activate.
- Download the latest tagged archive (choose the "zip" option).
- Unzip the archive.
- Copy the folder to your
/wp-content/plugins/directory. - Go to the Plugins screen and click Activate.
See the WordPress documentation for more information about installing plugins manually.
In a terminal, browse to your /wp-content/plugins/ directory and clone this repository:
git clone git@github.com:GaryJones/plugin-slug.gitThen go to your Plugins screen and click Activate.
composer require gamajo/plugin-slugThis plugin supports the Git Updater plugin (formerly known as GitHub Updater), so if you install that, this plugin becomes automatically updateable direct from GitHub.
- PHP 8.4 or later
- Composer
- Node.js (LTS)
- Docker, used by wp-env for the local development and integration test environment
composer install
npm install
npm run build
npx @wordpress/env startJavaScript and CSS assets are built with @wordpress/scripts. Source lives in src/js; the compiled output and its generated *.asset.php dependency file land in build (git-ignored).
| Script | Description |
|---|---|
npm run build |
Build the production assets into build. |
npm run start |
Rebuild assets on change, with source maps. |
npm run lint:js |
Lint the JavaScript. |
npm run lint:css |
Lint the stylesheets. |
npm run format |
Format the source files. |
| Script | Description |
|---|---|
composer lint |
Lint PHP and XML files for syntax errors. |
composer cs |
Check coding standards with PHPCS. |
composer cs-fix |
Fix coding standards violations with PHPCBF. |
composer test:unit |
Run the unit tests. |
composer test:integration |
Run the integration tests inside wp-env. |
composer test:integration-ms |
Run the integration tests against Multisite. |
composer coverage |
Run the unit tests with a code coverage report. |
composer infection |
Run mutation tests with Infection. |
composer rector |
Check for automated refactoring opportunities with Rector. |
composer phpstan |
Run static analysis with PHPStan. |
Search the codebase for plugin-slug, plugin_slug, PLUGIN_SLUG, PluginSlug and Plugin Boilerplate, and replace each with the equivalent names for your plugin.
The integration tests extend WP_UnitTestCase, and the WordPress core test framework does not yet support anything newer than PHPUnit 9.6.
This is a boilerplate, so consumers should resolve dependencies against their own constraints and commit their own lock file.
src/js/admin-settings.js is bundled by @wordpress/scripts (run npm run build). The build emits build/admin-settings.js, an extracted build/admin-settings.css, and build/admin-settings.asset.php, which lists the script's WordPress dependencies and a content hash for cache busting. Plugin::enqueue_admin_assets() reads that file so neither the dependency list nor the version is maintained by hand. Built files are not committed; the deploy workflow runs the build so release archives are ready to install. Unlike composer.lock, package-lock.json is committed, so the build is reproducible.
Please see CHANGELOG.md.
See the contributing document.
See the support document.
The code in this project is licensed under GPL v2 or later.
Built by Gary Jones
Copyright 2024-2026 Gary Jones
