wppaste
WordPress

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.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

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.0

Changelog

Introduced in 2.5.0. Unchanged from 6.7.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.10 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.