upload_is_file_too_big()
upload_is_file_too_big( array $upload ) 检查上载是否太大。 Check…
upload_is_file_too_big( array $upload )
检查上载是否太大。
Check whether an upload is too big.
检查上载是否太大。
Check whether an upload is too big.
目录锚点:#参数#源码
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $upload | (array) |
源码(Source)
/**
* Check whether an upload is too big.
*
* @since MU
*
* @param array $upload
* @return string|array If the upload is under the size limit, $upload is returned. Otherwise returns an error message.
*/
function upload_is_file_too_big( $upload ) {
if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) )
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.' ) . '', get_site_option( 'fileupload_maxk', 1500 ));
return $upload;
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| MU (3.0.0) | wp-includes/ms-functions.php | 10 | 18 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!