maadhattah / wppb-mod
A modern WordPress development boilerplate, based on Tom McFarlin's wppb.io
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1 619
Open Issues: 2
Type:project
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 4.3.*
This package is auto-updated.
Last update: 2019-11-24 16:53:00 UTC
README
This project has been deprecated in favor of jaxion-bootstrap. That project is still under development but most of the tools/implementations found here will be included. If you have any questions, please email me at jamesorodig@gmail.com.
wppb-mod
A standardized, organized, object-oriented foundation for building high-quality WordPress Plugins.
Requirements
wppb-mod comes with these tool requirements:
- PHP 5.3+
- Note: WordPress is compatible back to 5.2, so not all your users will be able to use this plugin yet.
- Composer, for back-end libraries.
- npm, for build tools.
- Bower, for front-end libraries.
- Gulp, for project builds
Features
- New plugins can be generated with
composer create-project maadhattah/wppb-mod <target_dir>
.- The flattened structure is required for this to work.
- boilerplate is based on the Plugin API, Coding Standards, and Documentation Standards.
- All classes, functions, and variables are documented so that you know what you need to be changed.
- The app is loaded into a singleton so third-party developers can manipulate the hooks.
- The project includes a
.pot
file as a starting point for internationalization. - The unit tests are scaffolded and ready to go, based on
wp scaffold plugin-tests
, which provides support for travis-ci.
Installation
The plugin can be developed in your wp-content
folder directly. Run gulp
to make the minified and concatenated files and begin the watch process. Whenever the scripts or styles change, gulp will recompile them into their respective css and js files.
When you want to provide a version to distribute, run gulp build
and distribute the resulting .zip file.
Recommended Tools
i18n Tools
The WordPress Plugin Boilerplate uses a variable to store the text domain used when internationalizing strings throughout the Boilerplate. To take advantage of this method, there are tools that are recommended for providing correct, translatable files:
Any of the above tools should provide you with the proper tooling to internationalize the plugin.
License
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
A copy of the license is included in the root of the directory. The file is named LICENSE
.
Important Notes
Licensing
The WordPress Plugin Boilerplate 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.
For reference, here's a discussion that covers the Apache 2.0 License used by Bootstrap.
Includes
Note that if you include third-party libraries, use either bower install --save-dev
, for front end libraries, or composer require
, for php libraries.
Note that previous versions of the Boilerplate did not include Loader
but this class is used to register all filters and actions with WordPress.
The example code provided shows how to register your hooks with the Loader class. More information will be provided in the upcoming documentation on the website.
Assets
The assets
directory contains three files.
banner-772x250.png
is used to represent the plugin’s header image.icon-256x256.png
is a used to represent the plugin’s icon image (which is new as of WordPress 4.0).screenshot-1.png
is used to represent a single screenshot of the plugin that corresponds to the “Screenshots” heading in your pluginREADME.txt
.
The WordPress Plugin Repository directory structure contains three directories:
assets
branches
trunk
The Boilerplate offers support for assets
and trunk
as branches
is something that isn’t often used and, when it is, is done so under advanced circumstances.
When committing code to the WordPress Plugin Repository, all of the banner, icon, and screenshot should be placed in the assets
directory of the Repository, and the core code should be placed in the trunk
directory.
Credits
The WordPress Plugin Boilerplate was started in 2011 by Tom McFarlin and his since included a number of great contributions.
The current version of the Boilerplate was developed in conjunction with Josh Eaton, Ulrich Pogson, and Brad Vincent. This fork is developed and maintained by James DiGioia.
The homepage is based on a design as provided by HTML5Up, the Boilerplate logo was designed by Rob McCaskill of BungaWeb, and the site favicon
was created by Mickey Kay.