#18797 closed enhancement (wontfix)

Rename restore_current_blog() to restore_previous_blog()

Reported by: Viper007Bond Owned by:
Priority: lowest Milestone:
Component: Multisite Version: 3.3
Severity: minor Keywords:
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)

Related and sort of a dupe of #14418

  • 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.