Creating Your Own WP CLI Command From Scratch

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น •

  • @richardbuff1128
    @richardbuff1128 ปีที่แล้ว

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

  • @Quynn-Oneal
    @Quynn-Oneal 4 ปีที่แล้ว +6

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

  • @hcjorgensen
    @hcjorgensen 4 ปีที่แล้ว +1

    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?

    • @WPCasts
      @WPCasts  4 ปีที่แล้ว

      You probably would have something like: `delete_posts --post_type=floorplan,post,page --amount=-1`

  • @johannes-euquerofalaralema4374
    @johannes-euquerofalaralema4374 3 ปีที่แล้ว

    Thanks!! More, please!! :)

  • @sumanbiswas3071
    @sumanbiswas3071 4 ปีที่แล้ว

    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!

  • @sternerstuff8817
    @sternerstuff8817 2 ปีที่แล้ว

    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'`