views:

30

answers:

1

Hi Stackoverflowers,

I am writing a Wordpress plugin that does string processing whenever 'the_author' filter event is fired. Obviously, there are more plugins that might respond to this event. I know that you can set the priority of your plugin but for example the Disqus plugin is called before my plugin even when I set my priority to 0. (I don't know if negative values are accepted).

The Wordpress Codex says about the $priority: "functions with the same priority are executed in the order in which they were added to the action".

So my question is, how can I make sure that my plugin is added first to the action? Does this depend on the name of the plugin?

+1  A: 

Negative values are accepted. Just use something like:

add_filter('the_author','my_function',-1000000);
nickohrn
Thanks! simple and quick solution :)
DrDee