[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 00:56:43 UTC 2021
#53507: Block style version: replace filemtime with version from Block API metadata
------------------------------------+---------------------
Reporter: hellofromTonya | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.8
Component: Script Loader | Version: 5.5
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+---------------------
Changes (by desrosj):
* keywords: needs-patch good-first-bug => has-patch dev-feedback
Comment:
[attachment:"53507.diff"] is an update that removes `filemtime()` in favor
of using `$metadata['version']`.
With this patch, non-Core blocks would use the WordPress version unless a
`version` was supplied in the `blocks.json` file.
I did some spot checking of blocks in the directory, and I did not find
any with `version` defined as a top level field in `blocks.json`. This
patch would allow us to avoid using `filemtime()` in production, but it
would require a dev note and some outreach to encourage block developers
to add this to their `blocks.json` files.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53507#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list