fix_import_form_size

Definition:
function fix_import_form_size( $size ) {}

Get the remaining upload space for this blog.

Parameters

  • int $size

Source code

function fix_import_form_size( $size ) {

	if ( upload_is_user_over_quota( false ) == true )

		return 0;



	$spaceAllowed = 1024 * 1024 * get_space_allowed();

	$dirsize = get_dirsize( BLOGUPLOADDIR );

	if ( $size > $spaceAllowed - $dirsize )

		return $spaceAllowed - $dirsize; // remaining space

	else

		return $size; // default

}

1074

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: