在“编辑站点设置”屏幕上显示站点上载空间配额设置表单。

原型

upload_space_setting( int $id )

参数

$id (int) (Required) 要显示其设置的站点的ID。

源文件

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

<?php
...
function upload_space_setting( $id ) {
	switch_to_blog( $id );
	$quota = get_option( 'blog_upload_space' );
	restore_current_blog();
	if ( !$quota )
		$quota = '';
	?>
	<tr>
		<th><label for="blog-upload-space-number"><?php _e( 'Site Upload Space Quota' ); ?></label></th>
		<td>
			<input type="number" step="1" min="0" style="width: 100px" name="option[blog_upload_space]" id="blog-upload-space-number" aria-describedby="blog-upload-space-desc" value="<?php echo $quota; ?>" />
			<span id="blog-upload-space-desc"><span class="screen-reader-text"><?php _e( 'Size in megabytes' ); ?></span> <?php _e( 'MB (Leave blank for network default)' ); ?></span>
		</td>
	</tr>
	<?php
}
...
?>

其他

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