From 874fb4ed5f4b83b72cc5f720168f37c27cedd5ca Mon Sep 17 00:00:00 2001 From: Sal Ferrarello Date: Sun, 27 May 2018 23:11:57 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20FIX:=20Move=20block=20JS=20to=20?= =?UTF-8?q?footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/cgb-scripts/template/src/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cgb-scripts/template/src/init.php b/packages/cgb-scripts/template/src/init.php index 3edb775f..c17ba4c3 100644 --- a/packages/cgb-scripts/template/src/init.php +++ b/packages/cgb-scripts/template/src/init.php @@ -48,7 +48,7 @@ function <% blockNamePHPLower %>_cgb_editor_assets() { '<% blockNamePHPLower %>-cgb-block-js', // Handle. plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack. array( 'wp-blocks', 'wp-i18n', 'wp-element' ), // Dependencies, defined above. - // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime — Gets file modification time. + null, // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime — Gets file modification time. true // Enqueue the script in the footer. );