确定当前博客的配额中是否还有任何上传空间。

原型

get_upload_space_available()

返回值

(int)  上传空间的可用字节数

源文件

路径:wp-includes/ms-functions.php

<?php
...
function get_upload_space_available() {
	$allowed = get_space_allowed();
	if ( $allowed < 0 ) {
		$allowed = 0;
	}
	$space_allowed = $allowed * MB_IN_BYTES;
	if ( get_site_option( 'upload_space_check_disabled' ) )
		return $space_allowed;
	$space_used = get_space_used() * MB_IN_BYTES;
	if ( ( $space_allowed - $space_used ) <= 0 )
		return 0;
	return $space_allowed - $space_used;
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/get_upload_space_available/