1000 Miles or Bust!

Take a Hike…

The Trivial Phrase Plugin (v. 0.1)

I recently wrote my first plugin for WordPress, The Trivial Phrase 0.1 plugin.

I wanted a way to make it easy to update the actual number of miles I have hiked this year. Before I just simply had it hardcoded in the sidebar, and was forced to edit the sidebar.php file every time I wanted to update the number.

So I wrote a very simple plugin that allowed me to update the miles I have hiked from inside the wordpress admin write menu. Then, because I am a geek, I generalized it to the notion of updating any trivial phrase. Moreover, one can change the prompt for the phrase and even the name of the “trivial phrase” submenu in the plugin.

It’s still pretty stupid though. I think a big improvement would be to allow you to have an an array of trivial phrases, and then call for each one using trivialphrase_print(x). When I get around to that, I’ll probably release it publicly. I can’t be the only one who needs an easy way of updating random silly stuff on a wordpress blog.

The Trivial Phrase Plugin source code (trivialphrase_0.1.zip)

February 11th, 2007 Posted by Tim | Hacking, Every last post | no comments

No Comments »

No comments yet.

Leave a comment

You must be logged in to post a comment.