[wp-hackers] Admin menu hook

Ryan Boren ryan at boren.nu
Thu Nov 25 06:45:30 UTC 2004


On Thu, 2004-11-25 at 01:11 -0500, Mark Jaquith wrote:
> I know some plugins that use subfolders in /plugins/ for files that
> were NOT meant to be auto-loaded, so this might not be the best
> approach.

Only activated plugins are auto-loaded.  Place the following in a file
in wp-content/plugins.

<?php
echo "hello world";
?>

Does the file show up in the plugin manager?  Is it autoloaded?  It
shouldn't be.

Has anyone beside Owen used the new admin hooks?  Just curious.  This
stuff is already solved.  The only new thing I'm suggesting is to allow
files living in subdirs of wp-content/plugins to be treated as plugins
if they possess the appropriate header.  This way a plugin can put its
plugin file, its admin pages, and its supporting include files all in
one directory.  The admin pages will get the benefit of the admin.php
bootstrap.  This sets up the admin environment and outputs the admin
header and footer, complete with the menus all ready to go.  You just
stick the stuff in the middle.

Ryan





More information about the hackers mailing list