Site health:

- Prevent fatal errors from timeouts on the Tools => Site Health => Info tab.
- Use the `get_dirsize()` and `recurse_dirsize()` functions to calculate directory sizes. The results are cached.
- Introduce "timeout protection" in `recurse_dirsize()`.

Props pento, Clorith, xkon, afercia, jeremyfelt, azaozz.
Fixes #46645.
Built from https://develop.svn.wordpress.org/trunk@45104


git-svn-id: http://core.svn.wordpress.org/trunk@44913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2019-04-02 23:33:53 +00:00
parent 1909df67a7
commit 2cdc22aded
5 changed files with 160 additions and 143 deletions

View File

@@ -29,6 +29,11 @@ function wp_initial_constants() {
define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
/**#@-*/
// Start of run timestamp.
if ( ! defined( 'WP_START_TIMESTAMP' ) ) {
define( 'WP_START_TIMESTAMP', microtime( true ) );
}
$current_limit = @ini_get( 'memory_limit' );
$current_limit_int = wp_convert_hr_to_bytes( $current_limit );