-
Notifications
You must be signed in to change notification settings - Fork 382
Description
Currently the rewrite rules get flushed at the register_activation_hook(). This works fine for single-site installs. However, it does not work on multisite. For multisite users, they then have to hit the permalinks admin screen for every site in order to flush the rewrite rules. For large networks, this is not feasible. So the plugin should probably do more dynamic checking at runtime if all the rewrite rules are present, and if not, flush them for a given site. This could avoid having to flush rewrite rules after adding support for a custom post type as well.
For more, see https://jeremyfelt.com/2015/07/17/flushing-rewrite-rules-in-wordpress-multisite-for-fun-and-profit/
Aside: When adding support for pages (#176), the AMP version will probably require using the query param /?amp instead of the path /amp/ endpoint, for the sake of the page rewrite rules. Since AMP cache does not reveal the full URL anyway, having pretty permalinks is somewhat pointless. We couldn't just remove the endpoint, however, without additional work to fix 404s to redirect from /amp/ to /?amp.