Skip to content

Commit 645ea01

Browse files
load our scripts in the footer so as not to delay rendering
1 parent f736922 commit 645ea01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/init.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ public function register_block_editor_assets() {
300300
// wp-util for wp.ajax.
301301
// wp-plugins & wp-edit-post for Gutenberg plugins.
302302
array( 'code-editor', 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-api-fetch', 'wp-util', 'wp-plugins', 'wp-i18n', 'wp-api', 'lodash' ),
303-
STACKABLE_VERSION
303+
STACKABLE_VERSION,
304+
true
304305
);
305306

306307
// Backend editor scripts: blocks.
@@ -309,7 +310,8 @@ public function register_block_editor_assets() {
309310
plugins_url( 'dist/editor_blocks.js', STACKABLE_FILE ),
310311
// Depend on the window.stk API.
311312
apply_filters( 'stackable_editor_js_dependencies', array( 'ugb-stk' ) ),
312-
STACKABLE_VERSION
313+
STACKABLE_VERSION,
314+
true // Load in footer to avoid render blocking
313315
);
314316

315317
// Add translations.

0 commit comments

Comments
 (0)