WordPress 4.7+ support
tripflex opened this issue · comments
FYI this will break in WordPress 4.7:
https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/
I wrote one a while back, and i've updated my gist to work with 4.7+ and still maintain backwards compatibility:
https://gist.github.com/tripflex/c6518efc1753cf2392559866b4bd1a53
Another good (and maybe simpler) way to do the same thing is shown and explained here:
It uses the name created by _wp_filter_build_unique_id()
along with the built-in remove_filter
function.