[wp-hackers] Admin menu hook

Ryan Boren ryan at boren.nu
Thu Nov 25 06:27:12 UTC 2004


On Wed, 2004-11-24 at 22:58 -0700, Kitty wrote:
> On Wed, 2004-11-24 at 21:58, Ryan Boren wrote:
> > A folder under plugins would make for a single install location if we
> > allow plugins to be loaded from directories under wp-content/plugins?
> > Plugins that supply multiple files can install to a subdir, like themes
> > do.  Only those files that contain a plugin header would show up in the
> > plugin manager.  With everything under plugins/, all files could benefit
> > from the admin.php bootstrap.
> 
> Interesting. but but then we'd wind up loading the extra files and
> polluting global space (even if only the actual plugin file showed in
> plugins.php). I've tried to keep as much as possible out of global space
> in my stuff. I think the loading of the plugin file from plugins/ and
> the rest from it's own directory is the saner choice.
> 
> I like wp-content/ because it's out of the way, and other subdirs are
> already there. I've also settled on having my include files there too,
> so that they're only loaded when one of my admin pages is showing.
> Another anti-global space thing. I'd hate to have "large" code slowing
> down the whole admin interface.

None of these files will be loaded automatically.  Only files containing
a plugin header that are activated will be loaded.  Other files are
loaded only when directly called.  This is the way it already works, we
just don't allow a subdir under plugins.

Ryan




More information about the hackers mailing list