fix_import_form_size()获取博客剩余可上传的空间大小

目录

描述

Get the remaining upload space for this blog.

fix_import_form_size() 描述

用法

<?php fix_import_form_size$size ?>

fix_import_form_size() 用法

参数

$size

(integer) (必填) Current max size in bytes

默认值: None

fix_import_form_size() 参数

示例

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

fix_import_form_size() 示例

历史

添加于 版本: MU

fix_import_form_size() 历史

源文件

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

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */
/**
 * Get the remaining upload space for this blog.
 *
 * @since MU
 *
 * @param int $size Current max size in bytes
 * @return int Max size in bytes
 */
function fix_import_form_size( $size ) {
	if ( upload_is_user_over_quota( false ) ) {
		return 0;
	}
	$available = get_upload_space_available();
	return min( $size, $available );
}

fix_import_form_size() 源文件

相关