upload_space_setting

函数
upload_space_setting ( $id )
参数
  • (int) $id The ID of the site to display the setting for.
    Required:
定义位置
相关方法
wp_color_scheme_settingswp_user_settingswp_plupload_default_settingsdisplay_space_usageupload_is_file_too_big
引入
3.0.0
弃用
-

upload_space_setting: 这个函数检索一个用户允许用于媒体上传的最大空间量。

显示编辑网站设置屏幕上的网站上传空间配额设置表格。

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
}

常见问题

FAQs
查看更多 >