[wp-trac] [WordPress Trac] #22351: Action "permalink_structure_changed" passes new permalink_structure for old and new permalink_structure value

WordPress Trac noreply at wordpress.org
Sat Nov 3 00:19:20 UTC 2012


#22351: Action "permalink_structure_changed" passes new permalink_structure for old
and new permalink_structure value
-------------------------------------+--------------------------
 Reporter:  doublesharp              |       Type:  defect (bug)
   Status:  new                      |   Priority:  normal
Milestone:  Awaiting Review          |  Component:  Permalinks
  Version:  trunk                    |   Severity:  normal
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------------
 Per the function PHPDoc, the set_permalink_structure() method in /wp-
 includes/rewrite.php should fire the 'permalink_structure_changed' with
 the old and new permalink structure after the new structure is saved:

 ''* Fires the 'permalink_structure_changed' action once the init call has
 * processed passing the old and new values''

 It is currently passing $this->permalink_structure as the "old" structure
 value, however as this value is updated by the call to $this->init() the
 result is that the new structure is passed instead of the old structure.

 Suggested patch would copy $this->permalink_structure before the call to
 $this->init() and pass the copy as the old permalink structure.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22351>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list