WordPress开发者和主题制作者的搜索引擎



upload_size_limit_filter ›

Since3.0.0
已弃用n/a
upload_size_limit_filter ( $size )
参数:
  • (int) $size Upload size limit in bytes.
    Required: Yes
返回:
  • (int) Upload size limit in bytes.
定义在:
文档:

Filters the maximum upload file size allowed, in bytes.



源码

function upload_size_limit_filter( $size ) {
	$fileupload_maxk = KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 );
	if ( get_site_option( 'upload_space_check_disabled' ) ) {
		return min( $size, $fileupload_maxk );
	}

	return min( $size, $fileupload_maxk, get_upload_space_available() );
}