rewrite->flush() needlessly deletes the rewrite_rules option
|Reported by:||Denis-de-Bernardy||Owned by:|
All sorts of cache-related plugins hook into the update_option_rewrite_rules and force-flush whatever they're caching when rewrite_rules are updated.
When a page is saved, WP_Rewrite::flush() mindlessly deletes the rewrite_rule option, triggering all sorts of cache flushing that may or may not be necessary.
The attached patch keeps the rewrite_rules option intact when a soft refresh occurs.
- non-verbose rules used, page changes parent: no refresh
- verbose rules used, page changes parent: refresh
Dunno what else needs to be testing...