Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 708df56

Browse files
committed
🐛 FIX: Move block JS to footer
Add a version number parameter (null), which allows the following parameter (`true`) to be properly interpreted as the `in_footer` parameter. props to @riyuk for pointing out `null` is the appropriate value, rather than empty string ("") See #65
1 parent 55f35d2 commit 708df56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/cgb-scripts/template/src

packages/cgb-scripts/template/src/init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function <% blockNamePHPLower %>_cgb_editor_assets() { // phpcs:ignore
4747
'<% blockNamePHPLower %>-cgb-block-js', // Handle.
4848
plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack.
4949
array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), // Dependencies, defined above.
50-
// filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
50+
null, // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: File modification time.
5151
true // Enqueue the script in the footer.
5252
);
5353

0 commit comments

Comments
 (0)