Opened 15 years ago
Closed 14 years ago
#18797 closed enhancement (wontfix)
Rename restore_current_blog() to restore_previous_blog()
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | lowest | |
| Severity: | minor | Version: | 3.3 |
| Component: | Multisite | Keywords: | |
| Focuses: | Cc: |
Description
Contrary to it's name, restore_current_blog() does not restore the current blog but rather the previous blog. If you call switch_to_blog() twice and then call restore_current_blog(), then you won't end up with the original blog but rather with the blog after switch_to_blog() was called the first time.
For clarity's sake, I suggest we rename restore_current_blog() to restore_previous_blog() and create a deprecated wrapped for it called restore_current_blog().
At the very least the PHPdoc should be updated to explain this.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Related and sort of a dupe of #14418