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
This commit is contained in:
Jon Cave 2012-11-06 12:41:33 +00:00
parent 349afb3c4f
commit 86d88f8b2d

View File

@ -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);
}
}