#22351 closed defect (bug) (fixed)
Action "permalink_structure_changed" passes new permalink_structure for old and new permalink_structure value
| Reported by: | doublesharp | Owned by: | duck_ |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Permalinks | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch needs-testing dev-feedback |
| Cc: | Focuses: |
Description
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
fixes "permalink_structure_changed" action