Make WordPress Core

Ticket #63254: 63254.patch

File 63254.patch, 883 bytes (added by abcd95, 9 months ago)
  • src/wp-includes/blocks.php

    diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php
    index 31f1b22469..499fab8b3c 100644
    a b function register_block_style_handle( $metadata, $field_name, $index = 0 ) { 
    328328        $style_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $style_path ) );
    329329        $style_uri       = get_block_asset_url( $style_path_norm );
    330330
    331         $version = ! $is_core_block && isset( $metadata['version'] ) ? $metadata['version'] : false;
    332         $result  = wp_register_style(
     331        $block_version = ! $is_core_block && isset( $metadata['version'] ) ? $metadata['version'] : false;
     332        $version       = $style_path_norm && defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? filemtime( $style_path_norm ) : $block_version;
     333        $result        = wp_register_style(
    333334                $style_handle_name,
    334335                $style_uri,
    335336                array(),