This repository contains a simple, opinionated scaffold for new WordPress plugins. It is basically what wp scaffold plugin <my_wp_plugin> generates when using WP-CLI, but with my own embellishments added afterwards. Notably, these include:
- Object-oriented plugin code with working activation, deactivation, initialization, and uninstallation routines.
- Extra bundled helper plugins (like WP Screen Help Loader) ready to be used out-of-the-box.
- Thoroughly commented phpDocumentor docblocks and developer tool files like
phpdoc.dist.xml,.gitignore, and.travis.ymlfiles (for Travis-CI integration). - Customized
Plugin_UnitTestCaseclass (whichextends WP_UnitTestCase) for better issue tracker integration. - Sample configuration files for frequently used build toolchains (Bower,
npm, Composer).
Basically, you should be able to cp -R wordpress-plugin-skeleton wp-content/plugins/YOUR_NEW_PLUGIN and have more than just a "Hello world" example already working.
If this proves useful enough I may write a code generator for some of these things, but for now a cp works fine for me.
A readme file intended for developers. You can use Markdown here.
See the screenshots for an example walkthrough of how My_WP_Plugin works.