Skip to content

Commit

Permalink
Merge pull request #329 from ernilambar/fix/scaffold-command-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Apr 26, 2024
2 parents 40b98b5 + ab12dee commit 9966390
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -21,18 +21,18 @@ wp scaffold

**EXAMPLES**

# Generate a new plugin with unit tests
# Generate a new plugin with unit tests.
$ wp scaffold plugin sample-plugin
Success: Created plugin files.
Success: Created test files.

# Generate theme based on _s
# Generate theme based on _s.
$ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe"
Success: Created theme 'Sample Theme'.

# Generate code for post type registration in given theme
# Generate code for post type registration in given theme.
$ wp scaffold post-type movie --label=Movie --theme=simple-life
Success: Created /var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php
Success: Created '/var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php'.



Expand Down Expand Up @@ -93,9 +93,9 @@ wp scaffold block <slug> [--title=<title>] [--dashicon=<dashicon>] [--category=<

**Warning: `wp scaffold block` is deprecated.**

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.
The official script to generate a block is the [@wordpress/create-block](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/) package.

See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/) for a complete walk-through.
See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/tutorial/) for a complete walk-through.

**OPTIONS**

Expand Down Expand Up @@ -275,7 +275,7 @@ The following files are generated by default:
* `tests/test-sample.php` is a sample file containing the actual tests.
* `.phpcs.xml.dist` is a collection of PHP_CodeSniffer rules.

Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/plugin-unit-tests/).
Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/).

**ENVIRONMENT**

Expand Down Expand Up @@ -414,7 +414,7 @@ The following files are generated by default:
* `tests/test-sample.php` is a sample file containing the actual tests.
* `.phpcs.xml.dist` is a collection of PHP_CodeSniffer rules.

Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/plugin-unit-tests/).
Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/).

**ENVIRONMENT**

Expand Down
16 changes: 8 additions & 8 deletions src/Scaffold_Command.php
Expand Up @@ -8,18 +8,18 @@
*
* ## EXAMPLES
*
* # Generate a new plugin with unit tests
* # Generate a new plugin with unit tests.
* $ wp scaffold plugin sample-plugin
* Success: Created plugin files.
* Success: Created test files.
*
* # Generate theme based on _s
* # Generate theme based on _s.
* $ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe"
* Success: Created theme 'Sample Theme'.
*
* # Generate code for post type registration in given theme
* # Generate code for post type registration in given theme.
* $ wp scaffold post-type movie --label=Movie --theme=simple-life
* Success: Created /var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php
* Success: Created '/var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php'.
*
* @package wp-cli
*/
Expand Down Expand Up @@ -206,9 +206,9 @@ private function scaffold( $slug, $assoc_args, $defaults, $subdir, $templates )
*
* **Warning: `wp scaffold block` is deprecated.**
*
* 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.
* The official script to generate a block is the [@wordpress/create-block](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/) package.
*
* See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/) for a complete walk-through.
* See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/tutorial/) for a complete walk-through.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -711,7 +711,7 @@ public function plugin( $args, $assoc_args ) {
* * `tests/test-sample.php` is a sample file containing the actual tests.
* * `.phpcs.xml.dist` is a collection of PHP_CodeSniffer rules.
*
* Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/plugin-unit-tests/).
* Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/).
*
* ## ENVIRONMENT
*
Expand Down Expand Up @@ -764,7 +764,7 @@ public function plugin_tests( $args, $assoc_args ) {
* * `tests/test-sample.php` is a sample file containing the actual tests.
* * `.phpcs.xml.dist` is a collection of PHP_CodeSniffer rules.
*
* Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/plugin-unit-tests/).
* Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/).
*
* ## ENVIRONMENT
*
Expand Down

0 comments on commit 9966390

Please sign in to comment.