PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.8.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.8.0
2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 All 78 releases
ablocks / includes / classes / register-scripts.php

register-scripts.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.8.0, at includes/classes/register-scripts.php

149 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ABlocks\Classes;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8
9 class RegisterScripts {
10 public static function get_register_styles() {
11 return apply_filters('ablocks/register_styles', [
12 'ablocks-prism-style' => [
13 'path' => ABLOCKS_ASSETS_PATH . 'library/prism/prism.css',
14 'url' => ABLOCKS_ASSETS_URL . 'library/prism/prism.css',
15 'deps' => array(),
16 'ver' => false,
17 'media' => 'all'
18 ],
19 'ablocks-prism-line-numbers-style' => [
20 'path' => ABLOCKS_ASSETS_PATH . 'library/prism/prism-line-numbers.css',
21 'url' => ABLOCKS_ASSETS_URL . 'library/prism/prism-line-numbers.css',
22 'deps' => array(),
23 'ver' => false,
24 'media' => 'all'
25 ],
26 'ablocks-prism-line-highlight-style' => [
27 'path' => ABLOCKS_ASSETS_PATH . 'library/prism/prism-line-highlight.css',
28 'url' => ABLOCKS_ASSETS_URL . 'library/prism/prism-line-highlight.css',
29 'deps' => array(),
30 'ver' => false,
31 'media' => 'all'
32 ],
33 'ablocks-leaflet-style' => [
34 'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/leaflet.css',
35 'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/leaflet.css',
36 'deps' => array(),
37 'ver' => false,
38 'media' => 'all'
39 ],
40 'ablocks-leaflet-full-screen-style' => [
41 'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/leaflet.fullscreen.css',
42 'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/leaflet.fullscreen.css',
43 'deps' => array(),
44 'ver' => false,
45 'media' => 'all'
46 ],
47 'ablocks-animate-style' => [
48 'path' => ABLOCKS_ASSETS_PATH . 'library/animate/animate.min.css',
49 'url' => ABLOCKS_ASSETS_URL . 'library/animate/animate.min.css',
50 'deps' => array(),
51 'ver' => false,
52 'media' => 'all'
53 ],
54 'ablocks-swiper-style' => [
55 'path' => ABLOCKS_ASSETS_PATH . 'library/swiper/swiper-bundle.min.css',
56 'url' => ABLOCKS_ASSETS_URL . 'library/swiper/swiper-bundle.min.css',
57 'deps' => array(),
58 'ver' => false,
59 'media' => 'all'
60 ],
61 'ablocks-plyr-style' => [
62 'path' => ABLOCKS_ASSETS_PATH . 'library/plyr/plyr.css',
63 'url' => ABLOCKS_ASSETS_URL . 'library/plyr/plyr.css',
64 'deps' => array(),
65 'ver' => false,
66 'media' => 'all'
67 ],
68 'ablocks-common-style' => [
69 'path' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.css',
70 'url' => ABLOCKS_ASSETS_URL . 'build/blocks-common.css',
71 'deps' => array(),
72 'ver' => false,
73 'media' => 'all'
74 ],
75 ]);
76 }
77 public static function get_register_scripts() {
78 $script_loading_strategy = \ABlocks\Helper::get_script_loading_strategy();
79 $args = [ 'strategy' => $script_loading_strategy ];
80 return apply_filters('ablocks/register_scripts', [
81 'ablocks-prism-script' => [
82 'path' => ABLOCKS_ASSETS_PATH . 'library/prism/prism.js',
83 'url' => ABLOCKS_ASSETS_URL . 'library/prism/prism.js',
84 'deps' => array(),
85 'ver' => false,
86 'args' => $args
87 ],
88 'ablocks-prism-line-numbers-script' => [
89 'path' => ABLOCKS_ASSETS_PATH . 'library/prism/prism-line-numbers.js',
90 'url' => ABLOCKS_ASSETS_URL . 'library/prism/prism-line-numbers.js',
91 'deps' => array(),
92 'ver' => false,
93 'args' => $args
94 ],
95 'ablocks-prism-line-highlight-script' => [
96 'path' => ABLOCKS_ASSETS_PATH . 'library/prism/prism-line-highlight.js',
97 'url' => ABLOCKS_ASSETS_URL . 'library/prism/prism-line-highlight.js',
98 'deps' => array(),
99 'ver' => false,
100 'args' => $args
101 ],
102 'ablocks-leaflet-script' => [
103 'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/leaflet.js',
104 'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/leaflet.js',
105 'deps' => array(),
106 'ver' => false,
107 'args' => $args
108 ],
109 'ablocks-leaflet-full-screen-script' => [
110 'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/Leaflet.fullscreen.js',
111 'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/Leaflet.fullscreen.js',
112 'deps' => array(),
113 'ver' => false,
114 'args' => $args
115 ],
116 'ablocks-swiper-script' => [
117 'path' => ABLOCKS_ASSETS_PATH . 'library/swiper/swiper-bundle.min.js',
118 'url' => ABLOCKS_ASSETS_URL . 'library/swiper/swiper-bundle.min.js',
119 'deps' => array(),
120 'ver' => false,
121 'args' => $args
122 ],
123 'ablocks-chart.js-script' => [
124 'path' => ABLOCKS_ASSETS_PATH . 'library/chart/chart.js',
125 'url' => ABLOCKS_ASSETS_URL . 'library/chart/chart.js',
126 'deps' => array(),
127 'ver' => false,
128 'args' => $args
129 ],
130 'ablocks-plyr-script' => [
131 'path' => ABLOCKS_ASSETS_PATH . 'library/plyr/plyr.js',
132 'url' => ABLOCKS_ASSETS_URL . 'library/plyr/plyr.js',
133 'deps' => array(),
134 'ver' => false,
135 'args' => true,
136 'dependencies' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.asset.php'
137 ],
138 'ablocks-common-script' => [
139 'path' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.js',
140 'url' => ABLOCKS_ASSETS_URL . 'build/blocks-common.js',
141 'deps' => array(),
142 'ver' => false,
143 'args' => $args,
144 'dependencies' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.asset.php'
145 ],
146 ]);
147 }
148 }
149