wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



upload_size_limit_filter › WordPress Function

Seit3.0.0
Veraltetn/v
upload_size_limit_filter ( $size )
Parameter:
  • (int) $size Upload size limit in bytes.
    Erforderlich: Ja
Gibt zurück:
  • (int) Upload size limit in bytes.
Definiert in:
Codex:

Filters the maximum upload file size allowed, in bytes.



Quellcode

function upload_size_limit_filter( $size ) {
	$fileupload_maxk         = (int) get_site_option( 'fileupload_maxk', 1500 );
	$max_fileupload_in_bytes = KB_IN_BYTES * $fileupload_maxk;

	if ( get_site_option( 'upload_space_check_disabled' ) ) {
		return min( $size, $max_fileupload_in_bytes );
	}

	return min( $size, $max_fileupload_in_bytes, get_upload_space_available() );
}