Wordpress Plugin Template

Fellow Wordpress enthusiasts,
I have written several Wordpress plugins for a client over the last few weeks. Through these, I have gained some techniques for creating widgets which work as non-widgets, and also have their own options pages. With this newfound knowledge, I have created a generic plugin template. It includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as <!-- someplugin -->). The template is full of comments, so you shouldn’t have trouble figuring it out. You can download it here: Wordpress Plugin Template

15 Comments

  1. does this work on pages like blogspot pages?

  2. Dan,
    This is totally different from the blogger idea of a template.

  3. […] Wordpress Plugin Template (tags: wordpress plugin) […]

  4. Trevor, you have commented out the portion declaring $pluginpath.

    Please check and confirm.

  5. […] Wordpress Plugin Template includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as ) […]

  6. ovizii

    hello,

    I would be interested in something different, but still similar :-)
    I have several plugins that are not widgetized and as I am using wpmu not wp, meaning I don’t want to give users access to widgets that allow execution of php, I would love to find a widget template, where I could lets say insert the php code that should be executed in the sidebar (aka hardcoded) so I could make a widget for all those widgetless plugins…

    I hope you understand my explanations and if you could help that would be great, if not thx anyway :-)

  7. […] Trev’s Travels: …a generic plugin template. It includes all the framework necessary for a displayable plugin […]

  8. Thanks dude - I’ve been meaning to getting around to writing one for fun. This is a great starting point.

  9. […] Trev’s Travels » Blog » Wordpress Plugin Template (tags: wordpress plugin) […]

  10. ovizii

    thx for the mail but that was not really what I was looking for :-) I’ll try again:

    in my former comment I said: `I am using wpmu not wp, meaning I don’t want to give users access to widgets that allow execution of php`

    wpmu means, anybody can sign up for a blog and get his own blog. therefore I don’t want to use widgets that allows execution of php as any user could affect my whole system by executing dangerous php. Note that on the widget that executes php it says:

    `Also note that this is isn’t exactly safe, as it’s just doing an eval() on whatever you put in there, so you have complete and full access, as does anybody else who can get to your admin screen.`

    I am looking for an easy way to widgetize a plugin, lets say a certain plugin is activated and I need to put something like in my sidebar template to get its output, I’d like to be able to input/hardcode this into a “simple” widget, rename this widget to useful_function widget and make it available to my blog users so everybody can use this plugin which originally did not provide a widget.

    I hope that was more clear this time and if you want to try this for yourself, go sign up for a testblog her: http://zice.ro but please delete it when finished with tests.

    regards
    ovidiu

  11. […] hideous it’s somehow cool’ navigation on his site, Trevor Creech has built just that. A straightforward template wordpress plugin with which to build any “I have created a generic plugin template. It includes all the […]

  12. This looks like fun

    Thanks for taking the time to do this, it will help me a lot

  13. […] Wordpress Plugin Template includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as ) […]

  14. Thanks for the translator. easy to implement and so far works like gangbusters.

  15. […] Wordpress Plugin Template includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as ) […]

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>