Make WordPress Core

Changeset 34028


Ignore:
Timestamp:
09/10/2015 11:49:14 PM (10 years ago)
Author:
jorbin
Message:

Flush rewrite rules upon theme switch

Themes can ( and do ) but shouldn't include custom rewrite rules.This can lead to hard to debug issues for theme authors. Theme changes are not a ultra common conclusion. Flushing the rewrite rules on theme switch will lead to a clean slate for each theme which helps make debugging easier.

And @nacin said we should do this 5 years ago at WordCamp Mid Atlantic.

Fixes #14849

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r33815 r34028  
    18891889            do_action( 'after_switch_theme', $stylesheet );
    18901890        }
     1891        flush_rewrite_rules();
    18911892
    18921893        update_option( 'theme_switched', false );
Note: See TracChangeset for help on using the changeset viewer.