Changeset 45220 for trunk/src/wp-includes/functions.php
- Timestamp:
- 04/16/2019 11:01:45 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r45206 r45220 7072 7072 * @since 5.2.0 $max_execution_time parameter added. 7073 7073 * 7074 * @param string $directory Full path of a directory. 7075 * @param string $exclude Optional. Full path of a subdirectory to exclude from the total. 7076 * @param int $max_execution_time Maximum time to run before giving up. In seconds. 7077 * The timeout is global and is measured from the moment WordPress started to load. 7078 * @return int|false|null Size in MB if a valid directory. False if not. Null if timeout. 7074 * @param string $directory Full path of a directory. 7075 * @param string|array $exclude Optional. Full path of a subdirectory to exclude from the total, or array of paths. 7076 * Expected without trailing slash(es). 7077 * @param int $max_execution_time Maximum time to run before giving up. In seconds. 7078 * The timeout is global and is measured from the moment WordPress started to load. 7079 * @return int|false|null Size in bytes if a valid directory. False if not. Null if timeout. 7079 7080 */ 7080 7081 function recurse_dirsize( $directory, $exclude = null, $max_execution_time = null ) { … … 7083 7084 $directory = untrailingslashit( $directory ); 7084 7085 7085 if ( ! file_exists( $directory ) || ! is_dir( $directory ) || ! is_readable( $directory ) || $directory === $exclude ) { 7086 if ( ! file_exists( $directory ) || ! is_dir( $directory ) || ! is_readable( $directory ) ) { 7087 return false; 7088 } 7089 7090 if ( 7091 ( is_string( $exclude ) && $directory === $exclude ) || 7092 ( is_array( $exclude ) && in_array( $directory, $exclude, true ) ) 7093 ) { 7086 7094 return false; 7087 7095 }
Note: See TracChangeset
for help on using the changeset viewer.