upload_size_limit_filter( int $size )

Filters the maximum upload file size allowed, in bytes.

Description Description

Parameters Parameters


(int) (Required) Upload size limit in bytes.

Top ↑

Return Return

(int) Upload size limit in bytes.

Top ↑

Source Source

File: wp-includes/ms-functions.php

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() );

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.