fix_import_form_size( int $size ): int

In this article

Gets the remaining upload space for this site.

Parameters

$sizeintrequired
Current max size in bytes.

Return

int Max size in bytes.

Source

function fix_import_form_size( $size ) {
	if ( upload_is_user_over_quota( false ) ) {
		return 0;
	}
	$available = get_upload_space_available();
	return min( $size, $available );
}

Changelog

VersionDescription
MU (3.0.0)Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.