WordPress Plugin Boilerplate
The WordPress Plugin Boilerplate serves as a foundation and aims to provide a clear and consistent guide for building your WordPress plugins.
- The Plugin Boilerplate is fully-based on the WordPress Plugin API
- Uses PHPDoc conventions for easily following the code
- Liberal use of
TODOto guide you through what you need to change
- Uses a strict file organization scheme to make sure the assets are easily maintainable
The WordPress Plugin Boilerplate includes the following files:
- A subdirectory called
- Copy the
plugin-boilerplatedirectory into your
- Navigate to the Plugins dashboard page
- Locate the menu item that reads TODO
- Click on Activate
This will activate the WordPress Plugin Boilerplate. Because the Boilerplate has no real functionality, nothing will be added to WordPress; however, this demonstrates exactly how your plugin should behave as you're working with it.
If you opt to uncomment Line 77 which contains the following line:
add_action( 'admin_menu', array( $this, 'plugin_admin_menu' ) );
Then a new menu item will be added to the Plugins menu.
The WordPress Plugin Boilerplate is licensed under the GPL v2 or later.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2.0 (7 May 2012)
- Disabling the admin menu by default
- Initializing the attributes
- Combining the
admin_closeinto a single
- Bringing some of the code up to the WordPress coding standards
- Added access modifiers for functions
- Implemented the single pattern
- japh. Merged upstream changes, maintained separation of uninstall functionality
- mikkelbreum. Restricted scripts and styles to load only on plugin settings page if it is enabled.
- mikkelbreum. Added the option for a plugin settings page
- mikkelbreum. Removed the need to customize the URL for
- mikkelbreum. Corrected action book for
- japh. Added an
- leewillis77. Improved the way language files are loaded
- wesbos. Updated the year to 2013
1.0 (29 November 2012)
- Official Release
The WordPress Plugin Boilerplate was originally started and is maintained by Tom McFarlin, but is constantly under development thanks to the contributions from the many WordPress developers throughout the world.