Two of my plugins use the same filter hook: the_content. What happens in this case? Is there a priority handler, like which plugin will be served first?

I would like to use both of the plugins. I need to call one plugin first and then the second plugin will add more content onto the end of the first plugin.

What is the best approach to accomplish this? Or am I doing something wrong here?


There is priority as explained in the codex:

add_filter ( 'hook_name', 'your_filter', [priority], [accepted_args] );

Lower numbers are executed first, the default is 10.

If you have multiple functions at the same priority, they are run in the order in which they were added to the filter.

| improve this answer | |
  • Is there a way to find out the order in which they are added to the filter? Another thing, is there any problem with my approach? – sakibmoon Jan 14 '14 at 21:06
  • 1
    This question tells you how to print out which filters are added. And it sounds to me like your plan will work. – hornj Jan 14 '14 at 21:18

Your Answer

