apply_filters( 'pre_recurse_dirsize', int|false $space_used )

Filters the amount of storage space used by one directory and all its children, in megabytes.

Description

Return the actual used space to short-circuit the recursive PHP file size calculation and use something else, like a CDN API or native operating system tools for better performance.

Parameters

$space_used

(int|false) The amount of used space, in bytes. Default false.

Source

File: wp-includes/functions.php

View on Trac

Changelog

Version Description
5.6.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_recurse_dirsize