allow existing media path on main site when converting to multisite, see #12549
git-svn-id: http://svn.automattic.com/wordpress/trunk@13619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6b18130fb2
commit
a7011c50ca
|
@ -726,6 +726,10 @@ Thanks!
|
|||
$blog_id = $wpdb->insert_id;
|
||||
update_user_meta( $site_user->ID, 'source_domain', $domain );
|
||||
update_user_meta( $site_user->ID, 'primary_blog', $blog_id );
|
||||
if ( !$upload_path = get_option( 'upload_path' ) ) {
|
||||
$upload_path = substr( WP_CONTENT_DIR, strlen( ABSPATH ) ) . '/uploads';
|
||||
update_option( 'upload_path', $upload_path );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $vhost == 'yes' )
|
||||
|
|
|
@ -2131,7 +2131,7 @@ function wp_upload_dir( $time = null ) {
|
|||
$url = trailingslashit( $siteurl ) . $upload_path;
|
||||
}
|
||||
|
||||
if ( defined('UPLOADS') ) {
|
||||
if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
|
||||
$dir = ABSPATH . UPLOADS;
|
||||
$url = trailingslashit( $siteurl ) . UPLOADS;
|
||||
}
|
||||
|
@ -4077,4 +4077,4 @@ function __return_true() {
|
|||
function __return_false() {
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue