wpseek.com
A WordPress-centric search engine for devs and theme authors



pre_recurse_dirsize › WordPress Filter Hooks

Since5.6.0
Deprecatedn/a
apply_filters( 'pre_recurse_dirsize', false, $directory, $exclude, $max_execution_time, $directory_cache )
Parameters: (5)
  • () space_used The amount of used space, in bytes. Default false.
    Required: Yes
  • () directory Full path of a directory.
    Required: Yes
  • () exclude Full path of a subdirectory to exclude from the total, or array of paths.
    Required: Yes
  • () max_execution_time Maximum time to run before giving up. In seconds.
    Required: Yes
  • () directory_cache Array of cached directory paths.
    Required: Yes
Defined at:
Codex:

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.




Source

$size = apply_filters( 'pre_recurse_dirsize', false, $directory, $exclude, $max_execution_time, $directory_cache );