WordPress.org

Ready to get started?Download WordPress

Forums

Changing the_content filter priority in plugins (2 posts)

  1. Graham Stoney
    Member
    Posted 2 years ago #

    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?

    Thanks,
    Graham

  2. ewdrobert
    Member
    Posted 1 year ago #

    I am interested in knowing the solution for this. It could be frustrating experience to have some other output show up before the output you really desire. So if anyone has a solution to this, it would be greatly appreciated.

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic