Merge mu_upload_dir() into wp_upload_dir(). see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
66c2878bcd
commit
a56f033751
@ -2062,6 +2062,9 @@ function wp_upload_dir( $time = null ) {
|
|||||||
$url = trailingslashit( $siteurl ) . UPLOADS;
|
$url = trailingslashit( $siteurl ) . UPLOADS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( is_multisite() && defined( 'BLOGUPLOADDIR' ) )
|
||||||
|
$dir = untrailingslashit(BLOGUPLOADDIR);
|
||||||
|
|
||||||
$bdir = $dir;
|
$bdir = $dir;
|
||||||
$burl = $url;
|
$burl = $url;
|
||||||
|
|
||||||
|
@ -1998,17 +1998,6 @@ function lowercase_username( $username, $raw_username, $strict ) {
|
|||||||
}
|
}
|
||||||
add_filter( 'sanitize_user', 'lowercase_username', 10, 3 );
|
add_filter( 'sanitize_user', 'lowercase_username', 10, 3 );
|
||||||
|
|
||||||
function mu_upload_dir( $uploads ) {
|
|
||||||
$dir = $uploads[ 'basedir' ];
|
|
||||||
if ( defined( 'BLOGUPLOADDIR' ) )
|
|
||||||
$dir = constant( 'BLOGUPLOADDIR' );
|
|
||||||
$dir = untrailingslashit( $dir ) . $uploads[ 'subdir' ];
|
|
||||||
$uploads[ 'path' ] = $dir;
|
|
||||||
|
|
||||||
return $uploads;
|
|
||||||
}
|
|
||||||
add_filter( 'upload_dir', 'mu_upload_dir' );
|
|
||||||
|
|
||||||
function users_can_register_signup_filter() {
|
function users_can_register_signup_filter() {
|
||||||
$registration = get_site_option('registration');
|
$registration = get_site_option('registration');
|
||||||
if ( $registration == 'all' || $registration == 'user' )
|
if ( $registration == 'all' || $registration == 'user' )
|
||||||
|
Loading…
Reference in New Issue
Block a user