WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#18797 closed enhancement (wontfix)

Rename restore_current_blog() to restore_previous_blog()

Reported by: Viper007Bond 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)

comment:1 @Viper007Bond4 years ago

Related and sort of a dupe of #14418

comment:2 @Viper007Bond3 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

<nacin> Viper007Bond: not really worth it, given its age

The Nacin speaks.

Note: See TracTickets for help on using tickets.