[wp-hackers] plugin loading order (rfc)

Sabin Iacob iacobs at m0n5t3r.info
Sun Mar 11 15:52:52 GMT 2007


ehlo list

While working on a plugin, I hit an interesting issue: there is no other 
way to alter the order in which plugins are loaded than changing the 
file name.

Does anyone else feel the need for a plugin dependency system?

Here is my idea on how to do it:
 * every supporting plugin advertises the functions it can provide and 
the functions it needs (apart from the WP core ones, which we can safely 
assume are there)
 * when building active_plugins, we take the information above into 
account.
 * also, the plugins could advertise "external" dependencies, like 
certain extensions (mbstring, curl come to mind) or functions (hosters 
usually disable some functions like the popen, system, etc.)
 * if the requirements are not fullfilled, the plugin is not activated

Linux  package managers have been working like this for ages. By doing 
it at activation time, there is no performance penalty for the normal 
site usage, and we also avoid breaking wordpress because of syntax 
errors/missing functionality.

As the subject says, this is a request for comments, I want to have a 
little design phase before getting my hands dirty :).



More information about the wp-hackers mailing list