| @@ -1,6 +1,22 @@ | ||
| 1 | -<?php defined( 'ABSPATH' ) || exit; ?> | |
| 1 | +<?php | |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 2 | 3 | |
| 4 | +/** | |
| 5 | + * @var string $title | |
| 6 | + * @var string $body | |
| 7 | + * @var string $description | |
| 8 | + * @var array $author | |
| 9 | + * @var string $url | |
| 10 | + * @var bool $embedded | |
| 11 | + * @var string $theme | |
| 12 | + * @var array $back_button | |
| 13 | + * @var array $css_files | |
| 14 | + * @var array $js_files | |
| 15 | + * @var array $js_vars | |
| 16 | + */ | |
| 17 | +?> | |
| 18 | + | |
| 3 | 19 | <!DOCTYPE html> |
| 4 | 20 | <html <?php language_attributes(); ?>> |
| 5 | 21 | <head> |
| 6 | 22 | <title><?php echo esc_attr($title); ?></title> |
| @@ -46,9 +62,9 @@ | ||
| 46 | 62 | <?php endforeach; ?> |
| 47 | 63 | </script> |
| 48 | 64 | |
| 49 | 65 | <?php foreach ($js_files as $fluentBookingFileKey => $fluentBookingFile): ?> |
| 50 | - <script id="<?php echo esc_attr($fluentBookingFileKey); ?>" src="<?php echo esc_url($fluentBookingFile); ?>" defer="defer"></script> | |
| 66 | + <script id="<?php echo esc_attr($fluentBookingFileKey); ?>"<?php echo \FluentBooking\App\Vite::isDev() ? ' type="module"' : ''; ?> src="<?php echo esc_url($fluentBookingFile); ?>" defer="defer"></script> | |
| 51 | 67 | <?php endforeach; ?> |
| 52 | 68 | |
| 53 | 69 | <script> |
| 54 | 70 | const theme = '<?php echo esc_attr($theme); ?>'; |