gwycon.com
Silverlight, WPF and C# .NET development
User NamePassword

6
Mar

It has been an enjoyable experience delving into the inner workings of WordPress of late. And it has been during the development of one of our recent projects, the ‘WP Content Filter’, our first WordPress Plugin by the way :) , that we have come across some unanticipated subtleties.

For instance, any WordPress Plugin is free to access hooks that are exposed by the core WordPress code. Well, this is the whole point isn’t it? To be able to customise the functionality of your blog site over the default WordPress installation.

However, what happens when two Plugins access the same filter hook to, say, do some custom formatting of post comments. If there is an overlap in two (or more) Plugins functionality then it is likely they will all want to access a common WordPress Plugin hook. In this case which one is run first? Is there anyway to force you Plugins code to run before (or after) any others? Would that even be ethical. Or, is it completely ambiguous and decided by the Plugin attributes (such as the order that Plugins were installed on your WordPress blog).

As far as I am aware there are no hooks exposed by WordPress to control this. Perhaps more unpredictable is the behaviour resulting from action Plugin hooks. Plugin code running on a WordPress ‘event’ for more than one Plugin could have very strange results, and the likely culprit for conflicts between Plugins.

Perhaps in the future of WordPress there could be some way to allow the user of Plugins (i.e. site administrators) to be able to set which Plugins have priority over other Plugins. This could be handled in two ways: continue

Category : WordPress Plugins | Blog