Creating Your Own WP CLI Command From Scratch

preview_player
Показать описание
In this video, I show you how to create your own WP CLI command and how it can be useful in a real-world project!

💖 Become a Patron to show support & get perks!

Sign up for the newsletter. Free course coming in 2020:

**SOCIAL**

#WordPress #CLI #Custom
Рекомендации по теме
Комментарии
Автор

That was the best tutorial I've seen so far on WP-CLI

richardbuff
Автор

great video. can you make some videos about testing? unit testing and if possible e2e testing

Quynn-Oneal
Автор

Possible extension to clean out the fake data after use:
Add a meta field on each fake post that denotes it being a fake
Add a subcommand to wpc like 'wpc delete_floorplans' that finds all floorplans with the above mentioned meta field and deletes them.

Food for thought: How would you make the subcommands 'wpc generate_all' and 'wpc delete_all' so that they would call all separate 'generate_{post_type}' and 'delete_{post_type}' subcommands respectively?

hcjorgensen
Автор

Hello, sir love Your videos !! can you make a video on the WordPress learning path for complete beginners. That'll be so much helpful for us, thank you!

sumanbiswas
Автор

Great video. A couple of thoughts:

- Composer - you should probably be requiring Composer's generated autoloader, not the Faker autoloader. So just `./vendor/autoload.php`
- `get_terms` can simply return IDs. Pass the arg `'fields' => 'ids'`

sternerstuff