humanmade / Sideload-on-publish

Automatically sideload images when publishing posts/comments to ensure things don't get broken.
12 stars 2 forks source link

Add wp-cli support #2

Open danielbachhuber opened 11 years ago

danielbachhuber commented 11 years ago

It would be nice to have a wp-cli command for making sure all of the images referenced on the site are pulled into the media gallery.

Something like: wp p2-sideload-media import-all

It would get all posts and comments, loop through, run the sideload code you have, and update as necessary.

mattheu commented 11 years ago

Hey i've implemented this for posts so far.

wp sideload-images all-in-posts

1416c419aefed658007fe23b425c65f2621d4f8e

danielbachhuber commented 11 years ago

Nice! Btw, you should use hub to create a pull request from an issue :)

mattheu commented 11 years ago

Thanks. Hub is on my list of things to check out!