diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 0ea531824b..713a0d3118 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -2872,12 +2872,18 @@ function wp_maybe_inline_styles() { // Build an array of styles that have a path defined. foreach ( $wp_styles->queue as $handle ) { - if ( wp_styles()->get_data( $handle, 'path' ) && file_exists( $wp_styles->registered[ $handle ]->extra['path'] ) ) { + $src = $wp_styles->registered[ $handle ]->src; + $path = wp_styles()->get_data( $handle, 'path' ); + if ( $path && $src ) { + $size = wp_filesize( $path ); + if ( ! $size ) { + continue; + } $styles[] = array( 'handle' => $handle, - 'src' => $wp_styles->registered[ $handle ]->src, - 'path' => $wp_styles->registered[ $handle ]->extra['path'], - 'size' => filesize( $wp_styles->registered[ $handle ]->extra['path'] ), + 'src' => $src, + 'path' => $path, + 'size' => $size, ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5fd6aacf50..f4df3ef091 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55887'; +$wp_version = '6.3-alpha-55888'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.