upload_size_limit WordPress Filter Hook

The upload_size_limit hook is used to define the maximum file size that can be uploaded to a WordPress site. This hook is useful for sites that need to limit the size of files that can be uploaded, such as image files.

apply_filters( 'upload_size_limit', int $size, int $u_bytes, int $p_bytes ) #

Filters the maximum upload size allowed in php.ini.


Parameters

$size

(int)Max upload size limit in bytes.

$u_bytes

(int)Maximum upload filesize in bytes.

$p_bytes

(int)Maximum size of POST data in bytes.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More