fix_import_form_size()WP 3.0.0

Gets the remaining upload space for this site.

No Hooks.

Return

Int. Max size in bytes.

Usage

fix_import_form_size( $size );
$size(int) (required)
Current max size in bytes.

Changelog

Since 3.0.0 Introduced.

fix_import_form_size() code WP 6.5.4

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