Wordpress Plugin Templates v2.0

Wordpress Plugin Templates v2.0

Not that long ago I released my Wordpress Plugin Templates and they were greatly received by you all. Through this wide spread attraction, it was inevitable that a flaw would be found and some improvements be suggested. So I took these suggestions and an idea I had, and updated these templates to allow for less editing of the template files and faster plugin development all around.

Download the Version2 Templates

Improvements

  • New Folder Structure
  • Easy removal of Admin page creation
  • Quickly rename/alter plugin attributes with global variables in main.php
  • Automatically gather all plugin files from the "features" directory

How to Use / What to Edit

In "main.php" there are 3 variables that you must edit for your plugin: $plugin_name, $plugin_ref, $plugin_abv (if you're unsure of how to fill those variables, the default values will clarify).

The only other thing you need to do is edit the admin-page.php and place all your main plugin files inside the "features" folder so that they will automatically be included into main.php (support files can be placed where ever).
Note: ANY file with a .php extension inside the "features" folder will be called into the main.php file.

The Structure

  • /admin
    • add-admin-page.php
    • admin-page.php
  • /features
    • purpose.php
  • main.php

Share the Love Share the Love

Add to Reddit Add to StumbleUpon Add to Mixx Add to Delicious Add to designfloat

About the author: Fire G

Hey, I'm the founder of Fire Studios, and thus, have my hands in everything that goes on here at FS. I manage the content, moderate the comments, design everything, code everything, provides a lot of articles, host the official podcast FS-Air, and run/manage most of the other sites in the FI family. Often times I'll come to be working on so many things that I hardly accomplish much, but that's what makes me who I am.

10 Reader Comments

  •  
  • BobMarche
    June 10th

    Thanks for the useful info. It's so interesting

  • Flex Guy
    June 11th

    very nice article…keep on the good work

  • Tim
    June 15th

    Very cool, I am doing some research on this topic and was glad to find your example files, I have been searching high and low for a decent plugin example that deals with all the newer file systems in version 2.8, I will keep up with your information, thanks

  • Tai
    July 26th

    Thank you for the very useful template!
    BTW, files in v2 seem same as v1's.

  • Fire G
    July 26th

    @Tai: They may appear so, but in V2 there's more security and a new way of including files into the plugin.

  • Tai
    July 26th

    Thank you, Fire G.
    But I tried "diff wp-plugin-templates/ wp-plugin-templates-v2/", and it output nothing. So could you check into v2.zip just in case?

  • Fire G
    July 26th

    @Tai: You were right. I've fixed the Zip, don't know how it got like that though, it was right when I posted... Thanks though.

  • Tai
    July 26th

    Thanks again Fire G., for quick responses and the template!
    I really appreciate it!

  • SmashingWebsites
    January 22nd

    Way cool! "Features" plugin directory is excellent idea. Under what license can we use this? Thanks!

  • Fire G
    January 22nd

    @SmashingWebsites: Thanks. It's free for anyone to use or modify.

Leave a Reply