Summery Summery
Whether or not we have a large network.
Syntax Syntax
Description Description
The default criteria for a large network is either more than 10,000 users or more than 10,000 sites. Plugins can alter this criteria using the ‘wp_is_large_network’ filter.
Parameters Parameters
- $using
-
(Optional) 'sites or 'users'. Default is 'sites'.
Default value: 'sites'
- $network_id
-
(Optional) ID of the network. Default is the current network.
Default value: null
Return Return
(bool) True if the network meets the criteria for large. False otherwise.
Source Source
File: wp-includes/ms-functions.php
return (bool) get_upload_space_available();
}
/**
* Filters the maximum upload file size allowed, in bytes.
*
* @since 3.0.0
*
* @param int $size Upload size limit in bytes.
* @return int Upload size limit in bytes.
*/
function upload_size_limit_filter( $size ) {
$fileupload_maxk = KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 );
if ( get_site_option( 'upload_space_check_disabled' ) ) {
return min( $size, $fileupload_maxk );
}
return min( $size, $fileupload_maxk, get_upload_space_available() );
}
/**
* Whether or not we have a large network.
*
* The default criteria for a large network is either more than 10,000 users or more than 10,000 sites.
* Plugins can alter this criteria using the {@see 'wp_is_large_network'} filter.
*
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.8.0 | The $network_id parameter has been added. |
| 3.3.0 | Introduced. |