WordPress Plugin Writing Resources

WordPress is easily my favorite open source software project.  I love it for it’s functionality, flexibility, and extensibility.  When it comes to writing a plugin, these are my favorite resources.  Don’t write a plugin without them!

  1. WordPress.org Codex for Writing a Plugin
    1. If you’re just getting started, this is the place to begin
  2. WordPress.org Codex Plugin API
    1. a great overview of the WordPress plugin API
  3. WordPress Action Reference
    • When WordPress displays a post, page, or the administrative pages it has to run through a number of functions and actions.  Your plugin will need to be activated at one of these points, and it is very helpful to know the order in which things happen.
  4. WordPress Filter Reference
    • The WordPress filter reference is a list of WordPress filters.  Each one will be able to deliver a little piece of the website for your to manipulate in your plugins.
  5. WordPress PHP Cross-Reference
    • The WordPress codex is pretty good – but it is not comprehensive.  If you want to know how some of the more obscure functions, variables, or constants work, you’ll just need to dive into the source code itself.  PHPXRef is, hands down, the best way to do this.  It let’s you search and read the the source code from their website.
  6. Top 10 Most Common Coding Mistakes in WordPress Plugins
    • This is quite possibly the best blog post about writing WordPress plugins.  Applying these guidelines will make you a better WordPress developer and your plugins faster, more efficient, and more awesome. :)
  7. How to Design and Style Your WordPress Plugin Admin Panel
    • In a lot of ways, a program is only as good as its user interface.  Build a good friendly and powerful interface and people will use your program.  Build a bad one and no one will use it, no matter how awesome it is.  This one blog post gives numerous little ways to make your WordPress plugin administrative interface look better.

Thingiverse formatting plugin

Schmarty’s Thingiverse embed plugin is pretty sweet. I believe it has been updated so that calling the relevant shortcode looks much more like a Thingiverse link to a particular thing.

Since I’m in a procrastinating mood, I began to wonder if it would be possible to make this plugin even easier to use. There are probably a lot more efficient ways to do this, but it is easy to turn a list of Thingiverse thing links into a set of Thingiverse Embed shortcodes.

http://www. -> ""
.com/  -> " "
:  -> =
\r\n  -> ]\r\n[

I suppose all of this over-engineering is really only suited to me and probably would never save more time than it would take to actually just type out the links like any normal person.

Still got it

I just helped my wife start her own blog.  She wanted to include a license for some of things she’ll be publishing, so I whipped up a little WordPress plugin that will insert some creative commons license language with a small shortcode.  Although I haven’t tinkered with one of my plugins for a while now (five or six months?) I uploaded the plugin, activated it, and it “just worked.”  That’s a good feeling – writing a piece of code and having it work straight off with no bugs.

I wish I could say the same for my 3D design skills. 1

  1. Wakka wakka! []

100% Chance of AWESOME

I rather enjoy writing WordPress plugins.  It started writing them out of necessity, but I’ve ended up writing several for frivolous reasons and fun.  One of my favorites is based upon the hard work of Rasmus.  Basically, it turns

[wordpress_shortcode data=’Totally awesome=99|Merely awesome=1‘]

into

[pdrpiechart data=”Totally awesome=99|Merely awesome=1″]

Which translates, as the title would suggest, into a 100% chance of awesome.

I dusted off this plugin (probably written about a year ago) because of the numbers associated with the MakerBot poll I recently ran.  I find it very helpful to view such data graphically.  Hopefully you will too.

Sketchup STL Importer Plugins

As I’ve mentioned before, I do all of my 3D modeling in Sketchup.  It’s not open source, but it is free.1

Well, I’ve been monitoring the Capolight Electronics Blog lately – and it’s a good thing too.  Besides having some seriously amazing information about the thermal properties of plastic, he’s just posted about some useful importing/exporting plugins for Sketchup.  As easy as Sketchup is to use, it’s just not very good at exporting to STL.  I haven’t tried these plugins out – but I’m hopeful they will do the job.

If you try them out, please let me know how it goes!

  1. I suppose it’s really a “freemium” business model… []