[wp-hackers] Plugin Management issue...

Stephen O'Connor steve at stevarino.com
Tue Jun 29 08:43:02 UTC 2004


Yes, you are probably right... I doubt include/require_once make use of the
most efficient methods for execution.

However I am slightly alarmed to the sudden conclusion that WP's code must
be modified. When you alter the behavior of previously established functions
(such as plugin filenames and their loading order) you upset other plugin
authors work. I have to ask the question of whether this is a problem with
WordPress or a plugin's code? Which need to be corrected?

Other solutions include checking if functions have been declared using
function_exists(), parsing the array returned by get_included_files, or
modyfying the included order through the activated_plugins database option
field.

If WP must be modified to support this, at least make it backward compatible
by opting with Joe's solution. Create a new plugin header called
"plugin-family" or maybe just "family" for short. It could declare the
loading order of plugins with a special character representing the current
plugin (tilde "~" comes to mind).

Plugin: c.php
Author: Bob
Family: a.php; b.php; ~

Of course now we can create our own version of dll-hell:

Plugin: a.php
Author: Evil Bob
Family: c.php; ~; b.php

A simple function could solve those conflicts though. :)

Again though, let me stress that I wish the devs wouldn't be so quick to
begin discussing the alteration of existing WP functionality. I love how
much you guys help us, but WP has become so large that you cannot help one
group of authors without getting in the way of others. The plugin that I've
been working on for the last month has recently taken advantage of the
seemingly "random" nature of included plugins. If the devs modified that
behaviour it would either force my plugin to conflict with WP, or cause me
to remove that functionality and feature, something which would really hurt
my plugin.

Your Faithful Devil's Advocate,
- Stephen

> -----Original Message-----
> From: hackers-bounces at wordpress.org
> [mailto:hackers-bounces at wordpress.org]On Behalf Of Alex King
> Sent: Tuesday, June 29, 2004 4:04 AM
> To: hackers at wordpress.org
> Subject: Re: [wp-hackers] Plugin Management issue...
>
>
> That won't necessarily work because the files aren't all
> include/require_once()'ed later in the code. Matt had some numbers that
> showed this was slower at one point. Matt, did you ever run metrics on
> this again?
>
> --Alex
>
> http://www.alexking.org/
>
>
> On Jul 29, 2004, at 1:56 AM, Stephen O'Connor wrote:
>
> > David: it sounds like you need to check out the get_included_files and
> > include_once methods. Perhaps all your dependent plugins could an
> > include_once to their required files. If the WP plugin-include method
> > or
> > another dependant plugin called the file you need first, no sweat
> > 'cause php
> > will skip it.
>
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>




More information about the hackers mailing list