Boilerplate wp plugin following modern php best practices, includes Composer, GrumPHP, PHPCS with PSR-2 standard.
Based on the Wordpress-Plugin-Boilerplate plugin.
- Create folder inside
/wp-content/plugins/with desired plugin name (e.g. /grump-wp-bg) - Open downloaded zip file or git clone this repo inside folder
- Rename all "plugin name" to desired name
cdinto plugin directory and runcomposer install- Activate the plugin through the 'Plugins' menu in WordPress
Note that if you include your own classes, or third-party libraries, there are three locations in which said files may go:
plugin-name/includesis where functionality shared between the admin area and the public-facing parts of the site resideplugin-name/adminis for all admin-specific functionalityplugin-name/publicis for all public-facing functionality
You can check some example plugins here using the base boilerplate (same file structure).
The Wordpress-Plugin-Boilerplate was started in 2011 by Tom McFarlin and has since included a number of great contributions. In March of 2015 the project was handed over by Tom to Devin Vinson.