Skip to content

Commit

Permalink
Fix frontend css versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
roborourke authored Sep 13, 2024
1 parent 9a52c80 commit 06bb1ba
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions lottie-lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,28 @@

add_action( 'init', function () {
$asset = require __DIR__ . '/build/lottie.asset.php';
wp_register_style(
'lottie-lite',
plugins_url( 'build/lottie.css', __FILE__ ),
[],
$asset['version']
);
wp_enqueue_block_style(
'core/image',
[
'handle' => 'lottie-lite',
'src' => plugins_url( 'build/lottie.css', __FILE__ ),
'version' => $asset['version'],
]
);
wp_enqueue_block_style(
'core/cover',
[
'handle' => 'lottie-lite',
]
);
wp_enqueue_block_style(
'core/media-text',
[
'handle' => 'lottie-lite',
]
);
} );
Expand Down

0 comments on commit 06bb1ba

Please sign in to comment.