From 86d88f8b2dee0dcf9a19ee909414416bdf81f4c9 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: http://core.svn.wordpress.org/trunk@22398 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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); } }