MS: Delete rewrite_rules
when updating a switched site's URL.
Previously, rewrite rules could be flushed and regenerated in the context of another site. Deleting the rules when in a switched state allows for them to be generated properly on the next page view. Fixes #33816. git-svn-id: https://develop.svn.wordpress.org/trunk@34672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
94f596278c
commit
bf4846985f
@ -246,8 +246,11 @@ function update_home_siteurl( $old_value, $value ) {
|
||||
if ( defined( "WP_INSTALLING" ) )
|
||||
return;
|
||||
|
||||
// If home changed, write rewrite rules to new location.
|
||||
flush_rewrite_rules();
|
||||
if ( is_multisite() && ms_is_switched() ) {
|
||||
delete_option( 'rewrite_rules' );
|
||||
} else {
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user