| @@ -1,9 +1,21 @@ | ||
| 1 | 1 | <?php |
| 2 | - /* | |
| 3 | - * @var $booking \FluentBooking\App\Models\Booking | |
| 4 | - */ | |
| 5 | - defined( 'ABSPATH' ) || exit; | |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 3 | + | |
| 4 | +use FluentBooking\App\Models\Booking; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * @var Booking $booking | |
| 8 | + * @var string $title | |
| 9 | + * @var string $sub_heading | |
| 10 | + * @var array $sections | |
| 11 | + * @var string $confirm_icon | |
| 12 | + * @var string $extra_html | |
| 13 | + * @var string $action_type | |
| 14 | + * @var string $action_url | |
| 15 | + * @var array $cancel_field | |
| 16 | + * @var array $bookmarks | |
| 17 | + */ | |
| 6 | 18 | ?> |
| 7 | 19 | |
| 8 | 20 | <div class="fcal_confirmation"> |
| 9 | 21 | <?php do_action('fluent_booking/booking_details_header', $booking); ?> |
| @@ -18,16 +30,18 @@ | ||
| 18 | 30 | <h2><?php echo esc_html($title); ?></h2> |
| 19 | 31 | <p><?php echo wp_kses_post($sub_heading); ?></p> |
| 20 | 32 | </div> |
| 21 | 33 | <div class="fcal_confirm_body"> |
| 22 | - <?php foreach ($sections as $section): ?> | |
| 34 | + <?php foreach ($sections as $fluentBookingSection): ?> | |
| 23 | 35 | <div class="fcal_confirm_section"> |
| 24 | 36 | <div class="fcal_confirm_section_title"> |
| 25 | - <h4><?php echo esc_html($section['title']); ?></h4> | |
| 37 | + <h4><?php echo esc_html($fluentBookingSection['title']); ?></h4> | |
| 26 | 38 | </div> |
| 27 | - <div class="fcal_confirm_section_content"> | |
| 28 | - <?php echo wp_kses_post($section['content']); ?> | |
| 29 | - </div> | |
| 39 | + <?php foreach ((array)$fluentBookingSection['content'] as $fluentBookingContent) : ?> | |
| 40 | + <div class="fcal_confirm_section_content"> | |
| 41 | + <?php echo wp_kses_post($fluentBookingContent); ?> | |
| 42 | + </div> | |
| 43 | + <?php endforeach; ?> | |
| 30 | 44 | </div> |
| 31 | 45 | <?php endforeach; ?> |
| 32 | 46 | |
| 33 | 47 | <?php if($extra_html): ?> |
| @@ -89,12 +103,12 @@ | ||
| 89 | 103 | <?php if ($bookmarks): ?> |
| 90 | 104 | <div class="fcal_booking_manage fcal_to_calendars"> |
| 91 | 105 | <span><?php esc_html_e('Add to calendar', 'fluent-booking'); ?></span> |
| 92 | 106 | <div class="fcal_cal_items"> |
| 93 | - <?php foreach ($bookmarks as $bookmark): ?> | |
| 94 | - <div title="<?php echo esc_attr($bookmark['title']); ?>"> | |
| 95 | - <a href="<?php echo esc_url($bookmark['url']); ?>" target="_blank" rel="noopener"> | |
| 96 | - <img style="width: 20px; height: 20px;" src="<?php echo esc_url($bookmark['icon']); ?>" alt="<?php echo esc_attr($bookmark['title']); ?>"/> | |
| 107 | + <?php foreach ($bookmarks as $fluentBookingBookmark): ?> | |
| 108 | + <div title="<?php echo esc_attr($fluentBookingBookmark['title']); ?>"> | |
| 109 | + <a href="<?php echo esc_url($fluentBookingBookmark['url']); ?>" target="_blank" rel="noopener"> | |
| 110 | + <img style="width: 20px; height: 20px;" src="<?php echo esc_url($fluentBookingBookmark['icon']); ?>" alt="<?php echo esc_attr($fluentBookingBookmark['title']); ?>"/> | |
| 97 | 111 | </a> |
| 98 | 112 | </div> |
| 99 | 113 | <?php endforeach; ?> |
| 100 | 114 | </div> |