pre_recurse_dirsize

FILTER wp-includes\functions.php (ligne 8817) github
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.

Paramètres

Entrée :
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.

Utilisation

// 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;
}

Actualités

Chargement des actualités...