wp_filesize WordPress Filter Hook
The wp_filesize hook is used to calculate the filesize of a given file. This is useful for determining the size of a file before it is downloaded, or for displaying the size of a file in kilobytes or megabytes.
apply_filters( 'wp_filesize', int $size , string $path ) #
Filters the size of the file.
Parameters
- $size
(int)The result of PHP filesize on the file.
- $path
(string)Path to the file.
Source
Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |