get_space_allowed()获取当前博客的上传上限

目录

描述

Returns the upload quota for the current blog.

get_space_allowed() 描述

用法

<?php get_space_allowed() ?>

get_space_allowed() 用法

参数

This function does not accept any parameters

get_space_allowed() 参数

示例

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

get_space_allowed() 示例

历史

添加于 版本: MU

get_space_allowed() 历史

源文件

get_space_allowed() 函数的代码位于 wp-includes/ms-functions.php.

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */
/**
 * 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 );
}

get_space_allowed() 源文件

相关