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

Commit

Permalink
🐛 FIX: Move block JS to footer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
salcode committed Nov 29, 2018
1 parent 54caac6 commit 874fb4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cgb-scripts/template/src/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
);

Expand Down

0 comments on commit 874fb4e

Please sign in to comment.