apply_filters( ‘pre_wp_filesize’, null|int $size, string $path )

In this article

Filters the result of wp_filesize before the PHP function is run.

Parameters

$sizenull|int
The unfiltered value. Returning an int from the callback bypasses the filesize call.
$pathstring
Path to the file.

Source

$size = apply_filters( 'pre_wp_filesize', null, $path );

Changelog

VersionDescription
6.0.0Introduced.

User Contributed Notes

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