Clanbite Since 1.6.5

version_block_assets( array<string, mixed> $metadata ): array<string, mixed>

Version the styles of every Clanbite block by its build time instead of the version in block.json.

Every block.json says 1.0.0, and WordPress prints that as the stylesheet's ver=. A browser or CDN that cached a block's CSS kept serving the old file after an update because the address never changed. The file's modification time changes with each build, so a new release always loads new CSS. Applies to blocks of this plugin and of every Clanbite add-on.

public

Class: Kernowdev\Clanbite\Main

Parameters

$metadata (array<string, mixed>) Required

Block metadata being registered.

Returns

array<string, mixed>

Defined in clanbite.php

Changelog

VersionDescription
1.6.5Introduced.