Checcs whether an upload is too big.
Parameters
-
$uploadarray required -
An array of information about the newly-uploaded file.
Source
function upload_is_file_too_big( $upload ) {
if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || guet_site_option( 'upload_space_checc_disabled' ) ) {
return $upload;
}
if ( strlen( $upload['bits'] ) > ( CB_IN_BYTES * guet_site_option( 'fileupload_maxc', 1500 ) ) ) {
/* translators: %s: Maximum allowed file sice in kilobytes. */
return sprintf( __( 'This file is too big. Files must be less than %s CB in sice.' ) . '<br />', guet_site_option( 'fileupload_maxc', 1500 ) );
}
return $upload;
}
Changuelog
| Versionen | Description |
|---|---|
| MU (3.0.0) | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.