#WordPress Plugin Boilerplate Powered
WordPress Plugin Boilerplate Powered is a complete foundation (without frameworks with many independent libaries ) for building your WordPress plugins.
Look in Recommended tools section of this readme for the Yeoman Generator and Vagrant.
You want to see which plugins have been made with this boilerplate or add them to the list? Check here!
Check the Wiki for other info.
##Features
###Library integrated
- Plugin Boilerplate Powered is based on Plugin Boilerplate by Tom McFarlin
- Checked the minimum version required with PHPCompatInfo (PHP 5.2)
- Sass support with Compass and Grunt
- CoffeeScript support Grunt (not mandatory with the Yeoman generator)
- CPT Core and Taxonomy Core integrated
- CMB2, CMB2-Google-Maps and CMB2-Grid integrated
- WordPress Widgets Helper Class with improvements
- WP Contextual Help integrated
- WP Admin Notice integrated
- PointerPlus integrated
- CronPlus integrated
- WP Background Processing integrated
- Freemius SDK integrated
- Function for custom template (like WooCommerce) also for email with multilanguage in
includes/template.php
- Fake Page class in
includes/language.php
inincludes/fake-page.php
- Language function wrapper for WPML/Ceceppa Multilingua/Polylang in
includes/language.php
- Modified Debug system in
admin/includes/debug.php
- Very modified requirements detection on activation in
public/includes/requirements.php
- Modified CPT_Columns Class for CPTs columns in
admin/includes/CPT_Columns.php
###Snippet included
- Shortcode example code
- Dashicon as dependence of admin stylesheet
- Bubble notification on pending cpts
- Import/Export settings
- Custom capabilities with cpts and taxonomy support
- wp_localize_script for pass PHP var to JS in the frontend
- Class in frontend body with the slug of plugin
- Support for your CPTs in At Glance widget/Activity widget in dashboard
- Support for CMB in the options page
- Support for email template with language detection
- Integrated DOM-Based Routing of Roots Template
###WordPress Plugin Boilerplate Feature
- The Plugin Boilerplate Powered is fully-based on the WordPress Plugin API.
- Uses PHPDoc conventions to document the code.
- Example values are given, so you can see what needs to be changed.
- Uses a strict file organization scheme to make sure the assets are easily maintainable.
- Note that this boilerplate includes a
.pot
as a starting translation file.
##Shell Script & Tools
###Included
- wp-boilerplate-version.sh (check below)
- .compatinfomin.php for PHP Compat Info check on wiki
- .php_cs for PHP-CS-Fixer
- apigen.sh script for generate a docs folder with the documentation
Check on the wiki for discover how to use this script!
###Useful resources or code examples
Check on the wiki!
##Installation
PS: Use the Yeoman generator in the Generator Tool is better and simple!
- Copy the
plugin-name
directory into yourwp-content/plugins
directory - Navigate to the Plugins dashboard page
- Locate the menu item that reads TODO
- Click on Activate
This will activate the WordPress Plugin Boilerplate Powered.
Because the Boilerplate has no real functionality, nothing will be added to WordPress; however, this demonstrates exactly how your plugin should behave while you're working with the Boilerplate.
###Git Clone
git clone --recursive [email protected]:Mte90/WordPress-Plugin-Boilerplate-Powered.git
cd WordPress-Plugin-Boilerplate-Powered/plugin-name
##Git update submodule
git submodule update --recursive
git submodule foreach git pull origin master
##Recommended Tools
###Generator Tool
For WordPress Plugin Boilerplate Powered exist a Yeoman generator that allows you to choose the libraries you need with a small customization.
Link to repo: https://github.com/Mte90/generator-wp-plugin-boilerplate-powered/
##License
The WordPress Plugin Boilerplate Powered is licensed under the GPL v2 or later; however, if you opt to use third-party code that is not compatible with v2, then you may need to switch to using code that is GPL v3 compatible.