Ability to disable redirect_canonical() not properly restored
-
Due to what appears to be some kind of WPML conflict, your plugin calls:
remove_action('template_redirect', 'redirect_canonical');
You subsequently re-enable it, but you do that by explicitly calling
redirect_canonical()
.This means that anyone else who was disabling canonical redirects using the same call to
remove_action
that you just used will be ignored and those redirects will happen anyway.You should be able to hook in before WordPress’s default calls to
redirect_canonical
and do what you need to do (looks like setting some$_SERVER
variables) without turning the action off and back on. This would preserve anyone else’s ability to disable canonical redirects entirely, if they so choose.Same thing for wp_old_slug_redirect.
- The topic ‘Ability to disable redirect_canonical() not properly restored’ is closed to new replies.