[wp-hackers] Modifying admin forms via plugins

Jason goldsmith unteins at gmail.com
Tue Jun 22 23:23:57 UTC 2004


It gets very ugly to try to keep a plugin in a single file. I have
been asked by users of the Live Journal plugins to make it into a
single plugin with an interface to turn on and off individual
features.

Trying to maintain all of that in one php file would be difficult.
Besides, I need at least a second php file to handle configuration so
that I can have a configuration editor. I plan to only have one file
in the wp-content/plugins directory with a subfolder containing the
other files.

If plugins.php only calls the the registered plugin file, it isn't the
end of the world, I can always user header to redirect, but it seems
silly to force plugin writers to do that or to have a big block of
code surrounded by an if statement to check if the plugin file is
being called via the plugins.php page or it is being called by another
page and therefore needs to execute.

On Tue, 22 Jun 2004 18:14:24 -0500, Matt Mullenweg <m at mullenweg.com> wrote:
> 
> Jason goldsmith wrote:
> > I DID read it more closely.....
> >
> > Let's say I have a plugin called bob.php, I don't want the plugin
> > interface to FORCE me to put admin interface code in bob.php, I want
> > the plugin interface to call ed.php which be my admin GUI
> 
> It'd be best to keep plugins as self-contained as possible. On the
> plugin's pages (under the Plugins tab) we can set a variable like $admin =
> true and then you can put all the forms, instructions, or whatever you
> want on that page in a conditional.
> 
> --
> Matt Mullenweg
>   http://photomatt.net | http://wordpress.org
> http://pingomatic.com | more soon...
> 
> 
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>



More information about the hackers mailing list