get_space_allowed

函数
get_space_allowed ( No parameters )
返回值
  • (int) Quota in megabytes
定义位置
相关方法
get_space_usedget_site_allowed_themesrest_send_allow_headerget_upload_space_availableget_allowed_themes
引入
-
弃用
-

get_space_allowed:此函数检索当前站点允许的空间量。它不接受任何参数,并将允许的空间作为整数返回。

返回当前博客的上传配额。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2026-03-15 13:37:19

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: