Codex tools: Log in
Restores previous blog after a switch_to_blog call.
Contrary to the function's name, this does NOT restore the original blog but the previous blog. Calling `switch_to_blog()` twice in a row and then calling this function will result in being on the blog set by the first `switch_to_blog()` call.
<?php restore_current_blog(); ?>
echo 'You switched from blog ' . $switched . ' to 7';
echo 'You switched back.';
Restore current blog should only be called after switch_to_blog.