Title: Code Updates
Last modified: August 22, 2016

---

# Code Updates

 *  Resolved [sethererm](https://wordpress.org/support/users/sethererm/)
 * (@sethererm)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/code-updates-1/)
 * Hello,
    There were just a few ticks that were bugging me about this plugin, so
   I went in and got the functionality to perform like I wanted.
 * When on the list of sites location, there is the hyperlink Copy. Whenever I clicked
   on it, it didn’t update the dropdown menu with the site I wanted to copy, but
   would leave it as the top most domain.
 * I updated the code in blog-copier.php on line 102
    `$from_blog_id = ( isset( 
   $_POST['source_blog'] ) ) ? (int) $_POST['source_blog'] : -1;` to be as follows:
 *     ```
       if ( isset( $_POST['source_blog'] ) ) {
       	$from_blog_id = (int) $_POST['source_blog'];
       } elseif ( isset( $_GET['blog'] ) ) {
       	$from_blog_id = (int) $_GET['blog'];
       } else {
       	$from_blog_id = -1;
       }
       ```
   
 * That solved that quirk.
 * The other issue I had is when I would copy the site, and click on the hyperlink
   of the site that was generated, it would take me to the parent based blog, which
   I didn’t like.
 * I updated line 252 from:
    `$msg = sprintf(__( 'Copied: %s in %s seconds', $this-
   >_domain ),'<a href="http://'.$newdomain.'" target="_blank">'.$title.'</a>', 
   number_format_i18n(timer_stop()));` to be: `$msg = sprintf(__( 'Copied: %s in%
   s seconds', $this->_domain ),'<a href="http://'.$newdomain.$path.'" target="_blank"
   >'.$title.'</a>', number_format_i18n(timer_stop()));`
 * Which took care of that issue. Hopefully this will help someone else fix that
   problem if they are annoyed by it.
 * Have a great day!
    Seth
 * [https://wordpress.org/plugins/blog-copier/](https://wordpress.org/plugins/blog-copier/)

The topic ‘Code Updates’ is closed to new replies.

 * ![](https://ps.w.org/blog-copier/assets/icon-256x256.png?rev=985730)
 * [Blog Copier](https://wordpress.org/plugins/blog-copier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/blog-copier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/blog-copier/)
 * [Active Topics](https://wordpress.org/support/plugin/blog-copier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/blog-copier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/blog-copier/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sethererm](https://wordpress.org/support/users/sethererm/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/code-updates-1/)
 * Status: resolved