Flushing rewrite rules on plugin network activation
-
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_bloghook.I was thinking of looping through all the sites on network activation and deleting the
rewrite_rulesoption, but I don’t think this is the best way. I already tried callingflush_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?
The topic ‘Flushing rewrite rules on plugin network activation’ is closed to new replies.