Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active February 13, 2019 14:01
Show Gist options
  • Save Shelob9/84165050cd144392bd4fc451f04c1523 to your computer and use it in GitHub Desktop.
Save Shelob9/84165050cd144392bd4fc451f04c1523 to your computer and use it in GitHub Desktop.
Install WP CLI's scaffold command, create a plugin, add two blocks to the plugin and then activate it.
wp scaffold plugin fancy-video-player && wp scaffold block player --title="Video Player" --plugin="fancy-video-player" && wp scaffold block transcription --title="Video Transcription" --plugin="fancy-video-player" && wp plugin activate fancy-video-player
#Install scaffold comammand so we can add scaffold a plugin and then blocks for that plugins
wp package install [email protected]:wp-cli/scaffold-command.git
#Add a new plugin with the slug "fancy-video-player"
wp scaffold plugin fancy-video-player
# Add a block called "player" to "fancy-video-player" plugin
wp scaffold block player --title="Video Player" --plugin="fancy-video-player"
# Add a block called "transcription" to "fancy-video-player" plugin
wp scaffold block transcription --title="Video Transcription" --plugin="fancy-video-player"
# Activate plugin fancy-video-player/fancy-video-player.php
wp plugin activate fancy-video-player
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment