[wp-hackers] Plugin main file name

Stephen Rider wp-hackers at striderweb.com
Sat Aug 23 23:16:58 GMT 2008


On Aug 23, 2008, at 2:48 PM, Ozh wrote:

> On Sat, Aug 23, 2008 at 4:10 PM, Stephen Rider
> <wp-hackers at striderweb.com> wrote:
>> myplugin/plugin_main.php
>> anotherplugin/plugin_main.php
>> thirdplugin/plugin_main.php
>
> Make everything in plugin_main.php within a "if
> (!class_exists('strider_main')) class strider_main{}", and whenever
> you update this file, update all your plugins that use it
>
> I find this a better solution than rmarsh' plugin library: you get one
> of his plugins, try to run it and, oops, no, can't work, you need to
> download an extra file. Clunky.

The funny thing is, Ozh isn't answering the question i waas asking,r  
eally, but he was answering the question I ended up wanting to ask.

What I was originally talking about was not a "core" class, but that  
different plugins would have the same filename.  That is, myplugin/ 
plugin_main.php IS the myplugin file; anotherplugin/plugin_main.php IS  
the anotherplugin file.  Same file name, different directories.

I was originally asking if that was a bad idea.  It's a moot point  
now, because I turned to the "extend class" method instead of the file  
inclusions I was originally trying out....

Stephen

-- 
Stephen Rider
<http://striderweb.com/>





More information about the wp-hackers mailing list