Changing the_content filter priority in plugins
Many plugins I use add a the_content filter without specifying a priority. Normally this is fine, since it doesn’t matter what order the filters are run in. Occasionally though, it does. The priority parameter solves this problem, but even more occasionally, the priority specified by the plugin author doesn’t work for me; either because it conflicts with the priority specified in another plugin, or because I just need the filters to be run in a different order to that envisaged by the plugin author.
I can work around this by hacking the priority parameter in the plugin code, but this causes my site to break unexpectedly every time the plugin is updated by the author. Usually I forget that I’ve hacked the parameter, and go ahead with an automatic upgrade that causes some subtle breakage that I then need to track down.
Is there a better way? I’d love to see a plugin that allows the_content filter priorities to be manipulated, probably by ignoring or replacing the priority parameter passed in the calls to add_filter. Anyone know of such a thing?
- The topic ‘Changing the_content filter priority in plugins’ is closed to new replies.