diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index c16974b444..708620781a 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1942,9 +1942,10 @@ class WP_Rewrite { */ function set_permalink_structure($permalink_structure) { if ( $permalink_structure != $this->permalink_structure ) { + $old_permalink_structure = $this->permalink_structure; update_option('permalink_structure', $permalink_structure); $this->init(); - do_action('permalink_structure_changed', $this->permalink_structure, $permalink_structure); + do_action('permalink_structure_changed', $old_permalink_structure, $permalink_structure); } }