Skip to content

Commit b9d7742

Browse files
author
Smart Cloud Solutions Inc.
committed
Improve frontend script loading performance
1 parent 70aead9 commit b9d7742

27 files changed

Lines changed: 1433 additions & 69 deletions

admin/php/admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function addMenu(): void
123123
'smartcloud-wpsuite-mantine-vendor'
124124
)
125125
);
126-
wp_enqueue_script('smartcloud-flow-admin-script', SMARTCLOUD_FLOW_URL . 'admin/index.js', $script_asset['dependencies'], SMARTCLOUD_FLOW_VERSION, array('strategy' => 'defer'));
126+
wp_enqueue_script('smartcloud-flow-admin-script', SMARTCLOUD_FLOW_URL . 'admin/index.js', $script_asset['dependencies'], SMARTCLOUD_FLOW_VERSION, array('in_footer' => true, 'strategy' => 'defer'));
127127

128128
if (function_exists('wp_set_script_translations')) {
129129
wp_set_script_translations('smartcloud-flow-admin-script', 'smartcloud-flow', SMARTCLOUD_FLOW_PATH . 'languages');

blocks/dist/editor.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => '7e34fce2a10f5c032202');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => '0d6c338d77eac9bc8d78');

blocks/dist/editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blocks/dist/form/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "smartcloud-flow/form",
5-
"version": "1.1.4",
5+
"version": "1.1.5",
66
"title": "Flow Form",
77
"category": "smartcloud-flow",
88
"icon": "feedback",

blocks/dist/gallery/block.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "https://schemas.wp.org/trunk/block.json",
3+
"apiVersion": 3,
4+
"name": "smartcloud-flow/gallery",
5+
"version": "1.0.0",
6+
"title": "Gallery",
7+
"category": "smartcloud-flow",
8+
"icon": "format-gallery",
9+
"description": "Display a navigable image gallery, including modal-driven start positions.",
10+
"supports": {
11+
"html": false,
12+
"reusable": false,
13+
"anchor": true,
14+
"className": true,
15+
"customClassName": true
16+
},
17+
"attributes": {
18+
"galleryId": {
19+
"type": "string",
20+
"default": ""
21+
},
22+
"startIndex": {
23+
"type": "number",
24+
"default": 1
25+
},
26+
"loop": {
27+
"type": "boolean",
28+
"default": true
29+
},
30+
"showCounter": {
31+
"type": "boolean",
32+
"default": true
33+
},
34+
"showThumbnails": {
35+
"type": "boolean",
36+
"default": true
37+
},
38+
"showCaptions": {
39+
"type": "boolean",
40+
"default": true
41+
}
42+
},
43+
"editorScript": "smartcloud-flow-blocks-editor-script",
44+
"style": "smartcloud-flow-modal-view-style",
45+
"viewScript": "smartcloud-flow-modal-view-script"
46+
}

blocks/dist/modal-view.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => '1897585bb60a3cb249f2');
1+
<?php return array('dependencies' => array('wp-i18n'), 'version' => 'b6e598203df9ebdd8de3');

blocks/dist/modal-view.css

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blocks/dist/modal-view.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blocks/dist/modal/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "smartcloud-flow/modal",
5-
"version": "1.0.2",
5+
"version": "1.0.3",
66
"title": "Flow Modal",
77
"category": "smartcloud-flow",
88
"icon": "feedback",

blocks/dist/view.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('jquery', 'react', 'react-dom', 'react-jsx-runtime', 'wp-data', 'wp-i18n'), 'version' => '60688f98abd5cf0d8863');
1+
<?php return array('dependencies' => array('jquery', 'react', 'react-dom', 'react-jsx-runtime', 'wp-data', 'wp-i18n'), 'version' => '930a52a4ab1eb83fa5f9');

0 commit comments

Comments
 (0)