On this page
fix_import_form_size( int $size ): int
Get the remaining upload space for this site.
Parameters
$sizeint Required-
Current max size in bytes
Return
int Max size in bytes
Source
File: wp-admin/includes/ms.php. View all references
function fix_import_form_size( $size ) {
if ( upload_is_user_over_quota( false ) ) {
return 0;
}
$available = get_upload_space_available();
return min( $size, $available );
}
Related
Uses
| Uses | Description |
|---|---|
| upload_is_user_over_quota() wp-admin/includes/ms.php | Check whether a site has used its allotted upload space. |
| get_upload_space_available() wp-includes/ms-functions.php | Determines if there is any upload space left in the current blog’s quota. |
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/fix_import_form_size