From 65f6490ecac017b96d73a645affc02d93b8702dc Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Tue, 6 Nov 2012 12:41:33 +0000 Subject: [PATCH] Actually pass old permalink structure with permalink_structure_changed action Props doublesharp. Fixes #22351. git-svn-id: https://develop.svn.wordpress.org/trunk@22398 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/rewrite.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } }