PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 2.8.23.4
Pods – Custom Content Types and Fields v2.8.23.4
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / tribe-common / src / Tribe / Editor / Assets.php
pods / tribe-common / src / Tribe / Editor Last commit date
Blocks 2 weeks ago Assets.php 2 weeks ago Configuration.php 2 weeks ago Configuration_Interface.php 2 weeks ago Meta.php 2 weeks ago Meta_Interface.php 2 weeks ago Provider.php 2 weeks ago Utils.php 2 weeks ago
Assets.php
260 lines
1 <?php
2
3 /**
4 * Events Gutenberg Assets
5 *
6 * @since 4.8
7 */
8 class Tribe__Editor__Assets {
9 /**
10 *
11 * @since 4.8
12 *
13 * @return void
14 */
15 public function hook() {
16 add_action( 'tribe_plugins_loaded', [ $this, 'register' ] );
17 }
18
19 /**
20 * Registers and Enqueues the assets
21 *
22 * @since 4.8
23 *
24 * @param string $key Which key we are checking against
25 *
26 * @return boolean
27 */
28 public function register() {
29
30 $plugin = Tribe__Main::instance();
31
32 tribe_asset(
33 $plugin,
34 'tribe-common-gutenberg-data',
35 'app/data.js',
36 /**
37 * @todo revise this dependencies
38 */
39 [
40 'react',
41 'react-dom',
42 'wp-components',
43 'wp-api',
44 'wp-api-request',
45 'wp-blocks',
46 'wp-i18n',
47 'wp-element',
48 'wp-editor',
49 ],
50 'enqueue_block_editor_assets',
51 [
52 'in_footer' => false,
53 'localize' => [
54 [
55 'name' => 'tribe_editor_config',
56 /**
57 * Array used to setup the FE with custom variables from the BE
58 *
59 * @since 4.8
60 *
61 * @param array An array with the variables to be localized
62 */
63 'data' => tribe_callback( 'common.editor.configuration', 'localize' ),
64 ],
65 ],
66 'priority' => 11,
67 ]
68 );
69
70 tribe_asset(
71 $plugin,
72 'tribe-common-gutenberg-utils',
73 'app/utils.js',
74 /**
75 * @todo revise this dependencies
76 */
77 [
78 'react',
79 'react-dom',
80 'wp-components',
81 'wp-api',
82 'wp-api-request',
83 'wp-blocks',
84 'wp-i18n',
85 'wp-element',
86 'wp-editor',
87 ],
88 'enqueue_block_editor_assets',
89 [
90 'in_footer' => false,
91 'localize' => [],
92 'priority' => 12,
93 ]
94 );
95 tribe_asset(
96 $plugin,
97 'tribe-common-gutenberg-store',
98 'app/store.js',
99 /**
100 * @todo revise this dependencies
101 */
102 [
103 'react',
104 'react-dom',
105 'wp-components',
106 'wp-api',
107 'wp-api-request',
108 'wp-blocks',
109 'wp-i18n',
110 'wp-element',
111 'wp-editor',
112 ],
113 'enqueue_block_editor_assets',
114 [
115 'in_footer' => false,
116 'localize' => [],
117 'priority' => 13,
118 ]
119 );
120 tribe_asset(
121 $plugin,
122 'tribe-common-gutenberg-icons',
123 'app/icons.js',
124 /**
125 * @todo revise this dependencies
126 */
127 [
128 'react',
129 'react-dom',
130 'wp-components',
131 'wp-api',
132 'wp-api-request',
133 'wp-blocks',
134 'wp-i18n',
135 'wp-element',
136 'wp-editor',
137 ],
138 'enqueue_block_editor_assets',
139 [
140 'in_footer' => false,
141 'localize' => [],
142 'priority' => 14,
143 ]
144 );
145 tribe_asset(
146 $plugin,
147 'tribe-common-gutenberg-hoc',
148 'app/hoc.js',
149 /**
150 * @todo revise this dependencies
151 */
152 [
153 'react',
154 'react-dom',
155 'wp-components',
156 'wp-api',
157 'wp-api-request',
158 'wp-blocks',
159 'wp-i18n',
160 'wp-element',
161 'wp-editor',
162 ],
163 'enqueue_block_editor_assets',
164 [
165 'in_footer' => false,
166 'localize' => [],
167 'priority' => 15,
168 ]
169 );
170 tribe_asset(
171 $plugin,
172 'tribe-common-gutenberg-components',
173 'app/components.js',
174 /**
175 * @todo revise this dependencies
176 */
177 [
178 'react',
179 'react-dom',
180 'wp-components',
181 'wp-api',
182 'wp-api-request',
183 'wp-blocks',
184 'wp-i18n',
185 'wp-element',
186 'wp-editor',
187 ],
188 'enqueue_block_editor_assets',
189 [
190 'in_footer' => false,
191 'localize' => [],
192 'priority' => 16,
193 ]
194 );
195 tribe_asset(
196 $plugin,
197 'tribe-common-gutenberg-elements',
198 'app/elements.js',
199 /**
200 * @todo revise this dependencies
201 */
202 [
203 'react',
204 'react-dom',
205 'wp-components',
206 'wp-api',
207 'wp-api-request',
208 'wp-blocks',
209 'wp-i18n',
210 'wp-element',
211 'wp-editor',
212 ],
213 'enqueue_block_editor_assets',
214 [
215 'in_footer' => false,
216 'localize' => [],
217 'priority' => 17,
218 ]
219 );
220 /**
221 * @todo: figure out why element styles are loading for tickets but not events.
222 */
223 tribe_asset(
224 $plugin,
225 'tribe-common-gutenberg-components',
226 'app/components.js',
227 /**
228 * @todo revise this dependencies
229 */
230 [
231 'react',
232 'react-dom',
233 'wp-components',
234 'wp-api',
235 'wp-api-request',
236 'wp-blocks',
237 'wp-i18n',
238 'wp-element',
239 'wp-editor',
240 ],
241 'enqueue_block_editor_assets',
242 [
243 'in_footer' => false,
244 'localize' => [],
245 'priority' => 17,
246 ]
247 );
248 tribe_asset(
249 $plugin,
250 'tribe-common-gutenberg-elements-styles',
251 'app/elements.css',
252 [],
253 'enqueue_block_editor_assets',
254 [
255 'in_footer' => false,
256 ]
257 );
258 }
259 }
260