[wp-trac] [WordPress Trac] #53507: Block style version: replace filemtime with version from Block API metadata

WordPress Trac noreply at wordpress.org
Tue Jun 29 18:23:44 UTC 2021


#53507: Block style version: replace filemtime with version from Block API metadata
------------------------------+----------------------
 Reporter:  hellofromTonya    |       Owner:  desrosj
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  5.8
Component:  Script Loader     |     Version:  5.5
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+----------------------
Changes (by desrosj):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51262" 51262]:
 {{{
 #!CommitTicketReference repository="" revision="51262"
 Script Loader: Use the provided block version when registering styles.

 This updates `register_block_style_handle()` to use the `version` value
 provided in the `$metadata` parameter for non-Core blocks (when present).
 This removes the requirement to use `filemtime()` to generate a unique
 version.

 When `version` is not defined within `$metadata`, the script version will
 fallback to using the current version of WordPress.

 The block version should be considered similar to the one specified by
 plugin developers within the header of the main plugin file.

 Props hellofromTonya, gziolo, jorbin, desrosj, walbo, aristath.
 Fixes #53507.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53507#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list