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
This commit is contained in:
Jon Cave 2012-11-06 12:41:33 +00:00
parent f70612501d
commit 65f6490eca
1 changed files with 2 additions and 1 deletions

View File

@ -1942,9 +1942,10 @@ class WP_Rewrite {
*/ */
function set_permalink_structure($permalink_structure) { function set_permalink_structure($permalink_structure) {
if ( $permalink_structure != $this->permalink_structure ) { if ( $permalink_structure != $this->permalink_structure ) {
$old_permalink_structure = $this->permalink_structure;
update_option('permalink_structure', $permalink_structure); update_option('permalink_structure', $permalink_structure);
$this->init(); $this->init();
do_action('permalink_structure_changed', $this->permalink_structure, $permalink_structure); do_action('permalink_structure_changed', $old_permalink_structure, $permalink_structure);
} }
} }