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.
false, $directory, $exclude, $max_execution_time, $directory_cache
Sortie :
@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, @param int $max_execution_time Maximum time to run before giving up. In seconds. @param array $directory_cache Array of cached directory paths.
// Modifier la valeur avec le filtre 'pre_recurse_dirsize'
add_filter('pre_recurse_dirsize', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(false) {
// Modifier la valeur
return false;
}
Chargement des actualités...