wp_is_large_network

Advertisement

Summery Summery

Whether or not we have a large network.

Syntax Syntax

wp_is_large_network( string $using = 'sites', int|null $network_id = null )

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

(string) (Optional) 'sites or 'users'. Default is 'sites'.

Default value: 'sites'

$network_id

(int|null) (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

Changelog
Version Description
4.8.0 The $network_id parameter has been added.
3.3.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.