I just installed a Polylang plugin on my multi-site and noticed that all links to all of my pages got broken. For example, before activating the plugin I could access my sample-page at http://example.com/sample-page/. Once Polylang was activated, the same URL resulted in an infinite loop redirect.
While trying to investigate this issue, I eventually discovered that the problem was caused by Fundraising plugin flushing rewrite rules as part of the constructor, defined in
fundraiser.php. This seems to happen on every page load, and contrary to WP recommendation:
Because this function (
flush_rules) can be extremely costly in terms of performance, it should be used as sparingly as possible - such as during activation or deactivation of plugins or themes. Every attempt should be made to avoid using it in hooks that execute on each page load, such as init.
Now, my question is, how required is that
flush_rewrite()?? Would anything break if I simply disable it?? Alternatively, if the flush is required, may I suggest delaying it until all themes and plugins are loaded (
add_action( 'wp_loaded', array(&$this, 'flush_rewrite'), 999 );). Thus, preventing conflict with Polylang.
Hope you find this useful,