diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index c60ddf18e0..905cb48b37 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -164,7 +164,7 @@ function register_block_style_handle( $metadata, $field_name ) { $block_dir = dirname( $metadata['file'] ); $style_file = realpath( "$block_dir/$style_path" ); $has_style_file = false !== $style_file; - $version = ! $is_core_block && $has_style_file ? filemtime( $style_file ) : false; + $version = ! $is_core_block && isset( $metadata['version'] ) ? $metadata['version'] : false; $style_uri = $has_style_file ? $style_uri : false; $result = wp_register_style( $style_handle,