Fire Studios

Archive

Contact

Categories

  • Coding
    • CSS
    • HTML/Javascript
    • PHP
  • Design
  • Freebies
  • General
  • Internet
  • Interviews
  • Plugins
  • Podcasts
  • Reviews
  • Screencasts
  • Tutorial
  • Weekday Tips
  • Wordpress

Podcast

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

Reader's Thoughts

  • BobMarche

    Thanks for the useful info. It's so interesting

  • Flex Guy

    very nice article…keep on the good work

  • Tim

    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

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

  • Fire G

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

  • Tai

    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

    @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

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

  • SmashingWebsites

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

  • Fire G

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

Your Thoughts?

 

This is that small text that tells you not to steal our stuff, but we don't really care too much.