[wp-hackers] Writing plugins with classes
abrazell at b5media.com
Sat Feb 24 23:10:06 GMT 2007
On Feb 24, 2007, at 5:58 PM, Jamie Talbot wrote:
> I remember similar problems when I began writing plugins. There
> was a way round it, which I used in
> X-Valid , but that was last edited a year ago, so things might
> possibly have changed since then.
> The solution I use now is to have all the guts of the plugin in a
> class, but use a separate file
> for each admin page, like for Gengo . This avoids your problem
> altogether, means the admin page
> code isn't being loaded for every site view and means you didn't
> just have a single massive
> monolithic file to edit, which can be a nightmare when you have
> more than one simple page.
I suppose that would work too but since this plugin really is
complicated enough to justify a class, but not so complicated that it
requires lots of additional files, I want to stick with the single
file and inside the class. I'm 99% sure I can do this so unless
someone flat out tells me it can't be done, I'll still be looking for
how to get it done my way. Not that your way is wrong - just that I
don't prefer it in this case...
Technology Manager, b5media
"A Global New Media Company"
web:: www.b5media.com, www.technosailor.com
More information about the wp-hackers