WordPress Base Plugin
This is a boilerplate WordPress plugin featuring namespace autoloading and Carbon Fields examples. It is intended to be used as a starting point for creating WordPress plugins. It contains several examples and dependencies to get you started.
Here are some ways that you can contribute:
- Suggest improvements and/or code them.
- Test the translation mechanisms - they have not been extensively tested yet.
- Report bugs and/or incompatibilities
- Namespaces & dependency autoloading
- Version checking (PHP, Carbon Fields)
- Powered by Composer, Gulp and Bower
- Object caching (where available; usage examples)
- Easy installable ZIP file generation:
npm run zip
- Automatic translation file (
.pot) creation. See Translation.
- Network Admin (multisite) options, shortcodes, widgets (via Carbon Fields) and custom post types (via PostTypes) examples
- Configuration registry (docs) and optional
- Customizer examples using WP Customizer Framework
- Define environmental variables via
- More to come...
Note: Gulp and Bower are optional, but handy. If you do not wish to use them, you can delete the references.
- WordPress 4.7 or higher
- PHP 5.6 or higher
- Carbon Fields 2.2 or higher. See the wiki section Carbon Fields for more info.
If you need tips on installing Node.js, Composer, Gulp & Bower, see Installing Dependencies.
The short version:
- Clone repository to your
- Change the four variables in package.json. Modify plugin.json as necessary.
npm install; gulp rename; composer install
- (optional) For some of the included examples to work, you'll also want to run:
bower install; gulp;
- At command prompt, change to your
- Clone the repository:
git clone https://github.com/dmhendricks/wordpress-base-plugin.git
- Renamed the newly created
wordpress-base-plugindirectory to your own plugin slug.
See the Getting Started documentation for further steps.
- Add plugin uninstall support
- Add support for Gulp 4.0
- Switch to npm and WebPack for frontend dependency management
- Remove or replace tareq1988/wordpress-settings-api-class examples with something actively developed
- Clean up Carbon Fields custom CSS classes
- Allow cache flushing by group
- Add Gutenberg examples
Release changes are noted on the Releases page.
- None since release