[wp-trac] [WordPress Trac] #25650: When switching between blogs, wp_upload_dir 'baseurl' and 'url' may be pointing to the current blog not the switched one

WordPress Trac noreply at wordpress.org
Tue Jan 13 02:00:11 UTC 2015


#25650: When switching between blogs, wp_upload_dir 'baseurl' and 'url' may be
pointing to the current blog not the switched one
--------------------------+------------------------------
 Reporter:  igmoweb       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Upload        |     Version:  3.6.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+------------------------------

Comment (by flynsarmy):

 Here's a workaround I'm using until this is fixed:

 {{{
 add_action('switch_blog', function($new_blog, $prev_blog_id) {
         update_option( 'upload_url_path',  get_option('siteurl') . '/wp-
 content/uploads');
 }, 10, 2);
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25650#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list