Top

Wordpress Plugin Template

January 27, 2009

I know that when I started coding Wordpress Plugins, I had a rough time getting started. So, after spending a lot of time building them from the ground up, I eventually developed a plugin template that I start all of my plugins from.

So, after building a number of plugins from it, and “perfecting” it (read: adding time saving features, because I’m lazy and don’t like to re-write code) I’ve decided to release it to the Wordpress community so that other plugin authors don’t have to start from scratch anymore either.

Is it perfect? No - no template is. Does it speed up my plugin coding time? You bet it does!

Note: This code isn’t guaranteed in any way. This is what I use, and it saves me time but is by no means complete. (that’s why it’s a template) Use this code at your discretion, and understand that I’m in no way telling you that it will work for you, heh

That said, if it does help you, let me know, and if you feel so inclined, post about Pressography on your blog!

Download the template here (I’ve saved it as a .txt file, you’ll need to re-name it to .php)

And I also did a walkthrough video of an earlier version to show you why I included the code that I did. Check it out:


(If you can’t read the code, try full screen)

And if you’ve looked at the template I linked to above, and compared it to the video, you’ll notice that I’ve made a few changes since I did the video - I added a few more Find & Replace tokens (like {widget_slug}) to make things that much easier and faster.

Happy coding!

Update: 1/28/09 - I updated the plugin to include the action link, as explained here: http://striderweb.com/nerdaphernalia/2008/06/wp-use-action-links/
Thanks to Sudar in his comment, below!

Because this plugin/widget is provided free of charge, I simply ask you to link back to Pressography.com in a post on your blog, or from one of your sites. It doesn't need to be anything fancy - just a note saying that you're using it, and whether or not you like it. However, there is no requirement that you do this, you're free to use the plugin regardless.

Also on Pressography: Booking Plugins, And When To Stop Using One

Comments

4 Responses to “Wordpress Plugin Template”

  1. Sudar on January 28th, 2009 2:46 am

    @Jason - Thanks for considering my request

  2. Jason on January 28th, 2009 12:57 am

    @Sudar -
    Great idea - I’ll add the action link soon, but I’m not sure how I feel about the footer link… it seems a bit redundant, only displaying it when they’re on your options pages, and a little spammy to put it site-wide (unless your plugin does truely change WP site-wide) so I think I’ll leave that up to the individual plugin authors.

    I don’t want to be the guy to start the trend of every plugin getting credit in the footer

  3. Sudar on January 27th, 2009 10:54 pm

    Thanks for sharing the template. It will really save a couple of minutes while creating a new Plugin.

    How about adding functions to display action links and footer links. Details at http://striderweb.com/nerdaphernalia/2008/06/wp-use-action-links/ and http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/

  4. Wordpress Plugin/Widget Template | David Bisset: Web Designer, Coder, Wordpress Guru on January 29th, 2009 10:37 am

    [...] is more of a bookmark then anything else, since I have yet to try this. But this Wordpress Plugin Template seems very interesting and useful for those who want to learn to create Wordpress plugins. Not sure [...]

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.