Filter hook 'pre_recurse_dirsize'
in WP Core File wp-includes/functions.php at line 8702
Description
Filters the amount of storage space used by one directory and all its children, in megabytes. 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.
Occurrences
Filename |
Line Number |
wp-includes/functions.php |
8702 |
Parameters
Type |
Name |
Description |
int|false |
$space_used |
The amount of used space, in bytes. Default false. |
string |
$directory |
Full path of a directory. |
string|string[]|null |
$exclude |
Full path of a subdirectory to exclude from the total, or array of paths. |
int |
$max_execution_time |
Maximum time to run before giving up. In seconds. |
array |
$directory_cache |
Array of cached directory paths. |
PHP Doc
/**
* Filters the amount of storage space used by one directory and all its children, in megabytes.
*
* 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.
*
* @since 5.6.0
*
* @param int|false $space_used The amount of used space, in bytes. Default false.
* @param string $directory Full path of a directory.
* @param string|string[]|null $exclude Full path of a subdirectory to exclude from the total,
* or array of paths.
* @param int $max_execution_time Maximum time to run before giving up. In seconds.
* @param array $directory_cache Array of cached directory paths.
*/