This entry is part 2 of 7 in the Writing Your First WordPress Plugins, Basic to Advanced Series
- How to Begin Writing Your First WordPress plugin
- Structuring Your First WordPress Plugin
- Writing Your First WordPress Plugin Part 3
- Writing Your First WordPress Plugin Part 4
- Writing Your First WordPress Plugin Part 5
- Writing Your First WordPress Plugin Part 6
- Writing Your First WordPress Plugin Part 7 – Final
Knowing how to best structure your plugin is very, very important to the success and quality of your plugin. You should spend several minutes laying out the structure of your plugin before you ever begin writing it. This part of the Writing Your First WordPress Plugin series will walk you through the process of laying out your plugin structure. I will also describe many of the best practices you should be using while developing your plugin.
Notes From The Video
Your plugin folder/file structure should look similar to this:
- Always prefix your function and variable names
- Separate your plugin into multiple files with filenames that make logical sense
- Always give your WordPress plugin its own dedicated folder
- Name the plugin folder and main file the same thing
- Comment your code
- Group similar functions together
You can download the work-in-progress plugin below. You will be able to download the full version with everything I have done at the end of each part in this series.
The download for this plugin has been lost. Please proceed to part two and download the WIP plugin there.