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
Blocks are the fundamental element of the Gutenberg editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.
94
+
**Warning: `wp scaffold block` is deprecated.**
95
95
96
-
Visit the [Gutenberg handbook](https://wordpress.org/gutenberg/handbook/block-api/)to learn more about Block API.
96
+
The official script to generate a block is the [@wordpress/create-block](https://developer.wordpress.org/block-editor/designers-developers/developers/packages/packages-create-block/)package.
97
97
98
-
When you scaffold a block you must use either the theme or plugin option. The latter is recommended.
98
+
See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/) for a complete walk-through.
99
99
100
100
**OPTIONS**
101
101
@@ -129,24 +129,6 @@ When you scaffold a block you must use either the theme or plugin option. The la
129
129
[--force]
130
130
Overwrite files that already exist.
131
131
132
-
**EXAMPLES**
133
-
134
-
# Generate a 'movie' block for the 'movies' plugin
135
-
$ wp scaffold block movie --title="Movie block" --plugin=movies
136
-
Success: Created block 'Movie block'.
137
-
138
-
# Generate a 'movie' block for the 'simple-life' theme
139
-
$ wp scaffold block movie --title="Movie block" --theme=simple-life
140
-
Success: Created block 'Movie block'.
141
-
142
-
# Create a new plugin and add two blocks
143
-
# Create plugin called books
144
-
$ wp scaffold plugin books
145
-
# Add a block called book to plugin books
146
-
$ wp scaffold block book --title="Book" --plugin=books
* Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme.
206
206
*
207
-
* Blocks are the fundamental element of the Gutenberg editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.
207
+
* **Warning: `wp scaffold block` is deprecated.**
208
208
*
209
-
* Visit the [Gutenberg handbook](https://wordpress.org/gutenberg/handbook/block-api/) to learn more about Block API.
209
+
* The official script to generate a block is the [@wordpress/create-block](https://developer.wordpress.org/block-editor/designers-developers/developers/packages/packages-create-block/) package.
210
210
*
211
-
* When you scaffold a block you must use either the theme or plugin option. The latter is recommended.
211
+
* See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/) for a complete walk-through.
0 commit comments