diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index d6db591bc6..30219f3ca0 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -129,7 +129,11 @@ function register_block_script_handle( $metadata, $field_name, $index = 0 ) { } // Path needs to be normalized to work in Windows env. - $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) ); + static $wpinc_path_norm = ''; + if ( ! $wpinc_path_norm ) { + $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) ); + } + $theme_path_norm = wp_normalize_path( get_theme_file_path() ); $script_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $script_path ) ); @@ -182,7 +186,10 @@ function register_block_style_handle( $metadata, $field_name, $index = 0 ) { return false; } - $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) ); + static $wpinc_path_norm = ''; + if ( ! $wpinc_path_norm ) { + $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) ); + } $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm ); // Skip registering individual styles for each core block when a bundled version provided. diff --git a/wp-includes/version.php b/wp-includes/version.php index f46a6ffb02..6283f568a7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54414'; +$wp_version = '6.1-beta3-54415'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.