On this page
apply_filters( 'pre_wp_filesize', null|int $size, string $path )
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
File: wp-includes/functions.php. View all references
$size = apply_filters( 'pre_wp_filesize', null, $path );
Related
Used By
| Used By | Description |
|---|---|
| wp_filesize() wp-includes/functions.php | Wrapper for PHP filesize with filters and casting the result as an integer. |
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_wp_filesize