On this page
get_space_allowed(): int
Returns the upload quota for the current blog.
Return
int Quota in megabytes
Source
File: wp-includes/ms-functions.php. View all references
function get_space_allowed() {
$space_allowed = get_option( 'blog_upload_space' );
if ( ! is_numeric( $space_allowed ) ) {
$space_allowed = get_site_option( 'blog_upload_space' );
}
if ( ! is_numeric( $space_allowed ) ) {
$space_allowed = 100;
}
/**
* Filters the upload quota for the current site.
*
* @since 3.7.0
*
* @param int $space_allowed Upload quota in megabytes for the current blog.
*/
return apply_filters( 'get_space_allowed', $space_allowed );
}
Hooks
- apply_filters( 'get_space_allowed',
int $space_allowed ) -
Filters the upload quota for the current site.
Related
Uses
| Uses | Description |
|---|---|
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
| get_site_option() wp-includes/option.php | Retrieve an option value for the current network based on name of option. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Used By
| Used By | Description |
|---|---|
| upload_is_user_over_quota() wp-admin/includes/ms.php | Check whether a site has used its allotted upload space. |
| display_space_usage() wp-admin/includes/ms.php | Displays the amount of disk space used by the current site. Not used in core. |
| wp_dashboard_quota() wp-admin/includes/dashboard.php | Displays file upload quota on dashboard. |
| multisite_over_quota_message() wp-admin/includes/media.php | Displays the out of storage quota message in Multisite. |
| wpmu_checkAvailableSpace() wp-admin/includes/ms-deprecated.php | Determines if the available space defined by the admin has been exceeded by the user. |
| get_upload_space_available() wp-includes/ms-functions.php | Determines if there is any upload space left in the current blog’s quota. |
| wp_xmlrpc_server::mw_newMediaObject() wp-includes/class-wp-xmlrpc-server.php | Uploads a file, following your settings. |
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_space_allowed