You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A **theme-only** dev container so you can work on WDS BT without installing PHP or Node locally—whether you’re at WDS (using the project template) or anywhere else. The stack matches [WebDevStudios/wds-devcontainer](https://github.com/WebDevStudios/wds-devcontainer): **PHP 8.2** and **Node 24**.
3
+
This is the **supported development environment** for WDS BT: a theme-only container so you do not need PHP or Node installed on the host. The stack matches [WebDevStudios/wds-devcontainer](https://github.com/WebDevStudios/wds-devcontainer): **PHP 8.2** and **Node 24**.
4
+
5
+
PHP linting uses Composer scripts that call **`vendor/bin/phpcs`** and **`vendor/bin/phpcbf`** (`composer run-script phpcs` / `phpcs-fix`)—no extra wrapper scripts. Run those inside the container (or any Linux/macOS shell with Composer deps installed) for consistent results.
4
6
5
7
## Usage
6
8
7
9
1. Open this theme repo in Cursor or VS Code.
8
-
2. Choose **Reopen in Container** (or run **Dev Containers: Reopen in Container** from the command palette).
9
-
3. After the container builds, run `npm run setup`if needed (postCreate runs `npm ci && composer install`).
10
+
2. Choose **Reopen in Container** (or **Dev Containers: Reopen in Container** from the command palette).
11
+
3. After the container builds, `postCreateCommand` runs `npm ci && composer install`. Use `npm run setup`from the theme root when you need a full clean install and build.
10
12
11
13
## What’s included
12
14
13
15
- PHP 8.2 with Composer and extensions: tokenizer, xmlwriter, simplexml, dom, mbstring
14
16
- Node 24
17
+
-**jq** (installed on container create) so `composer install` and Cursor-rules sync from `composer.json` succeed
15
18
- VS Code extensions: Intelephense, ESLint, Prettier, Stylelint
16
19
17
-
When you use a full WordPress project (e.g. WDS project template), that project’s devcontainer is used for the site; this one is for standalone theme development only.
20
+
When you use a full WordPress project (e.g. WDS project template), that project’s devcontainer runs the site; this one is for standalone theme development only.
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# WDS BT
2
2
3
-
## Version: 1.4.5
3
+
## Version: 1.4.6
4
4
5
5
[](https://webdevstudios.com/contact/)
6
6
7
-
### What's New in 1.4.0
7
+
### What's New in 1.4.6
8
8
9
9
-**Block Showcase**: Powerful development tool (admin-only) to discover, preview, and inspect all registered blocks with their attributes in an organized, interactive format.
10
10
-**Template-specific style loading**: Template and CPT CSS are built separately and enqueued only when the current request matches (404, search, archive, page templates, custom post types). Styles in `build/css/templates/` are discovered automatically—no PHP config needed. Reduces unused CSS for better Lighthouse scores.
@@ -53,7 +53,7 @@ WDS BT is a foundational WordPress block theme designed for maximum flexibility
53
53
| Responsive Design | Ensures optimal display and functionality across devices. |
54
54
| Foundation Theme | Flexible base theme optimized for extensive customization. |
55
55
| Automated Code Quality | Modern linting configurations with PHP 8.3 compatibility, ESLint 9 flat config, WordPress coding standards, and automated quality checks. |
56
-
| DevContainer |[.devcontainer](.devcontainer) for **theme-only** workflow: PHP 8.2, Node 24, Composer. Usable by anyone (not just WDS); matches[wds-devcontainer](https://github.com/WebDevStudios/wds-devcontainer) when using the project template. |
56
+
| DevContainer |**Recommended:**[.devcontainer](.devcontainer) for theme development (PHP 8.2, Node 24, Composer). This is the standard environment for active development on this repo. Matches[wds-devcontainer](https://github.com/WebDevStudios/wds-devcontainer) when using the project template. |
57
57
| Third-party Block Style Overrides | Conditionally enqueue and override third-party block styles for efficient asset delivery. |
| Enhanced Webpack Configuration | Refined Webpack setup for improved dependency resolution and optimized asset management. |
@@ -70,19 +70,19 @@ WDS BT is a foundational WordPress block theme designed for maximum flexibility
70
70
## Requirements
71
71
72
72
- WordPress 6.4+ (tested upto 6.9.1)
73
-
- PHP 8.2+ (fully tested with PHP 8.4)
74
-
-[NPM](https://npmjs.com) (v11+)
75
-
-[Node](https://nodejs.org) (v25+)
76
-
-[Composer 2+](https://getcomposer.org/)
73
+
-**Development:** use the **[dev container](.devcontainer)** (supported path for PHP, Node, Composer, and linting). It ships PHP 8.2 and Node 24 aligned with this theme.
74
+
- PHP 8.2+ and [Composer 2+](https://getcomposer.org/) when running outside the container (CI, deployment, or contributor preference)
75
+
-[NPM](https://npmjs.com) (v11+) and [Node](https://nodejs.org) (v24+ per `package.json` engines) for build scripts
1. Clone this repository to your WordPress theme directory (`wp-content/themes/`).
82
-
2. Activate WDS BT from your WordPress admin panel under Appearance > Themes.
83
-
3. Run `npm run setup` to install dependencies and perform an initial build.
80
+
1. Clone this repository into your WordPress theme directory (`wp-content/themes/`), or symlink it there.
81
+
2.**Open in the dev container:** In Cursor or VS Code, choose **Reopen in Container** so PHP, Node, and Composer match the project (see [.devcontainer/README.md](.devcontainer/README.md)).
82
+
3. From the theme root, run `npm run build` (after `postCreateCommand`’s `npm ci && composer install`). Use `npm run setup` when you need a full reset and install from scratch.
83
+
4. Activate WDS BT from your WordPress admin under **Appearance → Themes**.
84
84
85
-
**Theme-only dev (no local PHP/Node):** Open this repo in Cursor or VS Code and choose **Reopen in Container**. The [.devcontainer](.devcontainer) provides PHP 8.2 and Node 24 so you can run `npm run setup` and build without installing tooling locally—works for everyone, not only WDS projects.
85
+
Contributors should use the dev container for day-to-day work so PHPCS, ESLint, and builds share one environment. PHP coding standards run through Composer (`composer run-script phpcs`) and invoke **`vendor/bin/phpcs`** directly.
PHP (PHPCS), JavaScript (ESLint), and CSS/SCSS (Stylelint) use the latest WordPress standards; warnings are treated as failures. On commit, Lefthook runs auto-fix, re-stages changed files, then runs strict lint. Do not use `--no-verify`; CI runs the same checks. Full config and policy: **[docs/linting-and-hooks.md](docs/linting-and-hooks.md)**.
132
+
PHP (PHPCS), JavaScript (ESLint), and CSS/SCSS (Stylelint) use the latest WordPress standards; warnings are treated as failures. Composer scripts invoke **`vendor/bin/phpcs`** and **`vendor/bin/phpcbf`** (see `composer.json`). On commit, Lefthook runs auto-fix, re-stages changed files, then runs strict lint. Do not use `--no-verify`; CI runs the same checks. Full config and policy: **[docs/linting-and-hooks.md](docs/linting-and-hooks.md)**.
133
133
134
134
## Dynamic Block Pattern Categories
135
135
136
136
Block pattern categories are registered from subfolders of `patterns/`. Add a folder (e.g. `patterns/cards/`), put pattern PHP files in it, and set each file’s `Categories` header to the folder name (e.g. `Categories: cards`). No extra code is required.
137
137
138
138
## Accessibility & Quality
139
139
140
-
Run `npm run a11y` for Pa11y-based accessibility checks and `npm run lighthouse` for performance and SEO scores. CI runs security and code-quality checks. Cross-platform notes (rimraf, PHP detection) are in **[docs/accessibility-and-quality.md](docs/accessibility-and-quality.md)**.
140
+
Run `npm run a11y` for Pa11y-based accessibility checks and `npm run lighthouse` for performance and SEO scores. CI runs security and code-quality checks. Additional tooling notes are in **[docs/accessibility-and-quality.md](docs/accessibility-and-quality.md)**.
0 commit comments