<?php
function ms_upload_constants() {
add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
if ( ! get_site_option( 'ms_files_rewriting' ) ) {
return;
}
if ( ! defined( 'UPLOADBLOGSDIR' ) ) {
define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' );
}
if ( ! defined( 'UPLOADS' ) ) {
$site_id = get_current_blog_id();
define( 'UPLOADS', UPLOADBLOGSDIR . '/' . $site_id . '/files/' );
if ( 'wp-content/blogs.dir' === UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) ) {
define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . '/blogs.dir/' . $site_id . '/files/' );
}
}
}