upload_size_limit_filter() - WordPress 函数参考中文文档

返回介绍

upload_size_limit_filter()

发布于 2017-09-11 字数1278 浏览 888 评论 0

upload_size_limit_filter( int $size )

Filters the maximum upload file size allowed, in bytes.


描述


参数

$size

(int)
(Required)
Upload size limit in bytes.


返回值

(int) Upload size limit in bytes.


源代码

File: wp-includes/ms-functions.php

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() );
}

更新日志

Version 描述
3.0.0 Introduced.

相关函数

Uses

  • wp-includes/option.php:
    get_site_option()
  • wp-includes/ms-functions.php:
    get_upload_space_available()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!