wp scaffold block
Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme.
Warning: wp scaffold block is deprecated.
The official script to generate a block is the @wordpress/create-block package.
See the Create a Block tutorial for a complete walk-through.
Synopsis
bash
wp scaffold block <slug> [--title=<title>] [--dashicon=<dashicon>] [--category=<category>] [--theme] [--plugin=<plugin>] [--force]Options
[–title=<title>] The display title for your block.
[–dashicon=
[–category=
- default: widgets
- options: common, embed, formatting, layout, widgets
[–theme]
Create files in the active theme directory. Specify a theme with --theme=<theme> to have the file placed in that theme.
[–plugin=
[–force] Overwrite files that already exist.