Skip to content

Commit 881d354

Browse files
Merge pull request #334 from HardeepAsrani/development
Loaded script in footer
2 parents 8869068 + 101aeff commit 881d354

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

classes/Visualizer/Gutenberg/Block.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,20 @@ private function __construct() {
6666
* Enqueue front end and editor JavaScript and CSS
6767
*/
6868
public function enqueue_gutenberg_scripts() {
69-
$blockPath = VISUALIZER_ABSURL . '/classes/Visualizer/Gutenberg/build/block.js';
70-
$handsontableJS = VISUALIZER_ABSURL . '/classes/Visualizer/Gutenberg/build/handsontable.js';
71-
$stylePath = VISUALIZER_ABSURL . '/classes/Visualizer/Gutenberg/build/block.css';
72-
$handsontableCSS = VISUALIZER_ABSURL . '/classes/Visualizer/Gutenberg/build/handsontable.css';
69+
$blockPath = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/block.js';
70+
$handsontableJS = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/handsontable.js';
71+
$stylePath = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/block.css';
72+
$handsontableCSS = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/handsontable.css';
7373

7474
if ( VISUALIZER_TEST_JS_CUSTOMIZATION ) {
75-
$version = filemtime( VISUALIZER_ABSPATH . '/classes/Visualizer/Gutenberg/build/block.js' );
75+
$version = filemtime( VISUALIZER_ABSPATH . 'classes/Visualizer/Gutenberg/build/block.js' );
7676
} else {
7777
$version = $this->version;
7878
}
7979

8080
// Enqueue the bundled block JS file
8181
wp_enqueue_script( 'handsontable', $handsontableJS );
82-
wp_enqueue_script( 'visualizer-gutenberg-block', $blockPath, array( 'wp-api', 'handsontable' ), $version );
82+
wp_enqueue_script( 'visualizer-gutenberg-block', $blockPath, array( 'wp-api', 'handsontable' ), $version, true );
8383

8484
$type = 'community';
8585

0 commit comments

Comments
 (0)