Changeset 49628 for trunk/src/wp-includes/functions.php
- Timestamp:
- 11/17/2020 03:36:02 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r49616 r49628 7608 7608 * Get the size of a directory recursively. 7609 7609 * 7610 * Used by get_dirsize() to get a directory's size when it contains 7611 * other directories. 7610 * Used by get_dirsize() to get a directory size when it contains other directories. 7612 7611 * 7613 7612 * @since MU (3.0.0) 7614 * @since 4.3.0 $exclude parameteradded.7615 * @since 5.2.0 $max_execution_time parameteradded.7616 * @since 5.6.0 $directory_cache parameteradded.7613 * @since 4.3.0 The `$exclude` parameter was added. 7614 * @since 5.2.0 The `$max_execution_time` parameter was added. 7615 * @since 5.6.0 The `$directory_cache` parameter was added. 7617 7616 * 7618 7617 * @param string $directory Full path of a directory. … … 7669 7668 7670 7669 /** 7671 * Filters the amount of storage space used by one directory and all it's children, in megabytes. 7672 * Return the actual used space to shortcircuit the recursive PHP file size calculation and use something else 7673 * like a CDN API or native operating system tools for better performance 7674 * 7675 * @since 5.6.0 7676 * 7677 * @param int|false $space_used The amount of used space, in bytes. Default 0. 7678 */ 7670 * Filters the amount of storage space used by one directory and all its children, in megabytes. 7671 * 7672 * Return the actual used space to short-circuit the recursive PHP file size calculation 7673 * and use something else, like a CDN API or native operating system tools for better performance. 7674 * 7675 * @since 5.6.0 7676 * 7677 * @param int|false $space_used The amount of used space, in bytes. Default 0. 7678 */ 7679 7679 $size = apply_filters( 'calculate_current_dirsize', $size, $directory, $exclude, $max_execution_time, $directory_cache ); 7680 7680 … … 7706 7706 $directory_cache[ $cache_path ] = $size; 7707 7707 7708 // Only write the transient on the top level call and not on recursive calls 7708 // Only write the transient on the top level call and not on recursive calls. 7709 7709 if ( $save_cache ) { 7710 7710 set_transient( 'dirsize_cache', $directory_cache ); … … 7715 7715 7716 7716 /** 7717 * Invalidates entries within the dirsize_cache 7718 * 7719 * Remove the current directory and all parent directories 7720 * from the dirsize_cache transient. 7717 * Cleans directory size cache used by recurse_dirsize(). 7718 * 7719 * Removes the current directory and all parent directories from the `dirsize_cache` transient. 7721 7720 * 7722 7721 * @since 5.6.0
Note: See TracChangeset
for help on using the changeset viewer.