fix_import_form_size

The timeline below displays how wordpress function fix_import_form_size has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Gets the remaining upload space for this site.
 *
 * @since MU (3.0.0)
 *
 * @param int $size Current max size in bytes.
 * @return int Max size in bytes.
 */
function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false)) {
        return 0;
    }
    $available = get_upload_space_available();
    return min($size, $available);
}

WordPress Version: 4.9

/**
 * Get the remaining upload space for this site.
 *
 * @since MU (3.0.0)
 *
 * @param int $size Current max size in bytes
 * @return int Max size in bytes
 */
function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false)) {
        return 0;
    }
    $available = get_upload_space_available();
    return min($size, $available);
}

WordPress Version: 4.5

/**
 * Get the remaining upload space for this site.
 *
 * @since MU
 *
 * @param int $size Current max size in bytes
 * @return int Max size in bytes
 */
function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false)) {
        return 0;
    }
    $available = get_upload_space_available();
    return min($size, $available);
}

WordPress Version: 4.3

/**
 * Get the remaining upload space for this blog.
 *
 * @since MU
 *
 * @param int $size Current max size in bytes
 * @return int Max size in bytes
 */
function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false)) {
        return 0;
    }
    $available = get_upload_space_available();
    return min($size, $available);
}

WordPress Version: 4.1

/**
 * Get the remaining upload space for this blog.
 *
 * @since MU
 *
 * @param int $size Current max size in bytes
 * @return int Max size in bytes
 */
function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false) == true) {
        return 0;
    }
    $available = get_upload_space_available();
    return min($size, $available);
}

WordPress Version: 3.7

/**
 * Get the remaining upload space for this blog.
 *
 * @since MU
 * @uses upload_is_user_over_quota()
 * @uses get_space_allowed()
 * @uses get_upload_space_available()
 *
 * @param int $size Current max size in bytes
 * @return int Max size in bytes
 */
function fix_import_form_size($size)
{
    if (upload_is_user_over_quota(false) == true) {
        return 0;
    }
    $available = get_upload_space_available();
    return min($size, $available);
}