WordPress.org

Make WordPress Core

Ticket #14418: restore_original_blog.patch

File restore_original_blog.patch, 538 bytes (added by deepak.seth, 3 years ago)
  • wp-includes/ms-blogs.php

     
    514514        return true; 
    515515} 
    516516 
     517function restore_original_blog($steps=0) { 
     518        global $switched; 
     519        $steps==0 ? $_temp=-1 : $_temp=0; //temp variable for checking steps. 
     520        while ( $switched && $_temp!=$steps) 
     521                {        
     522                        restore_current_blog(); 
     523                        $_temp++; 
     524                } 
     525        } 
    517526/** 
    518527 * Restore the current blog, after calling switch_to_blog() 
    519528 *