The master plugin outline
After looking over the examples on Digg.com
and trying out our own proof of concept, we know what we're aiming for, so let's think through the structure of the PHP code that is required. When you write your own plugins, it's a great habit to sketch an outline of the main components before you start any serious coding because it will force you to identify problems and establish a structure. Keep in mind there are many different ways in which a plugin could be written, so don't be discouraged if your outline differs from ours.
We know our plugin needs an information header and either the add_action()
or the add_filter()
functions. We also want to test the WordPress version in use and we're going to outline some of the helper ...
Get WordPress 3 Plugin Development Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.