| 1 |
<?php defined( 'ABSPATH' ) || exit; ?> |
| 2 |
|
| 3 |
<!DOCTYPE html> |
| 4 |
<html <?php language_attributes(); ?>> |
| 5 |
<head> |
| 6 |
<title><?php echo esc_attr($title); ?></title> |
| 7 |
<meta charset='utf-8'> |
| 8 |
|
| 9 |
<meta content='width=device-width, initial-scale=1' name='viewport'> |
| 10 |
<meta content='yes' name='apple-mobile-web-app-capable'> |
| 11 |
<meta name="description" content="<?php echo esc_attr($description); ?>"> |
| 12 |
<meta name="robots" content="noindex"> |
| 13 |
|
| 14 |
<link rel="icon" type="image/x-icon" href="<?php echo esc_url($author['avatar']); ?>" /> |
| 15 |
|
| 16 |
<meta property="og:title" content="<?php echo esc_attr($title); ?>"> |
| 17 |
<meta property="og:type" content="website"> |
| 18 |
<meta property="og:url" content="<?php echo esc_url($url); ?>"> |
| 19 |
<meta property="og:description" content="<?php echo esc_attr($description); ?>"> |
| 20 |
<meta property="og:author" content="<?php echo esc_attr($author['name']); ?>"> |
| 21 |
|
| 22 |
<?php foreach ($css_files as $css_file): ?> |
| 23 |
<link rel="stylesheet" href="<?php echo esc_url($css_file); ?>?version=<?php echo esc_attr(FLUENT_BOOKING_ASSETS_VERSION); ?>" media="all" /> |
| 24 |
<?php endforeach; ?> |
| 25 |
</head> |
| 26 |
<body class="booking-confirmation-page"> |
| 27 |
|
| 28 |
<div class="confirmation_page"> |
| 29 |
<div class="fcal_conf_wrap"> |
| 30 |
<?php echo $body; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 31 |
</div> |
| 32 |
<div class="fcal_back_btn"> |
| 33 |
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left h-5 w-5 rtl:rotate-180"> |
| 34 |
<path d="m15 18-6-6 6-6"></path> |
| 35 |
</svg> |
| 36 |
<a href="<?php echo esc_url(site_url('/')); ?>"><?php esc_html_e('Back to home', 'fluent-booking'); ?></a> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
|
| 40 |
<script> |
| 41 |
<?php foreach ($js_vars as $varKey => $values): ?> |
| 42 |
var <?php echo esc_attr($varKey); ?> = <?php echo wp_json_encode($values); ?>; |
| 43 |
<?php endforeach; ?> |
| 44 |
</script> |
| 45 |
|
| 46 |
<?php foreach ($js_files as $fileKey => $file): ?> |
| 47 |
<script id="<?php echo esc_attr($fileKey); ?>" src="<?php echo esc_url($file); ?>" defer="defer"></script> |
| 48 |
<?php endforeach; ?> |
| 49 |
|
| 50 |
<script> |
| 51 |
const theme = '<?php echo esc_attr($theme); ?>'; |
| 52 |
|
| 53 |
const confirmationPage = document.querySelector('.confirmation_page'); |
| 54 |
function applyModeClasses(element, darkMode) { |
| 55 |
const darkClass = 'fcal-dark-mode'; |
| 56 |
const lightClass = 'fcal-light-mode'; |
| 57 |
|
| 58 |
if (element) { |
| 59 |
if (darkMode) { |
| 60 |
element.classList.add(darkClass); |
| 61 |
element.classList.remove(lightClass); |
| 62 |
} else { |
| 63 |
element.classList.add(lightClass); |
| 64 |
element.classList.remove(darkClass); |
| 65 |
} |
| 66 |
} |
| 67 |
} |
| 68 |
|
| 69 |
if (confirmationPage) { |
| 70 |
if (theme === 'system-default') { |
| 71 |
const runColorMode = (fn) => { |
| 72 |
if (!window.matchMedia) { |
| 73 |
return; |
| 74 |
} |
| 75 |
const query = window.matchMedia('(prefers-color-scheme: dark)'); |
| 76 |
fn(query.matches); |
| 77 |
query.addEventListener('change', (event) => fn(event.matches)); |
| 78 |
}; |
| 79 |
|
| 80 |
runColorMode((isDarkMode) => { |
| 81 |
applyModeClasses(confirmationPage, isDarkMode); |
| 82 |
}); |
| 83 |
} else if (theme === 'dark-mode') { |
| 84 |
applyModeClasses(confirmationPage, true); |
| 85 |
} else { |
| 86 |
applyModeClasses(confirmationPage, false); |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
</script> |
| 91 |
</body> |
| 92 |
</html> |
| 93 |
|