Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | Gutenberg Blocks and Template Library by Otter |
Version | 2.0.13 |
Comparing to | |
See all releases |
Code changes from version 2.0.12 to 2.0.13
- CHANGELOG.md +4 -0
- inc/class-registration.php +170 -140
- otter-blocks.php +2 -2
- readme.md +7 -0
- readme.txt +7 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +4 -4
CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.0.12](https://github.com/Codeinwp/otter-blocks/compare/v2.0.11...v2.0.12) (2022-08-25)
|
2 |
|
3 |
- Fix Custom CSS not working with certain selectors
|
1 |
+
##### [Version 2.0.13](https://github.com/Codeinwp/otter-blocks/compare/v2.0.12...v2.0.13) (2022-08-27)
|
2 |
+
|
3 |
+
- Fix JS being loaded everywhere even when not required
|
4 |
+
|
5 |
##### [Version 2.0.12](https://github.com/Codeinwp/otter-blocks/compare/v2.0.11...v2.0.12) (2022-08-25)
|
6 |
|
7 |
- Fix Custom CSS not working with certain selectors
|
inc/class-registration.php
CHANGED
@@ -41,7 +41,17 @@ class Registration {
|
|
41 |
* @var array
|
42 |
*/
|
43 |
public static $scripts_loaded = array(
|
44 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
);
|
46 |
|
47 |
/**
|
@@ -176,145 +186,6 @@ class Registration {
|
|
176 |
wp_style_add_data( 'glidejs-core', 'path', OTTER_BLOCKS_PATH . '/assets/glide/glide.core.min.css' );
|
177 |
wp_register_style( 'glidejs-theme', OTTER_BLOCKS_URL . 'assets/glide/glide.theme.min.css', [], $asset_file['version'] );
|
178 |
wp_style_add_data( 'glidejs-theme', 'path', OTTER_BLOCKS_PATH . '/assets/glide/glide.theme.min.css' );
|
179 |
-
|
180 |
-
if ( ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) || is_admin() ) {
|
181 |
-
return;
|
182 |
-
}
|
183 |
-
|
184 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/circle-counter.asset.php';
|
185 |
-
wp_register_script( 'otter-circle-counter', OTTER_BLOCKS_URL . 'build/blocks/circle-counter.js', $asset_file['dependencies'], $asset_file['version'], true );
|
186 |
-
wp_script_add_data( 'otter-circle-counter', 'defer', true );
|
187 |
-
|
188 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/countdown.asset.php';
|
189 |
-
wp_register_script( 'otter-countdown', OTTER_BLOCKS_URL . 'build/blocks/countdown.js', $asset_file['dependencies'], $asset_file['version'], true );
|
190 |
-
wp_script_add_data( 'otter-countdown', 'defer', true );
|
191 |
-
|
192 |
-
$offset = (float) get_option( 'gmt_offset' );
|
193 |
-
$hours = (int) $offset;
|
194 |
-
$minutes = ( $offset - $hours );
|
195 |
-
$sign = ( $offset < 0 ) ? '-' : '+';
|
196 |
-
$abs_hour = abs( $hours );
|
197 |
-
$abs_mins = abs( $minutes * 60 );
|
198 |
-
$tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
|
199 |
-
|
200 |
-
wp_localize_script(
|
201 |
-
'otter-countdown',
|
202 |
-
'themeisleGutenbergCountdown',
|
203 |
-
array(
|
204 |
-
'i18n' => array(
|
205 |
-
'second' => __( 'Second', 'otter-blocks' ),
|
206 |
-
'seconds' => __( 'Seconds', 'otter-blocks' ),
|
207 |
-
'minute' => __( 'Minute', 'otter-blocks' ),
|
208 |
-
'minutes' => __( 'Minutes', 'otter-blocks' ),
|
209 |
-
'hour' => __( 'Hour', 'otter-blocks' ),
|
210 |
-
'hours' => __( 'Hours', 'otter-blocks' ),
|
211 |
-
'day' => __( 'Day', 'otter-blocks' ),
|
212 |
-
'days' => __( 'Days', 'otter-blocks' ),
|
213 |
-
),
|
214 |
-
'timezone' => $tz_offset,
|
215 |
-
)
|
216 |
-
);
|
217 |
-
|
218 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/form.asset.php';
|
219 |
-
wp_register_script( 'otter-form', OTTER_BLOCKS_URL . 'build/blocks/form.js', $asset_file['dependencies'], $asset_file['version'], true );
|
220 |
-
wp_script_add_data( 'otter-form', 'defer', true );
|
221 |
-
|
222 |
-
wp_localize_script(
|
223 |
-
'otter-form',
|
224 |
-
'themeisleGutenbergForm',
|
225 |
-
array(
|
226 |
-
'reRecaptchaSitekey' => get_option( 'themeisle_google_captcha_api_site_key' ),
|
227 |
-
'root' => esc_url_raw( rest_url() ),
|
228 |
-
'nonce' => wp_create_nonce( 'wp_rest' ),
|
229 |
-
'messages' => array(
|
230 |
-
'submission' => __( 'Form submission from', 'otter-blocks' ),
|
231 |
-
'captcha-not-loaded' => __( 'Captcha is not loaded. Please check your browser plugins to allow the Google reCaptcha.', 'otter-blocks' ),
|
232 |
-
'check-captcha' => __( 'Please check the captcha.', 'otter-blocks' ),
|
233 |
-
'invalid-email' => __( 'The email address is invalid!', 'otter-blocks' ),
|
234 |
-
'already-registered' => __( 'The email was already registered!', 'otter-blocks' ),
|
235 |
-
'try-again' => __( 'Error. Something is wrong with the server! Try again later.', 'otter-blocks' ),
|
236 |
-
'privacy' => __( 'I have read and agreed the privacy statement.', 'otter-blocks' ),
|
237 |
-
),
|
238 |
-
)
|
239 |
-
);
|
240 |
-
|
241 |
-
$apikey = get_option( 'themeisle_google_map_block_api_key' );
|
242 |
-
|
243 |
-
// Don't output anything if there is no API key.
|
244 |
-
if ( null !== $apikey && ! empty( $apikey ) ) {
|
245 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/maps.asset.php';
|
246 |
-
wp_register_script( 'otter-google-map', OTTER_BLOCKS_URL . 'build/blocks/maps.js', $asset_file['dependencies'], $asset_file['version'], true );
|
247 |
-
wp_script_add_data( 'otter-google-map', 'defer', true );
|
248 |
-
wp_register_script( 'google-maps', 'https://maps.googleapis.com/maps/api/js?key=' . esc_attr( $apikey ) . '&libraries=places&callback=initMapScript', array( 'otter-google-map' ), '', true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NoExplicitVersion
|
249 |
-
wp_script_add_data( 'google-maps', 'defer', true );
|
250 |
-
}
|
251 |
-
|
252 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/leaflet-map.asset.php';
|
253 |
-
|
254 |
-
wp_register_script(
|
255 |
-
'otter-leaflet',
|
256 |
-
OTTER_BLOCKS_URL . 'build/blocks/leaflet-map.js',
|
257 |
-
array_merge(
|
258 |
-
$asset_file['dependencies'],
|
259 |
-
array( 'leaflet', 'leaflet-gesture-handling' )
|
260 |
-
),
|
261 |
-
$asset_file['version'],
|
262 |
-
true
|
263 |
-
);
|
264 |
-
|
265 |
-
wp_script_add_data( 'otter-leaflet', 'defer', true );
|
266 |
-
|
267 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/lottie.asset.php';
|
268 |
-
wp_register_script( 'lottie-interactivity', OTTER_BLOCKS_URL . 'assets/lottie/lottie-interactivity.min.js', array( 'lottie-player' ), $asset_file['version'], true );
|
269 |
-
wp_script_add_data( 'lottie-interactivity', 'async', true );
|
270 |
-
|
271 |
-
wp_register_script(
|
272 |
-
'otter-lottie',
|
273 |
-
OTTER_BLOCKS_URL . 'build/blocks/lottie.js',
|
274 |
-
array_merge(
|
275 |
-
$asset_file['dependencies'],
|
276 |
-
array( 'lottie-player', 'lottie-interactivity' )
|
277 |
-
),
|
278 |
-
$asset_file['version'],
|
279 |
-
true
|
280 |
-
);
|
281 |
-
|
282 |
-
wp_script_add_data( 'otter-lottie', 'defer', true );
|
283 |
-
|
284 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/slider.asset.php';
|
285 |
-
|
286 |
-
wp_register_script(
|
287 |
-
'otter-slider',
|
288 |
-
OTTER_BLOCKS_URL . 'build/blocks/slider.js',
|
289 |
-
array_merge(
|
290 |
-
$asset_file['dependencies'],
|
291 |
-
array( 'glidejs' )
|
292 |
-
),
|
293 |
-
$asset_file['version'],
|
294 |
-
true
|
295 |
-
);
|
296 |
-
|
297 |
-
wp_script_add_data( 'otter-slider', 'async', true );
|
298 |
-
|
299 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/tabs.asset.php';
|
300 |
-
wp_register_script( 'otter-tabs', OTTER_BLOCKS_URL . 'build/blocks/tabs.js', $asset_file['dependencies'], $asset_file['version'], true );
|
301 |
-
wp_script_add_data( 'otter-tabs', 'defer', true );
|
302 |
-
|
303 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/popup.asset.php';
|
304 |
-
wp_register_script( 'otter-popup', OTTER_BLOCKS_URL . 'build/blocks/popup.js', $asset_file['dependencies'], $asset_file['version'], true );
|
305 |
-
wp_script_add_data( 'otter-popup', 'defer', true );
|
306 |
-
|
307 |
-
wp_localize_script(
|
308 |
-
'otter-popup',
|
309 |
-
'themeisleGutenberg',
|
310 |
-
array(
|
311 |
-
'isPreview' => is_preview(),
|
312 |
-
)
|
313 |
-
);
|
314 |
-
|
315 |
-
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/progress-bar.asset.php';
|
316 |
-
wp_register_script( 'otter-progress-bar', OTTER_BLOCKS_URL . 'build/blocks/progress-bar.js', $asset_file['dependencies'], $asset_file['version'], true );
|
317 |
-
wp_script_add_data( 'otter-progress-bar', 'defer', true );
|
318 |
}
|
319 |
|
320 |
/**
|
@@ -514,6 +385,165 @@ class Registration {
|
|
514 |
$this->enqueue_dependencies( $block['attrs']['ref'] );
|
515 |
}
|
516 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
}
|
518 |
|
519 |
/**
|
41 |
* @var array
|
42 |
*/
|
43 |
public static $scripts_loaded = array(
|
44 |
+
'circle-counter' => false,
|
45 |
+
'countdown' => false,
|
46 |
+
'form' => false,
|
47 |
+
'google-map' => false,
|
48 |
+
'leaflet-map' => false,
|
49 |
+
'lottie' => false,
|
50 |
+
'slider' => false,
|
51 |
+
'sticky' => false,
|
52 |
+
'tabs' => false,
|
53 |
+
'popup' => false,
|
54 |
+
'progress-bar' => false,
|
55 |
);
|
56 |
|
57 |
/**
|
186 |
wp_style_add_data( 'glidejs-core', 'path', OTTER_BLOCKS_PATH . '/assets/glide/glide.core.min.css' );
|
187 |
wp_register_style( 'glidejs-theme', OTTER_BLOCKS_URL . 'assets/glide/glide.theme.min.css', [], $asset_file['version'] );
|
188 |
wp_style_add_data( 'glidejs-theme', 'path', OTTER_BLOCKS_PATH . '/assets/glide/glide.theme.min.css' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
}
|
190 |
|
191 |
/**
|
385 |
$this->enqueue_dependencies( $block['attrs']['ref'] );
|
386 |
}
|
387 |
}
|
388 |
+
|
389 |
+
if ( ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) || is_admin() ) {
|
390 |
+
return;
|
391 |
+
}
|
392 |
+
|
393 |
+
if ( ! self::$scripts_loaded['circle-counter'] && has_block( 'themeisle-blocks/circle-counter', $post ) ) {
|
394 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/circle-counter.asset.php';
|
395 |
+
wp_register_script( 'otter-circle-counter', OTTER_BLOCKS_URL . 'build/blocks/circle-counter.js', $asset_file['dependencies'], $asset_file['version'], true );
|
396 |
+
wp_script_add_data( 'otter-circle-counter', 'defer', true );
|
397 |
+
}
|
398 |
+
|
399 |
+
if ( ! self::$scripts_loaded['countdown'] && has_block( 'themeisle-blocks/countdown', $post ) ) {
|
400 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/countdown.asset.php';
|
401 |
+
wp_register_script( 'otter-countdown', OTTER_BLOCKS_URL . 'build/blocks/countdown.js', $asset_file['dependencies'], $asset_file['version'], true );
|
402 |
+
wp_script_add_data( 'otter-countdown', 'defer', true );
|
403 |
+
|
404 |
+
$offset = (float) get_option( 'gmt_offset' );
|
405 |
+
$hours = (int) $offset;
|
406 |
+
$minutes = ( $offset - $hours );
|
407 |
+
$sign = ( $offset < 0 ) ? '-' : '+';
|
408 |
+
$abs_hour = abs( $hours );
|
409 |
+
$abs_mins = abs( $minutes * 60 );
|
410 |
+
$tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
|
411 |
+
|
412 |
+
wp_localize_script(
|
413 |
+
'otter-countdown',
|
414 |
+
'themeisleGutenbergCountdown',
|
415 |
+
array(
|
416 |
+
'i18n' => array(
|
417 |
+
'second' => __( 'Second', 'otter-blocks' ),
|
418 |
+
'seconds' => __( 'Seconds', 'otter-blocks' ),
|
419 |
+
'minute' => __( 'Minute', 'otter-blocks' ),
|
420 |
+
'minutes' => __( 'Minutes', 'otter-blocks' ),
|
421 |
+
'hour' => __( 'Hour', 'otter-blocks' ),
|
422 |
+
'hours' => __( 'Hours', 'otter-blocks' ),
|
423 |
+
'day' => __( 'Day', 'otter-blocks' ),
|
424 |
+
'days' => __( 'Days', 'otter-blocks' ),
|
425 |
+
),
|
426 |
+
'timezone' => $tz_offset,
|
427 |
+
)
|
428 |
+
);
|
429 |
+
}
|
430 |
+
|
431 |
+
if ( ! self::$scripts_loaded['form'] && has_block( 'themeisle-blocks/form', $post ) ) {
|
432 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/form.asset.php';
|
433 |
+
wp_register_script( 'otter-form', OTTER_BLOCKS_URL . 'build/blocks/form.js', $asset_file['dependencies'], $asset_file['version'], true );
|
434 |
+
wp_script_add_data( 'otter-form', 'defer', true );
|
435 |
+
|
436 |
+
wp_localize_script(
|
437 |
+
'otter-form',
|
438 |
+
'themeisleGutenbergForm',
|
439 |
+
array(
|
440 |
+
'reRecaptchaSitekey' => get_option( 'themeisle_google_captcha_api_site_key' ),
|
441 |
+
'root' => esc_url_raw( rest_url() ),
|
442 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
443 |
+
'messages' => array(
|
444 |
+
'submission' => __( 'Form submission from', 'otter-blocks' ),
|
445 |
+
'captcha-not-loaded' => __( 'Captcha is not loaded. Please check your browser plugins to allow the Google reCaptcha.', 'otter-blocks' ),
|
446 |
+
'check-captcha' => __( 'Please check the captcha.', 'otter-blocks' ),
|
447 |
+
'invalid-email' => __( 'The email address is invalid!', 'otter-blocks' ),
|
448 |
+
'already-registered' => __( 'The email was already registered!', 'otter-blocks' ),
|
449 |
+
'try-again' => __( 'Error. Something is wrong with the server! Try again later.', 'otter-blocks' ),
|
450 |
+
'privacy' => __( 'I have read and agreed the privacy statement.', 'otter-blocks' ),
|
451 |
+
),
|
452 |
+
)
|
453 |
+
);
|
454 |
+
}
|
455 |
+
|
456 |
+
if ( ! self::$scripts_loaded['google-map'] && has_block( 'themeisle-blocks/google-map', $post ) ) {
|
457 |
+
$apikey = get_option( 'themeisle_google_map_block_api_key' );
|
458 |
+
|
459 |
+
// Don't output anything if there is no API key.
|
460 |
+
if ( null !== $apikey && ! empty( $apikey ) ) {
|
461 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/maps.asset.php';
|
462 |
+
wp_register_script( 'otter-google-map', OTTER_BLOCKS_URL . 'build/blocks/maps.js', $asset_file['dependencies'], $asset_file['version'], true );
|
463 |
+
wp_script_add_data( 'otter-google-map', 'defer', true );
|
464 |
+
wp_register_script( 'google-maps', 'https://maps.googleapis.com/maps/api/js?key=' . esc_attr( $apikey ) . '&libraries=places&callback=initMapScript', array( 'otter-google-map' ), '', true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NoExplicitVersion
|
465 |
+
wp_script_add_data( 'google-maps', 'defer', true );
|
466 |
+
}
|
467 |
+
}
|
468 |
+
|
469 |
+
if ( ! self::$scripts_loaded['leaflet-map'] && has_block( 'themeisle-blocks/leaflet-map', $post ) ) {
|
470 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/leaflet-map.asset.php';
|
471 |
+
|
472 |
+
wp_register_script(
|
473 |
+
'otter-leaflet',
|
474 |
+
OTTER_BLOCKS_URL . 'build/blocks/leaflet-map.js',
|
475 |
+
array_merge(
|
476 |
+
$asset_file['dependencies'],
|
477 |
+
array( 'leaflet', 'leaflet-gesture-handling' )
|
478 |
+
),
|
479 |
+
$asset_file['version'],
|
480 |
+
true
|
481 |
+
);
|
482 |
+
|
483 |
+
wp_script_add_data( 'otter-leaflet', 'defer', true );
|
484 |
+
}
|
485 |
+
|
486 |
+
if ( ! self::$scripts_loaded['lottie'] && has_block( 'themeisle-blocks/lottie', $post ) ) {
|
487 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/lottie.asset.php';
|
488 |
+
wp_register_script( 'lottie-interactivity', OTTER_BLOCKS_URL . 'assets/lottie/lottie-interactivity.min.js', array( 'lottie-player' ), $asset_file['version'], true );
|
489 |
+
wp_script_add_data( 'lottie-interactivity', 'async', true );
|
490 |
+
|
491 |
+
wp_register_script(
|
492 |
+
'otter-lottie',
|
493 |
+
OTTER_BLOCKS_URL . 'build/blocks/lottie.js',
|
494 |
+
array_merge(
|
495 |
+
$asset_file['dependencies'],
|
496 |
+
array( 'lottie-player', 'lottie-interactivity' )
|
497 |
+
),
|
498 |
+
$asset_file['version'],
|
499 |
+
true
|
500 |
+
);
|
501 |
+
|
502 |
+
wp_script_add_data( 'otter-lottie', 'defer', true );
|
503 |
+
}
|
504 |
+
|
505 |
+
if ( ! self::$scripts_loaded['slider'] && has_block( 'themeisle-blocks/slider', $post ) ) {
|
506 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/slider.asset.php';
|
507 |
+
|
508 |
+
wp_register_script(
|
509 |
+
'otter-slider',
|
510 |
+
OTTER_BLOCKS_URL . 'build/blocks/slider.js',
|
511 |
+
array_merge(
|
512 |
+
$asset_file['dependencies'],
|
513 |
+
array( 'glidejs' )
|
514 |
+
),
|
515 |
+
$asset_file['version'],
|
516 |
+
true
|
517 |
+
);
|
518 |
+
|
519 |
+
wp_script_add_data( 'otter-slider', 'async', true );
|
520 |
+
}
|
521 |
+
|
522 |
+
if ( ! self::$scripts_loaded['tabs'] && has_block( 'themeisle-blocks/tabs', $post ) ) {
|
523 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/tabs.asset.php';
|
524 |
+
wp_register_script( 'otter-tabs', OTTER_BLOCKS_URL . 'build/blocks/tabs.js', $asset_file['dependencies'], $asset_file['version'], true );
|
525 |
+
wp_script_add_data( 'otter-tabs', 'defer', true );
|
526 |
+
}
|
527 |
+
|
528 |
+
if ( ! self::$scripts_loaded['popup'] && has_block( 'themeisle-blocks/popup', $post ) ) {
|
529 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/popup.asset.php';
|
530 |
+
wp_register_script( 'otter-popup', OTTER_BLOCKS_URL . 'build/blocks/popup.js', $asset_file['dependencies'], $asset_file['version'], true );
|
531 |
+
wp_script_add_data( 'otter-popup', 'defer', true );
|
532 |
+
|
533 |
+
wp_localize_script(
|
534 |
+
'otter-popup',
|
535 |
+
'themeisleGutenberg',
|
536 |
+
array(
|
537 |
+
'isPreview' => is_preview(),
|
538 |
+
)
|
539 |
+
);
|
540 |
+
}
|
541 |
+
|
542 |
+
if ( ! self::$scripts_loaded['progress-bar'] && has_block( 'themeisle-blocks/progress-bar', $post ) ) {
|
543 |
+
$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/progress-bar.asset.php';
|
544 |
+
wp_register_script( 'otter-progress-bar', OTTER_BLOCKS_URL . 'build/blocks/progress-bar.js', $asset_file['dependencies'], $asset_file['version'], true );
|
545 |
+
wp_script_add_data( 'otter-progress-bar', 'defer', true );
|
546 |
+
}
|
547 |
}
|
548 |
|
549 |
/**
|
otter-blocks.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Plugin Name: Otter – Page Builder Blocks & Extensions for Gutenberg
|
8 |
* Plugin URI: https://themeisle.com/plugins/otter-blocks
|
9 |
* Description: Create beautiful and attracting posts, pages, and landing pages with Otter – Page Builder Blocks & Extensions for Gutenberg. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
|
10 |
-
* Version: 2.0.
|
11 |
* Author: ThemeIsle
|
12 |
* Author URI: https://themeisle.com
|
13 |
* License: GPL-2.0+
|
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
26 |
define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
|
27 |
define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
|
28 |
define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
|
29 |
-
define( 'OTTER_BLOCKS_VERSION', '2.0.
|
30 |
define( 'OTTER_BLOCKS_PRO_SUPPORT', true );
|
31 |
define( 'OTTER_BLOCKS_SHOW_NOTICES', false );
|
32 |
|
7 |
* Plugin Name: Otter – Page Builder Blocks & Extensions for Gutenberg
|
8 |
* Plugin URI: https://themeisle.com/plugins/otter-blocks
|
9 |
* Description: Create beautiful and attracting posts, pages, and landing pages with Otter – Page Builder Blocks & Extensions for Gutenberg. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
|
10 |
+
* Version: 2.0.13
|
11 |
* Author: ThemeIsle
|
12 |
* Author URI: https://themeisle.com
|
13 |
* License: GPL-2.0+
|
26 |
define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
|
27 |
define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
|
28 |
define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
|
29 |
+
define( 'OTTER_BLOCKS_VERSION', '2.0.13' );
|
30 |
define( 'OTTER_BLOCKS_PRO_SUPPORT', true );
|
31 |
define( 'OTTER_BLOCKS_SHOW_NOTICES', false );
|
32 |
|
readme.md
CHANGED
@@ -193,6 +193,13 @@ You can check Otter documentation [here](https://docs.themeisle.com/article/1478
|
|
193 |
|
194 |
## Changelog ##
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
##### [Version 2.0.12](https://github.com/Codeinwp/otter-blocks/compare/v2.0.11...v2.0.12) (2022-08-25)
|
197 |
|
198 |
- Fix Custom CSS not working with certain selectors
|
193 |
|
194 |
## Changelog ##
|
195 |
|
196 |
+
##### [Version 2.0.13](https://github.com/Codeinwp/otter-blocks/compare/v2.0.12...v2.0.13) (2022-08-27)
|
197 |
+
|
198 |
+
- Fix JS being loaded everywhere even when not required
|
199 |
+
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
##### [Version 2.0.12](https://github.com/Codeinwp/otter-blocks/compare/v2.0.11...v2.0.12) (2022-08-25)
|
204 |
|
205 |
- Fix Custom CSS not working with certain selectors
|
readme.txt
CHANGED
@@ -193,6 +193,13 @@ You can check Otter documentation [here](https://docs.themeisle.com/article/1478
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
##### [Version 2.0.12](https://github.com/Codeinwp/otter-blocks/compare/v2.0.11...v2.0.12) (2022-08-25)
|
197 |
|
198 |
- Fix Custom CSS not working with certain selectors
|
193 |
|
194 |
== Changelog ==
|
195 |
|
196 |
+
##### [Version 2.0.13](https://github.com/Codeinwp/otter-blocks/compare/v2.0.12...v2.0.13) (2022-08-27)
|
197 |
+
|
198 |
+
- Fix JS being loaded everywhere even when not required
|
199 |
+
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
##### [Version 2.0.12](https://github.com/Codeinwp/otter-blocks/compare/v2.0.11...v2.0.12) (2022-08-25)
|
204 |
|
205 |
- Fix Custom CSS not working with certain selectors
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInit901bac687959dec77010cad64d80126f::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,18 +24,18 @@ class ComposerAutoloaderInit11cf1072ae18c9f442173f80fae11f4a
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
-
call_user_func(\Composer\Autoload\
|
33 |
|
34 |
$loader->register(true);
|
35 |
|
36 |
-
$includeFiles = \Composer\Autoload\
|
37 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
38 |
-
|
39 |
}
|
40 |
|
41 |
return $loader;
|
@@ -47,7 +47,7 @@ class ComposerAutoloaderInit11cf1072ae18c9f442173f80fae11f4a
|
|
47 |
* @param string $file
|
48 |
* @return void
|
49 |
*/
|
50 |
-
function
|
51 |
{
|
52 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
53 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit901bac687959dec77010cad64d80126f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit901bac687959dec77010cad64d80126f', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit901bac687959dec77010cad64d80126f', 'loadClassLoader'));
|
30 |
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit901bac687959dec77010cad64d80126f::getInitializer($loader));
|
33 |
|
34 |
$loader->register(true);
|
35 |
|
36 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInit901bac687959dec77010cad64d80126f::$files;
|
37 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
38 |
+
composerRequire901bac687959dec77010cad64d80126f($fileIdentifier, $file);
|
39 |
}
|
40 |
|
41 |
return $loader;
|
47 |
* @param string $file
|
48 |
* @return void
|
49 |
*/
|
50 |
+
function composerRequire901bac687959dec77010cad64d80126f($fileIdentifier, $file)
|
51 |
{
|
52 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
53 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'16e4325dd9bdbbd2ce8c9530b088e50b' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
@@ -172,9 +172,9 @@ class ComposerStaticInit11cf1072ae18c9f442173f80fae11f4a
|
|
172 |
public static function getInitializer(ClassLoader $loader)
|
173 |
{
|
174 |
return \Closure::bind(function () use ($loader) {
|
175 |
-
$loader->prefixLengthsPsr4 =
|
176 |
-
$loader->prefixDirsPsr4 =
|
177 |
-
$loader->classMap =
|
178 |
|
179 |
}, null, ClassLoader::class);
|
180 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit901bac687959dec77010cad64d80126f
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'16e4325dd9bdbbd2ce8c9530b088e50b' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
172 |
public static function getInitializer(ClassLoader $loader)
|
173 |
{
|
174 |
return \Closure::bind(function () use ($loader) {
|
175 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit901bac687959dec77010cad64d80126f::$prefixLengthsPsr4;
|
176 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit901bac687959dec77010cad64d80126f::$prefixDirsPsr4;
|
177 |
+
$loader->classMap = ComposerStaticInit901bac687959dec77010cad64d80126f::$classMap;
|
178 |
|
179 |
}, null, ClassLoader::class);
|
180 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/otter-blocks',
|
4 |
-
'pretty_version' => '2.0.
|
5 |
-
'version' => '2.0.
|
6 |
'reference' => NULL,
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
@@ -11,8 +11,8 @@
|
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/otter-blocks' => array(
|
14 |
-
'pretty_version' => '2.0.
|
15 |
-
'version' => '2.0.
|
16 |
'reference' => NULL,
|
17 |
'type' => 'wordpress-plugin',
|
18 |
'install_path' => __DIR__ . '/../../',
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/otter-blocks',
|
4 |
+
'pretty_version' => '2.0.13',
|
5 |
+
'version' => '2.0.13.0',
|
6 |
'reference' => NULL,
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/otter-blocks' => array(
|
14 |
+
'pretty_version' => '2.0.13',
|
15 |
+
'version' => '2.0.13.0',
|
16 |
'reference' => NULL,
|
17 |
'type' => 'wordpress-plugin',
|
18 |
'install_path' => __DIR__ . '/../../',
|