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.
Source
File: wp-includes/media.php
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |