wpseek.com
A WordPress-centric search engine for devs and theme authors
upload_size_limit_filter › WordPress Function
Since3.0.0
Deprecatedn/a
› upload_size_limit_filter ( $size )
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: |
Filters the maximum upload file size allowed, in bytes.
Related Functions: wp_list_filter, kses_init_filters, media_upload_text_after, upload_is_file_too_big, wp_save_image_file
Source
function upload_size_limit_filter( $size ) { $fileupload_maxk = (int) get_site_option( 'fileupload_maxk', 1500 ); $max_fileupload_in_bytes = KB_IN_BYTES * $fileupload_maxk; if ( get_site_option( 'upload_space_check_disabled' ) ) { return min( $size, $max_fileupload_in_bytes ); } return min( $size, $max_fileupload_in_bytes, get_upload_space_available() ); }