O'Reilly logo

WordPress 3 Plugin Development Essentials by Everett Griffiths, Brian Bondari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required