• I’m working on making a plugin compatible with Multisite. Currently the plugin adds a rewrite endpoint and runs flush_rewrite_rules( false ) on activation.

    This only flushes the rules for the primary site. I have successfully added the endpoint and flushed the rules for new sites created by hooking on to the wpmu_new_blog hook.

    I was thinking of looping through all the sites on network activation and deleting the rewrite_rules option, but I don’t think this is the best way. I already tried calling flush_rewrite_rules( false ) within the loop, but it doesn’t seem to be foolproof.

    Is there a better way, or best practice for doing this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Flushing rewrite rules on plugin network activation’ is closed to new replies.