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.


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
6.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More