Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




upload_is_file_too_big [ WordPress Function ]

upload_is_file_too_big ( $upload )
Parameters:
  • (array) $upload
Returns:
  • (mixed) If the upload is under the size limit, $upload is returned. Otherwise returns an error message.
Defined at:



Check whether an upload is too big.

Source


<?php
function upload_is_file_too_big$upload ) {
    if ( 
is_array$upload ) == false || defined'WP_IMPORTING' ) )
        return 
$upload;

    if ( 
strlen$upload['bits'] )  > ( 1024 get_site_option'fileupload_maxk'1500 ) ) )
        return 
sprintf__'This file is too big. Files must be less than %d KB in size.' ) . '<br />'get_site_option'fileupload_maxk'1500 ));

    return 
$upload;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics