fix_import_form_size() WordPress Function

The fix_import_form_size() WordPress function is used to improve the usability of the WordPress import form by increasing the size of the form fields. This is especially useful for sites with large import files.

fix_import_form_size( int $size ) #

Get the remaining upload space for this site.


Parameters

$size

(int)(Required)Current max size in bytes


Top ↑

Return

(int) Max size in bytes


Top ↑

Source

File: wp-admin/includes/ms.php

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


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.