upload_space_setting

Displays the site upload space quota setting form on the Edit Site Settings screen.

Description

upload_space_setting( (int) $id ); 

Parameters (1)

0. $id (int)
The ID of the site to display the setting for.

Usage

  1. if ( !function_exists( 'upload_space_setting' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/ms.php'; 
  3.  
  4. // The ID of the site to display the setting for. 
  5. $id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = upload_space_setting($id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/ms.php  
  1. function upload_space_setting( $id ) { 
  2. switch_to_blog( $id ); 
  3. $quota = get_option( 'blog_upload_space' ); 
  4.  
  5. if ( !$quota ) 
  6. $quota = ''; 
  7.  
  8. ?> 
  9. <tr> 
  10. <th><label for="blog-upload-space-number"><?php _e( 'Site Upload Space Quota' ); ?></label></th> 
  11. <td> 
  12. <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; ?>" /> 
  13. <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> 
  14. </td> 
  15. </tr> 
  16. <?php