This is a boilerplate WordPress plugin featuring namespace autoloading and integration with Carbon Fields. It is intended to be used as a starting point for creating quick WordPress plugins. It contains several examples and dependencies to get you started.
It may also be used as the means of separating custom code from the theme.
- Namespaces & dependency autoloading
- Dependency version checking (PHP, Carbon Fields)
- Object caching (when available) - Usage Examples
- Shortcodes, widgets and custom post type (via PostTypes) examples
- Optional configuration Constants (more are planned)
- More to come...
- WordPress 4.0 or higher
- PHP 5.4 or higher
- Carbon Fields 2.0 or higher (see Dependencies for more info)
- At command prompt, change to your
wp-content/plugins
directory. - Close the repository:
git clone https://github.com/dmhendricks/wordpress-base-plugin.git
- Modify
composer.json
to suit your needs - Run
composer install
to install dependencies and autoload namespace
Note: hgoebl/mobile-detect
is just loaded as an example. Feel free to remove it.
This plugin loads many of its defaults & settings from plugin.json
. See Configuration & Constants for more information.
- Fix i18n issues, add
gulp-wp-pot
support - Add task runner, related documentation, update .gitignore and rearrange
./assets
- Improve configuration management
- Add Ajax call example
- Add encrypt/decrypt example (
password
field with encryptedhidden
field) - Add GitHub update class (GitHub Updater 7 is destroying my memory consumption)
- Add Customizer example
- Add dynamically-created CSS/JS files based on settings
- Move Cache class to external dependency
Release changes are noted on the Releases page.
- Added
Utils::is_json()
function to test for valid syntax - Added
register_uninstall_hook
to delete Carbon Fields settings when plugin uninstalled - Added wordpress-settings-api-class settings page example
Please support humans.txt. It's an initiative for knowing the people behind a web site. It's an unobtrusive text file that contains information about the different people who have contributed to building the web site.
Carbon Fields
URL: https://carbonfields.net/
Author: htmlBurger.com
Twitter: @htmlburger
Author URI: https://htmlburger.com/
Location: London, England
PostTypes
URL: https://github.com/jjgrainger/PostTypes/
Author: Joe Grainger
Twitter: @jjgrainger
Author URI: https://jjgrainger.co.uk/
Location: Falmouth, England
Carbon Fields
URL: https://github.com/tareq1988/wordpress-settings-api-class
Author: Tareq Hasan
Twitter: @tareq_cse
Author URI: https://tareq.co/
Location: Dhaka, Bangladesh