Joel-James/404-to-301

Make integration with 3rd parties plugins easier

Chouby opened this issue · 2 comments

Here is the context. I am the author of Polylang and a customer wants a redirection to the page in the correct language. 404 to 301 allows to setup one page in its settings. Polylang should be able to correctly translate this page by filtering the relevant option.

First issue: 404 to 301 loads its options before the action 'plugins_loaded' is fired, making it impossible for any plugin to filter it (to replace the value of the 'redirect_page' by the translated page id). It would be nice to take no action before the action 'plugins_loaded'. More here.

Second issue: I did not find an easy way to easily access object to modify the gnrl_options property of the class _404_To_301_Public. This makes it very difficult to access the public properties/methods or to remove actions/filters. It would be nice to allow an easy access to the objects.

Will work on it.

@Chouby I have completely rewritten the plugin. Could you please check this and give your feedback - https://github.com/DuckDev/404-to-301