get_space_allowed

Returns the upload quota for the current blog.

Description

(int) get_space_allowed(); 

Returns (int)

Quota in megabytes


Usage

  1. if ( !function_exists( 'get_space_allowed' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_space_allowed(); 
  7.  

Defined (1)

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

/wp-includes/ms-functions.php  
  1. function get_space_allowed() { 
  2. $space_allowed = get_option( 'blog_upload_space' ); 
  3.  
  4. if ( ! is_numeric( $space_allowed ) ) 
  5. $space_allowed = get_site_option( 'blog_upload_space' ); 
  6.  
  7. if ( ! is_numeric( $space_allowed ) ) 
  8. $space_allowed = 100; 
  9.  
  10. /** 
  11. * Filters the upload quota for the current site. 
  12. * @since 3.7.0 
  13. * @param int $space_allowed Upload quota in megabytes for the current blog. 
  14. */ 
  15. return apply_filters( 'get_space_allowed', $space_allowed );