apply_filters( ‘wp_filesize’, int $size, string $path )

In this article

Filters the size of the file.

Parameters

$sizeint
The result of PHP filesize on the file.
$pathstring
Path to the file.

Source

$size = apply_filters( 'wp_filesize', $size, $path );

Changelog

VersionDescription
7.1.0The return value is now always zero or greater. Numeric values are cast to integers.
6.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.