You are here: Home » Demo Plugins

Demo Plugins

(Reading time: 2 – 3 minutes)

One really great way to teach yourself how to do something… is to do it.

The next best way is to learn from really simple examples that you can quickly master.

Since I do really well learning by doing, I thought to share fruits of my labor with others who appreciate airtight, accurate examples.

Thus, I present a suite of very, very simple plugins, each examining one aspect of WordPress plugin programming, and accomplishing… absolutely nothing at all! But if you use these plugins as building blocks for your own work, your plugin construction will proceed much faster.

Check these out:

  1. Demo Plugin i18n: Once you understand how this plugin works, you are 90% on your way to internationalizing your own plugins.
  2. Demo Plugin Options: Ever wonder how those cool options pages are created? Wonder no more. This plugin will let you set options. In fact, that’s all it will let you do!
  3. Demo Plugin Database: Adding a database table for your plugins convenience is not very difficult, once you see it done. With this plugin, it’s all you will see done.
  4. Demo Plugin Paths: Do all those variations and combinations in __FILE__, dirname, basename, etc. confuse you as much as they do me? Be confused no more. The Demo Paths plugin simply lists each common variation out in it’s administration page for you to peruse any time your confusion reigns. I can’t program WordPress without this plugin!

These tiny demonstration plugins were inspired by the B2Template plugin, which you should install as well. These plugins complement B2Template perfectly: where B2Template takes a “top down” approach of putting all the dummy code into one plugin, the Website In A Weekend approach is bottom up.

Using top down, you customize and replace existing B2Template functions, stripping out what you don’t need.

Using bottom up, choose only the plugins you need to use, and add them together, changing the example names as necessary.

Have fun, and leave a comment if you have any questions.

More Plugins

Check out all of my plugins:

  • Microformat your recipes on WordPress with hRecipe.
  • Learn how to implement internationalization (i18n) with this really simple Demo Plugin i18n.
  • AWeber Super Simple helps you snag registered users for your AWeber confirmed opt-in mailing list, right when they register.
  • Demo Plugin Database is about the simplest possible database plugin anyone could write. If you’re having trouble getting your database code to work properly, start from this plugin and work forward.

{ 2 comments }

James Moralde December 17, 2009 at 6:43 pm

Thanks Dr. WP! I’m devouring these cool demo plugins of yours one by one. :) Looks like I don’t need to start from scratch after all.

Dr Wordpress! December 17, 2009 at 6:45 pm

Yep, these little plugins should get you jump started.

If you have ANY questions, let me know. Leave a comment or something. I’ll try my best to clarify anything confusing.

Comments on this entry are closed.

{ 1 trackback }