apply_filters( 'upload_size_limit', int $size, int $u_bytes, int $p_bytes )
- Since
- 2.5.0
Filters the maximum upload size allowed in php.ini.
Compatibility
- WordPress
- since 2.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$sizeint- Max upload size limit in bytes.
$u_bytesint- Maximum upload filesize in bytes.
$p_bytesint- Maximum size of POST data in bytes.
Where this hook fires · 1
wp-includes/media.php:4151wp_max_upload_size()
Source code
* @since 2.5.0 * * @param int $size Max upload size limit in bytes. * @param int $u_bytes Maximum upload filesize in bytes. * @param int $p_bytes Maximum size of POST data in bytes. */ return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );} /** * Returns a WP_Image_Editor instance and loads file into it. * * @since 3.5.0Changelog
Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.