Last active
February 13, 2019 14:01
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add a new plugin with the slug "fancy-video-player" | |
wp scaffold plugin fancy-video-player |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add a block called "player" to "fancy-video-player" plugin | |
wp scaffold block player --title="Video Player" --plugin="fancy-video-player" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add a block called "transcription" to "fancy-video-player" plugin | |
wp scaffold block transcription --title="Video Transcription" --plugin="fancy-video-player" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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