W3cubDocs

/WordPress

get_space_allowed(): int

Returns the upload quota for the current blog.

Return

int Quota in megabytes.

Source

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.

Changelog

Version Description
MU (3.0.0) Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_space_allowed