This is a tutorial plugin with examples. I created some tutorials to help with my work and I thought, I would share this to help others.
More will come... ;)
LAST CHANGE: 2020-07-02
A standardized, organized, object-oriented foundation for building high-quality WordPress Plugins.
Get the WordPress Plugin Boilderplate from here: https://github.com/DevinVinson/WordPress-Plugin-Boilerplate
Github link for the WordPress Plugin Boilerplate Generator: https://github.com/Tmeister/wppb-gen-site
Generate your personalized plugin: Plugin Boilerplate Generator
Exopite Simple Options Framework(https://github.com/JoeSz/Exopite-Simple-Options-Framework) (e.g.: tests)
Exopite Simple Options Framework
get_template_partto load (single) template from plugin folder
class-gamajo-template-loader.phpfrom https://github.com/GaryJones/Gamajo-Template-Loader and
YahnisElsts - Plugin Update Checker(https://github.com/YahnisElsts/plugin-update-checker)
Check out the
The WordPress Plugin Boilerplate includes the following files:
.gitignore- Used to exclude certain files from the repository.
CHANGELOG.md- The list of changes to the core project.
README.md- The file that you’re currently reading.
plugin-namedirectory that contains the source code - a fully executable WordPress plugin.
.potfile as a starting point for internationalization.
The Boilerplate can be installed directly into your plugins folder "as-is". You will want to rename it and the classes inside of it to fit your needs.
Note that this will activate the source code of the Boilerplate, but because the Boilerplate has no real functionality no menu items, meta boxes, or custom post types will be added.
You may delete, what you don't use, on production
Template File Loaders in Plugins
Template file loaders like this are used in a lot of large-scale plugins in order to provide greater flexibility and better control for advanced users that want to tailor a plugin’s output more to their specific needs.
The original launch of this version of the boilerplate included the folder structure needed for using your plugin on WordPress.org. That folder structure has been moved to its own repo here: https://github.com/DevinVinson/Plugin-Directory-Boilerplate
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.
The WordPress Plugin Boilerplate is licensed under the GPL v3 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 plugin’s directory. The file is named
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.
Note that if you include your own classes, or third-party libraries, there are three locations in which said files may go:
plugin-name/includesis where functionality shared between the admin area and the public-facing parts of the site reside
plugin-name/adminis for all admin-specific functionality
plugin-name/publicis for all public-facing functionality
Note that previous versions of the Boilerplate did not include
Plugin_Name_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.
The previous version of the WordPress Plugin Boilerplate included support for a number of different projects such as the GitHub Updater.
These tools are not part of the core of this Boilerplate, as I see them as being additions, forks, or other contributions to the Boilerplate.
The same is true of using tools like Grunt, Composer, etc. These are all fantastic tools, but not everyone uses them. In order to keep the core Boilerplate as light as possible, these features have been removed and will be introduced in other editions, and will be listed and maintained on the project homepage.
The WordPress Plugin Boilerplate was started in 2011 by Tom McFarlin and has since included a number of great contributions. In March of 2015 the project was handed over by Tom to Devin Vinson.
If you’re interested in writing any documentation or creating tutorials please let me know .
= 2020-07-02 =
= 2019-05-27 =
= 2019-04-10 =
= 2018-09-30 =
= 2018-09-25 =
= 2018-08-29 =
= 1.0.2 =
= 1.0.1 =
= 1.0.0 =
If you use my program(s), I would greatly appreciate it if you kindly give me some suggestions/feedback. If you solve some issue or fix some bugs or add a new feature, please share with me or mke a pull request. (But I don't have to agree with you or necessarily follow your advice.)
Before open an issue please read the readme (if any :) ), use google and your brain to try to solve the issue by yourself. After all, Github is for developers.
My updates will be irregular, because if the current stage of the program fulfills all of my needs or I do not encounter any bugs, then I have nothing to do.
I provide no support. I wrote these programs for myself. For fun. For free. In my free time. It does not have to work for everyone. However, that does not mean that I do not want to help.
I've always tested my codes very hard, but it's impossible to test all possible scenarios. Most of the problem could be solved by a simple google search in a matter of minutes. I do the same thing if I download and use a plugin and I run into some errors/bugs.