From 4213e448fbd7aaee3541078faee8367d76bc8816 Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 10 Mar 2026 03:57:42 +0800 Subject: [PATCH 1/8] WSDEN-5 - Remove BT wrapper scripts --- README.md | 4 +- assets/scss/templates/block-showcase.scss | 3 - composer.lock | 113 +- docs/accessibility-and-quality.md | 2 +- docs/development.md | 2 +- docs/linting-and-hooks.md | 2 +- inc/hooks/block-showcase-shortcode.php | 14 +- package-lock.json | 4123 +++++++++------------ package.json | 12 +- scripts/get-php-flags.sh | 8 - scripts/get-php.js | 38 - scripts/get-php.sh | 31 - scripts/run-phpcbf.sh | 8 +- scripts/run-phpcs.sh | 9 +- webpack.config.js | 15 +- 15 files changed, 1930 insertions(+), 2454 deletions(-) delete mode 100755 scripts/get-php-flags.sh delete mode 100755 scripts/get-php.js delete mode 100755 scripts/get-php.sh diff --git a/README.md b/README.md index 83ecfaee..c7d04ee0 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ WDS BT is a foundational WordPress block theme designed for maximum flexibility | Responsive Design | Ensures optimal display and functionality across devices. | | Foundation Theme | Flexible base theme optimized for extensive customization. | | Automated Code Quality | Modern linting configurations with PHP 8.3 compatibility, ESLint 9 flat config, WordPress coding standards, and automated quality checks. | -| Cross-Platform PHP Support | Automatic PHP binary detection and extension handling for Mac, Linux, and CI/CD environments. | +| 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. | | Third-party Block Style Overrides | Conditionally enqueue and override third-party block styles for efficient asset delivery. | | Accessibility Compliance | Built-in WCAG 2.2 compliance with automated Pa11y checks. | | Enhanced Webpack Configuration | Refined Webpack setup for improved dependency resolution and optimized asset management. | @@ -82,6 +82,8 @@ WDS BT is a foundational WordPress block theme designed for maximum flexibility 2. Activate WDS BT from your WordPress admin panel under Appearance > Themes. 3. Run `npm run setup` to install dependencies and perform an initial build. +**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. + ## Documentation Full documentation is in the **[docs/](docs/README.md)** folder. Use it for setup details, NPM scripts, fonts, version management, linting and Lefthook, performance and images, Block Showcase, customizations, and accessibility/quality. diff --git a/assets/scss/templates/block-showcase.scss b/assets/scss/templates/block-showcase.scss index 41a19fad..52162cf7 100644 --- a/assets/scss/templates/block-showcase.scss +++ b/assets/scss/templates/block-showcase.scss @@ -26,7 +26,6 @@ margin-top: var(--wp--preset--spacing--gap); .wp-block-accordion { - background: var(--wp--preset--color--base, #fff); overflow: hidden; } @@ -97,7 +96,6 @@ var(--wp--preset--color--contrast, rgba(0, 0, 0, 0.1)); border-radius: var(--wp--preset--border-radius--md); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); - background: var(--wp--preset--color--base, #fff); padding: var(--wp--preset--spacing--50); overflow: hidden; display: flex; @@ -120,7 +118,6 @@ rgba(0, 0, 0, 0.6) ); font-size: var(--wp--preset--font-size--small); - background: var(--wp--preset--color--base-2, #f5f5f5); padding: var(--wp--preset--spacing--30); border-radius: var(--wp--preset--border-radius--sm); } diff --git a/composer.lock b/composer.lock index 010880b4..338b62c3 100644 --- a/composer.lock +++ b/composer.lock @@ -1016,16 +1016,16 @@ }, { "name": "gettext/languages", - "version": "2.12.1", + "version": "2.12.2", "source": { "type": "git", "url": "https://github.com/php-gettext/Languages.git", - "reference": "0b0b0851c55168e1dfb14305735c64019732b5f1" + "reference": "079d6f4842cbcbf5673a70d8e93169a684e7aadd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Languages/zipball/0b0b0851c55168e1dfb14305735c64019732b5f1", - "reference": "0b0b0851c55168e1dfb14305735c64019732b5f1", + "url": "https://api.github.com/repos/php-gettext/Languages/zipball/079d6f4842cbcbf5673a70d8e93169a684e7aadd", + "reference": "079d6f4842cbcbf5673a70d8e93169a684e7aadd", "shasum": "" }, "require": { @@ -1075,7 +1075,7 @@ ], "support": { "issues": "https://github.com/php-gettext/Languages/issues", - "source": "https://github.com/php-gettext/Languages/tree/2.12.1" + "source": "https://github.com/php-gettext/Languages/tree/2.12.2" }, "funding": [ { @@ -1087,20 +1087,20 @@ "type": "github" } ], - "time": "2025-03-19T11:14:02+00:00" + "time": "2026-02-23T14:05:50+00:00" }, { "name": "justinrainbow/json-schema", - "version": "6.6.4", + "version": "v6.7.2", "source": { "type": "git", "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7" + "reference": "6fea66c7204683af437864e7c4e7abf383d14bc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/2eeb75d21cf73211335888e7f5e6fd7440723ec7", - "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/6fea66c7204683af437864e7c4e7abf383d14bc0", + "reference": "6fea66c7204683af437864e7c4e7abf383d14bc0", "shasum": "" }, "require": { @@ -1160,9 +1160,9 @@ ], "support": { "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.4" + "source": "https://github.com/jsonrainbow/json-schema/tree/v6.7.2" }, - "time": "2025-12-19T15:01:32+00:00" + "time": "2026-02-15T15:06:22+00:00" }, { "name": "marc-mabe/php-enum", @@ -2149,16 +2149,16 @@ }, { "name": "symfony/console", - "version": "v6.4.32", + "version": "v6.4.35", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0bc2199c6c1f05276b05956f1ddc63f6d7eb5fc3" + "reference": "49257c96304c508223815ee965c251e7c79e614e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0bc2199c6c1f05276b05956f1ddc63f6d7eb5fc3", - "reference": "0bc2199c6c1f05276b05956f1ddc63f6d7eb5fc3", + "url": "https://api.github.com/repos/symfony/console/zipball/49257c96304c508223815ee965c251e7c79e614e", + "reference": "49257c96304c508223815ee965c251e7c79e614e", "shasum": "" }, "require": { @@ -2223,7 +2223,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.32" + "source": "https://github.com/symfony/console/tree/v6.4.35" }, "funding": [ { @@ -2243,7 +2243,7 @@ "type": "tidelift" } ], - "time": "2026-01-13T08:45:59+00:00" + "time": "2026-03-06T13:31:08+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2314,16 +2314,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.0", + "version": "v7.4.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a" + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3ebc794fa5315e59fd122561623c2e2e4280538e", + "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e", "shasum": "" }, "require": { @@ -2360,7 +2360,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.0" + "source": "https://github.com/symfony/filesystem/tree/v7.4.6" }, "funding": [ { @@ -2380,20 +2380,20 @@ "type": "tidelift" } ], - "time": "2025-11-27T13:27:24+00:00" + "time": "2026-02-25T16:50:00+00:00" }, { "name": "symfony/finder", - "version": "v7.4.5", + "version": "v7.4.6", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb" + "reference": "8655bf1076b7a3a346cb11413ffdabff50c7ffcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ad4daa7c38668dcb031e63bc99ea9bd42196a2cb", - "reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb", + "url": "https://api.github.com/repos/symfony/finder/zipball/8655bf1076b7a3a346cb11413ffdabff50c7ffcf", + "reference": "8655bf1076b7a3a346cb11413ffdabff50c7ffcf", "shasum": "" }, "require": { @@ -2428,7 +2428,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.5" + "source": "https://github.com/symfony/finder/tree/v7.4.6" }, "funding": [ { @@ -2448,7 +2448,7 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:07:59+00:00" + "time": "2026-01-29T09:40:50+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3198,16 +3198,16 @@ }, { "name": "symfony/string", - "version": "v7.4.4", + "version": "v7.4.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "1c4b10461bf2ec27537b5f36105337262f5f5d6f" + "reference": "9f209231affa85aa930a5e46e6eb03381424b30b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/1c4b10461bf2ec27537b5f36105337262f5f5d6f", - "reference": "1c4b10461bf2ec27537b5f36105337262f5f5d6f", + "url": "https://api.github.com/repos/symfony/string/zipball/9f209231affa85aa930a5e46e6eb03381424b30b", + "reference": "9f209231affa85aa930a5e46e6eb03381424b30b", "shasum": "" }, "require": { @@ -3265,7 +3265,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.4.4" + "source": "https://github.com/symfony/string/tree/v7.4.6" }, "funding": [ { @@ -3285,7 +3285,7 @@ "type": "tidelift" } ], - "time": "2026-01-12T10:54:30+00:00" + "time": "2026-02-09T09:33:46+00:00" }, { "name": "wp-cli/cache-command", @@ -4077,16 +4077,16 @@ }, { "name": "wp-cli/export-command", - "version": "v2.1.14", + "version": "v2.1.15", "source": { "type": "git", "url": "https://github.com/wp-cli/export-command.git", - "reference": "2af32bf12c1bccd6561a215dbbafc2f272647ee8" + "reference": "84a335ca6e4296aff130659642818473a9b0d90d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/export-command/zipball/2af32bf12c1bccd6561a215dbbafc2f272647ee8", - "reference": "2af32bf12c1bccd6561a215dbbafc2f272647ee8", + "url": "https://api.github.com/repos/wp-cli/export-command/zipball/84a335ca6e4296aff130659642818473a9b0d90d", + "reference": "84a335ca6e4296aff130659642818473a9b0d90d", "shasum": "" }, "require": { @@ -4099,7 +4099,7 @@ "wp-cli/extension-command": "^1.2 || ^2", "wp-cli/import-command": "^1 || ^2", "wp-cli/media-command": "^1 || ^2", - "wp-cli/wp-cli-tests": "^4" + "wp-cli/wp-cli-tests": "^5" }, "type": "wp-cli-package", "extra": { @@ -4134,9 +4134,9 @@ "homepage": "https://github.com/wp-cli/export-command", "support": { "issues": "https://github.com/wp-cli/export-command/issues", - "source": "https://github.com/wp-cli/export-command/tree/v2.1.14" + "source": "https://github.com/wp-cli/export-command/tree/v2.1.15" }, - "time": "2025-04-02T15:29:08+00:00" + "time": "2026-02-12T12:26:09+00:00" }, { "name": "wp-cli/extension-command", @@ -4509,16 +4509,16 @@ }, { "name": "wp-cli/media-command", - "version": "v2.2.4", + "version": "v2.2.5", "source": { "type": "git", "url": "https://github.com/wp-cli/media-command.git", - "reference": "1e896733998450f3cb8c1baba4de64804c3d549e" + "reference": "5696bba2e8c7d5c373fa20024edb1a4b682d1511" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/media-command/zipball/1e896733998450f3cb8c1baba4de64804c3d549e", - "reference": "1e896733998450f3cb8c1baba4de64804c3d549e", + "url": "https://api.github.com/repos/wp-cli/media-command/zipball/5696bba2e8c7d5c373fa20024edb1a4b682d1511", + "reference": "5696bba2e8c7d5c373fa20024edb1a4b682d1511", "shasum": "" }, "require": { @@ -4534,6 +4534,7 @@ "bundled": true, "commands": [ "media", + "media fix-orientation", "media import", "media regenerate", "media image-size" @@ -4565,9 +4566,9 @@ "homepage": "https://github.com/wp-cli/media-command", "support": { "issues": "https://github.com/wp-cli/media-command/issues", - "source": "https://github.com/wp-cli/media-command/tree/v2.2.4" + "source": "https://github.com/wp-cli/media-command/tree/v2.2.5" }, - "time": "2026-01-27T02:54:42+00:00" + "time": "2026-03-04T13:53:32+00:00" }, { "name": "wp-cli/mustache", @@ -5281,16 +5282,16 @@ }, { "name": "wp-cli/widget-command", - "version": "v2.1.12", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/wp-cli/widget-command.git", - "reference": "73084053f7b32d92583e44d870b81f287beea6a9" + "reference": "6f04d7e0129e0fb280cfc4931bbd40478e743871" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/73084053f7b32d92583e44d870b81f287beea6a9", - "reference": "73084053f7b32d92583e44d870b81f287beea6a9", + "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/6f04d7e0129e0fb280cfc4931bbd40478e743871", + "reference": "6f04d7e0129e0fb280cfc4931bbd40478e743871", "shasum": "" }, "require": { @@ -5298,7 +5299,7 @@ }, "require-dev": { "wp-cli/extension-command": "^1.2 || ^2", - "wp-cli/wp-cli-tests": "^4" + "wp-cli/wp-cli-tests": "^5" }, "type": "wp-cli-package", "extra": { @@ -5342,9 +5343,9 @@ "homepage": "https://github.com/wp-cli/widget-command", "support": { "issues": "https://github.com/wp-cli/widget-command/issues", - "source": "https://github.com/wp-cli/widget-command/tree/v2.1.12" + "source": "https://github.com/wp-cli/widget-command/tree/v2.2.0" }, - "time": "2025-04-11T09:29:37+00:00" + "time": "2026-02-12T12:26:33+00:00" }, { "name": "wp-cli/wp-cli", diff --git a/docs/accessibility-and-quality.md b/docs/accessibility-and-quality.md index a6e6aa72..dc450d1e 100644 --- a/docs/accessibility-and-quality.md +++ b/docs/accessibility-and-quality.md @@ -19,4 +19,4 @@ Runs PHPCS, ESLint, and Stylelint in CI. All violations must be fixed before mer ## Cross-Platform - **rimraf** is used instead of `rm -rf` in npm scripts for Windows/macOS/Linux. -- **PHP:** Path and extension flags are auto-detected (`scripts/get-php.sh`, `scripts/get-php-flags.sh`). For CI you can set `PHP_BIN`. Local uses `-n` to suppress extension warnings; CI enables `tokenizer`, `xmlwriter`, `simplexml` as needed. +- **PHP:** Use the theme’s [.devcontainer](../.devcontainer) for theme-only dev (PHP 8.2, Node 24; works for everyone) or your project’s devcontainer when developing the full site. Otherwise install PHP 8.2+ with extensions `tokenizer`, `xmlwriter`, `simplexml` on the host. CI uses `shivammathur/setup-php` with the same stack. diff --git a/docs/development.md b/docs/development.md index 2bc8c4e7..0c4b3c7e 100644 --- a/docs/development.md +++ b/docs/development.md @@ -26,7 +26,7 @@ npm run setup This removes `node_modules`, `vendor`, `build`, `package-lock.json`, and `composer.lock`, then installs dependencies and runs an initial build. -**Note:** Composer 2 and NPM 11+ are required. The setup script detects PHP and handles extension flags for your environment. +**Note:** Composer 2 and NPM 11+ are required. Use the theme’s [.devcontainer](../.devcontainer) for a theme-only workflow (PHP 8.2, Node 24; no local install)—works for anyone. Or install PHP 8.2+ and Node 24+ natively. ## NPM Scripts diff --git a/docs/linting-and-hooks.md b/docs/linting-and-hooks.md index b4c6eb06..ccfb7946 100644 --- a/docs/linting-and-hooks.md +++ b/docs/linting-and-hooks.md @@ -22,7 +22,7 @@ Do **not** use `git commit --no-verify` or `git push --no-verify`. CI runs the s ## PHP Linting Details - Config: `phpcs.xml.dist`. Theme prefixes: `WebDevStudios\wdsbt`, `wds`, `wdsbt`. Text domain: `wdsbt`. -- PHP path and extension flags are auto-detected (`scripts/get-php.sh`, `scripts/get-php-flags.sh`). +- PHP is provided by the DevContainer or host; run `npm run lint:php` (uses `vendor/bin/phpcs`). ## JavaScript Linting Details diff --git a/inc/hooks/block-showcase-shortcode.php b/inc/hooks/block-showcase-shortcode.php index 5082bc19..9a0a3700 100644 --- a/inc/hooks/block-showcase-shortcode.php +++ b/inc/hooks/block-showcase-shortcode.php @@ -80,7 +80,7 @@ function render_block_showcase_shortcode( $atts = array(), $content = '' ) { if ( ! empty( $organized_blocks['core'] ) ) : ?> -

Core Blocks

+

Core Blocks

-

WDSBT Blocks

+

WDSBT Blocks

-

+

-

+