A WP-CLI command and grunt task for the Theme Check plugin

Standard

A few months ago I had the idea of creating a wp-cli command for the theme check plugin, and integrating that in with Grunt so that I could use it in my theme build process.

Yesterday I sat down and pulled everything together to do just that.

I’ve modified the existing Theme Check plugin to include a WP-CLI command, and you can grab it on github. If you’re interested, you can also check out the changes I made to create this (as some work had to be done on the plugin directly).

Once you have that version of Theme Check, and can run

wp theme review check <theme-name>

you can also pull down the grunt plugin that integrates with it. Grunt-wp-theme-check is on github and npmjs, and the readme should do a decent job explaining how to use it. Use the following to install it for your project:

npm install grunt-wp-theme-check --save-dev

If you’re still a little lost, you can check out my updated Grunt-Theme-Builder, which explains my process for building and packaging themes. Note that this is just a Gruntfile and package.json, if you want to use it, you’ll need to set up your theme files like I outline, or just copy-paste the tasks you want.

Let me know if you’re using it and if you run into any issues :)

How to theme MP6 in a plugin

Standard

MP6 has some awesome color schemes, but maybe you want to add more. Here’s how you can add your own in a plugin.

Edit (11/19): As MP6 was an experimental plugin, most of the code here will not apply to what’s been merged into WP 3.8. The idea is the same, though (except the customizer colors were dropped).

Continue reading