1. 首页
  2. WordPress 函数手册

get_space_allowed()

get_space_allowed()

返回当前博客的上载配额。
Returns the upload quota for the current blog.

目录锚点:#返回#源码


返回(Return)

(int)以兆字节为单位的配额


源码(Source)

/**
 * Returns the upload quota for the current blog.
 *
 * @since MU
 *
 * @return int Quota in megabytes
 */
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 ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
		$space_allowed = 100;

	/**
	 * Filter 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 );
}
更新版本 源码位置 使用 被使用
MU (3.0.0) wp-includes/ms-functions.php:2500 7 4

get_space_allowed() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_space_allowed/

发表评论

您的电子邮箱地址不会被公开。