Automattic / developer

In your WordPress, developing locally
http://vip.wordpress.com
GNU General Public License v2.0
472 stars 103 forks source link

First pass at a WP-CLI command to install all the plugins #48

Closed joshbetz closed 11 years ago

joshbetz commented 11 years ago

For VIP Quickstart, it would be nice to be able to programmatically install all the recommended plugins with WP-CLI. This isn't super robust, but gets the job done for now. For example, there's a semi-weak check for weather or not the plugin in question is already installed. It would be better if WP-CLI had a way to check whether a plugin was installed without killing the script. Related: https://github.com/wp-cli/wp-cli/issues/627

joshbetz commented 11 years ago

Instead of using file_exists(), I'm using get_plugins() as @danielbachhuber suggested. This is useful because you actually need the path to check if the plugin is activated and then to install it anyway. $automattic_developer->get_path_for_recommended_plugin was useful for this. I also had to make get_project_types() public so it would be accessible here.

mjangda commented 11 years ago

I would name the class something more explicit like Developer_WP_CLI_Command but other than that, looks good to merge.