函数原型
get_space_allowed(): int
函数描述
Returns the upload quota for the current blog.
是否弃用
未弃用
函数参数
无
函数返回值
int Quota in megabytes
函数位置
File: wp-includes/ms-functions.php.
函数源码
function get_space_allowed() {
$space_allowed = get_option( 'blog_upload_space' );
if ( ! is_numeric( $space_allowed ) ) {
$space_allowed = get_site_option( 'blog_upload_space' );
}
if ( ! is_numeric( $space_allowed ) ) {
$space_allowed = 100;
}
/**
* Filters the upload quota for the current site.
*
* @since 3.7.0
*
* @param int $space_allowed Upload quota in megabytes for the current blog.
*/
return apply_filters( 'get_space_allowed', $space_allowed );
}
源码链接
变更日志
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |

