[wp-hackers] Plugin Management issue...

Stephen O'Connor steve at stevarino.com
Tue Jun 29 07:59:15 UTC 2004


This is interesting because I faced this problem just last week. Hoewever I
think it would be a mistake for WP to follow an order. Applying rules to the
plugin order will just result in more rules for us to break when we need to,
and I would hate to see files labeled "0000000000.php". :(

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.

Jill: check out php's natsort function and it's related members. PHP has
some amazing algorithms already worked out for us. :)

- Stephen

-----Original Message-----
From: hackers-bounces at wordpress.org
[mailto:hackers-bounces at wordpress.org]On Behalf Of David Chait
Sent: Tuesday, June 29, 2004 2:15 AM
To: hackers at wordpress.org
Subject: [wp-hackers] Plugin Management issue...


I have a bunch of plugins, something like seven now, maybe eight by
tomorrow.  That is, MY own plugins... Some are interdependent, some are
optionally, some are dependent, some are completely independent... fun. ;)

When they are interdependent, or dependent, there are cases where it'd make
my life MUCH easier if I knew/controlled the loading order of things.  I had
(apparently stupidly) assumed alphabetical load-order, given that the list
is alphabetically sorted.  From my (hours) debugging the code, it looks like
it keeps a table of which ones have been activated, and that table seems to
be in timestamp-of-activation order.  Which is to say random.

I think I can overhaul some of my code, but as these things get larger and
more complex this will continue to be a bigger pain.  Is there a problem
with changing the load order to either:
- plugin-name alpha sorted, or
- plugin-filename alpha sorted?

Again, I wouldn't have even brought it up if it wasn't that I had made the
assumption from the 'presentation' of the plugins that they'd load alpha,
and had very unhappy code til I figured it out (there's something weird in
php where at certain times, if you try to include a file with an incorrect
path, php exits, throws no error itself, throws no error to a custom error
handler, and dumps a vanilla [html][body][/body][/html] blank page out...
what a PAIN).

While I'm at it, I have a 'missing hook point'... well, at least one,
probably more as I try to migrate to 1.2/1.3. ;)  My 'per-page titles' for
multipage [more] posts hooks in as part of the initial [more] parsing... so,
I either need to hand that over for inclusion into the core (fine by me!),
or need a way to hook in at that point.

-d



_______________________________________________
hackers mailing list
hackers at wordpress.org
http://wordpress.org/mailman/listinfo/hackers_wordpress.org




More information about the hackers mailing list