Contributors: The BCGov Custom Web team Tags: block Tested up to: 6.8 Stable tag: 0.0.1 License: GPL-2.0-or-later
== Plugin containing blocks intended to be used with the Design System WordPress Theme suite of products. ==
This is the long description. No limit, and you can use Markdown (as well as in the following sections).
- Upload the plugin files to the
/wp-content/plugins/bcgov-wordpress-blocksdirectory. - Activate the plugin through the 'Plugins' screen in WordPress.
- Install dependencies:
pnpm install && composer install - Start local WordPress:
pnpm run wp-env:start - In a separate terminal, start block development build:
pnpm start - Activate the plugin at
http://localhost:8888/wp-admin/plugins.php
Note: The block will not appear in the editor until step 1 has been run at least once. The plugin requires a
build/directory produced bypnpm startorpnpm run buildto register blocks with WordPress.
= Ports =
portsets the main local WordPress site port (default in this template:8888).
= Config constants =
WP_ENVIRONMENT_TYPE: marks the site aslocalso code can branch behavior by environment.WP_DEBUG: enables WordPress debug mode.WP_DEBUG_LOG: writes debug output towp-content/debug.log.WP_DEBUG_DISPLAY: controls whether debug messages are shown in page output.SCRIPT_DEBUG: forces non-minified core scripts and styles for easier debugging.DISALLOW_FILE_MODS: disables plugin/theme/core installs and updates in wp-admin.AUTOMATIC_UPDATER_DISABLED: turns off automatic background updates.
These defaults are aimed at reproducible local environments and safer team workflows.
This template includes Playwright screenshot tests in tests/screenshot for catching visual regressions.
- Build assets:
pnpm run build - Start WordPress:
pnpm run wp-env:start - Generate baseline screenshots:
pnpm run test:screenshot:update - Run visual regression checks:
pnpm run test:screenshot
= A question that someone might have =
An answer to that question.
= What about foo bar? =
Answer to foo bar dilemma.
- This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
directory take precedence. For example,
/assets/screenshot-1.pngwould win over/tags/4.3/screenshot-1.png(or jpg, jpeg, gif). - This is the second screen shot