[wp-trac] [WordPress Trac] #47686: Always flush rewrite rules when active plugins changes & on plugin upgrades

WordPress Trac noreply at wordpress.org
Thu Jul 11 21:52:43 UTC 2019


#47686: Always flush rewrite rules when active plugins changes & on plugin upgrades
-----------------------------+------------------------------
 Reporter:  johnjamesjacoby  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by johnjamesjacoby):

 Thinking out loud, one approach could be to store a shadow option of what
 the rewrite rules ''were'' and what WordPress thinks they ''are'' after an
 environment change (theme or plugin change, etc...) compare the two, and
 then WordPress will internally always flush when they are different (a lot
 like how `$wp_query` and `$wp_the_query` comparisons work.)

 Page load to page load, like @Ipstenu said, rewrite rules are unlikely to
 require a flush. But... it is common for plugins to both overflush and
 forget to flush. The above idea would basically make it a non-issue, and
 nobody would ever need to call it themselves directly ever - WordPress
 would just know. Theoretically.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47686#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list