PluginProbe
Ovation Elements / 1.1.6
Ovation Elements v1.1.6
1.2.7 1.2.6 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 All 27 releases
ovation-elements / includes / slider-shortcode-template6.php

slider-shortcode-template6.php in Ovation Elements 1.1.6, at includes/slider-shortcode-template6.php

313 lines 19.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit; // Exit if accessed directly.
4 }
5
6 global $ova_elems_template;
7 $ova_elems_template = 'template6';
8
9
10 $slide_images = array();
11 $slide_background_colors = array();
12
13 if (!empty($slides)) {
14 foreach ($slides as $slide) {
15 if (!empty($slide['image_id'])) {
16 $slide_images[] = wp_get_attachment_url($slide['image_id']);
17 }
18 // Store background colors if defined
19 if (!empty($slide['slide_bg_color'])) {
20 $slide_background_colors[] = $slide['slide_bg_color'];
21 } else {
22 $slide_background_colors[] = '#2d4373'; // Default color
23 }
24 }
25 }
26
27 // Prepare dynamic settings for the slider
28 $dynamic_settings = [
29 'autoplay' => (!empty($static_settings['autoplay']) && $static_settings['autoplay'] == '1') ? ($static_settings['autoplay_delay'] ?? 1000) : false, // Autoplay delay
30 'effect' => $static_settings['effect'] ?? 'fade',
31 'crossFade' => !empty($static_settings['fade_crossfade']),
32 'lazyLoad' => !empty($static_settings['lazy_load']) && $static_settings['lazy_load'] == '1' ? true : false,
33 'autoplay_delay' => isset($static_settings['autoplay_delay']) ? absint($static_settings['autoplay_delay']) : 1000,
34 ];
35
36 wp_enqueue_style('ova-elems-style6', OVA_ELEMS_URL . 'assets/css/style6.css', array(), OVA_ELEMS_VER);
37 wp_enqueue_script('ova-elems-template-6-frontend-scripts', OVA_ELEMS_URL . 'assets/js/template-6-scripts.js', array('jquery'), OVA_ELEMS_VER, true);
38 // Localize the script
39 wp_localize_script('ova-elems-template-6-frontend-scripts', 'template6SliderConfig', $dynamic_settings);
40
41 wp_localize_script('ova-elems-template-6-frontend-scripts', 'sliderData', array(
42 'images' => $slide_images,
43 'background_colors' => $slide_background_colors,
44 ));
45
46 $index = 1;
47 ?>
48
49
50 <section id="oe-restaurant-slider-main-box" class="oe-restaurant-slider-main-box_self">
51 <div id="carouselExampleIndicators" class="carousel slide carousel-fade" data-bs-ride="" data-bs-interval="1500">
52 <div class="carousel-inner" role="listbox">
53
54 <div>
55 <div class="inner_carousel " id="slidemainbox">
56 <div id="slider-background"
57 class="oe-restaurant-slider-bg-image slider-main-image-<?php echo esc_attr($post->ID); ?>-<?php echo esc_attr($index); ?> position-relative"
58 style="background-image: url('<?php echo esc_url($first_slide_image_url); ?>');">
59
60
61 <div class="">
62 <div class="oe-restaurant-slider-content-outer-box position-relative">
63 <div class="row">
64 <div class="swiper-container">
65 <div class="swiper-wrapper">
66 <!-- This will hold all the slides -->
67 <?php if (!empty($slides)) : ?>
68 <?php foreach ($slides as $index => $slide): ?>
69 <!-- sliding functionality start -->
70 <div class="swiper-slide">
71 <div
72 class="col-xl-6 col-lg-7 col-md-12 col-sm-12 col-12 oe-restaurant-slider-content-inner-box align-self-center">
73 <div class="oe-restaurant-slider-banner-content-box">
74 <div
75 class="d-flex flex-column gap-2 oe-restaurant-slider-banner-content-main">
76
77 <div
78 class="d-flex justify-content-md-start justify-content-sm-center justify-content-center align-items-center">
79 <span
80 class="oe-restaurant-slider-icon-img me-2 ms-0 position-relative">
81 <div class="oe-restaurant-slider-icon">
82 <img src="<?php echo esc_url(wp_get_attachment_url($slide['mini_head_image'])); ?>"
83 alt="">
84 </div>
85 </span>
86 <span
87 class="oe-restaurant-slider-sub-head ovheadtag-<?php echo esc_attr($post_id); ?>">
88 <?php echo esc_html($slide['head_tag']); ?>
89 </span>
90 </div>
91 <div class="oe-restaurant-slider-banner-heading-box">
92 <h1
93 class="oe-restaurant-slider-banner-main-head text-md-start text-sm-center text-center title-<?php echo esc_attr($post_id); ?>">
94 <?php echo esc_html($slide['title']); ?>
95 </h1>
96 </div>
97 <p
98 class="oe-restaurant-slider-banner-sec-para text-lg-left text-md-start text-sm-center text-center description-<?php echo esc_attr($post_id); ?>">
99 <?php echo esc_html($slide['description']); ?>
100 </p>
101 <div
102 class="d-flex gap-md-4 gap-sm-2 gap-2 align-items-center oe-restaurant-slider-banner-btn-box pt-3 ">
103 <a class="oe-restaurant-slider-explore-btn slider-btn-<?php echo esc_attr($post_id); ?>"
104 href="<?php echo esc_url($slide['button_url']); ?>">
105 <?php echo esc_html($slide['button_text']); ?>
106 </a>
107 <a class="oe-restaurant-slider-appointement-btn slider-btn-<?php echo esc_attr($post_id); ?>"
108 href="<?php echo esc_url($slide['button2_url']); ?>">
109 <?php echo esc_html($slide['button2_text']); ?>
110 </a>
111 </div>
112 </div>
113 </div>
114 </div>
115
116 </div>
117 <!-- sliding functionality end -->
118 <?php endforeach; ?>
119 <?php endif; ?>
120 </div> <!-- End of swiper-wrapper -->
121 </div> <!-- End of swiper-container -->
122
123
124
125 </div>
126 </div>
127
128 <div class="row oe-restaurant-slider-details-content-box">
129
130
131 <!-- neww added for counter -->
132 <div class="slider-counter">
133 <span id="current-slide">01</span> <span
134 style="color: white ; font-size : 1.5rem">/</span><span
135 id="total-slides"><?php echo count($slides); ?></span>
136 </div>
137 <!-- ended -->
138
139 <div class="col-xl-8 col-lg-8 oe-restaurant-slider-address-content-box">
140 <div class="slider-nav-arrow">
141
142 <!-- <div class="swiper-pagination"></div> -->
143 <div class="swiper-button-next"></div>
144 <div class="swiper-button-prev"></div>
145 <!-- <a class="carousel-control-prev" data-bs-target="#carouselExampleIndicators" role="button" data-bs-slide-to="prev">
146 <i class="fa-solid fa-angle-left slider-icon"></i>
147 <span class="carousel-control-prev-icon visually-hidden" aria-hidden="true">
148 </span>
149 </a>
150 <a class="carousel-control-next" data-bs-target="#carouselExampleIndicators" role="button" data-bs-slide-to="next">
151 <i class="fa-solid fa-angle-right slider-icon"></i>
152 <span class="carousel-control-next-icon visually-hidden" aria-hidden="true">
153 </span>
154 </a> -->
155
156 </div>
157 <div class="row oe-restaurant-slider-address-outer-box">
158 <div
159 class="col-xl-6 col-lg-6 col-md-9 col-sm-8 col-12 mb-md-4 mb-lg-0 oe-restaurant-slider-address d-flex">
160 <div class="oe-restaurant-slider-address-icon align-self-center">
161 <img src="<?php echo esc_url(isset($static_settings['mini_images_1'][0]) ? wp_get_attachment_url($static_settings['mini_images_1'][0]) : ''); ?>"
162 alt="">
163 </div>
164 <div class="oe-restaurant-slider-address-box ms-3">
165 <p class="oe-restaurant-slider-address-title ov-mini-imp">
166 <?php echo esc_html($static_settings['mini_titles'][0] ?? 'Restaurant Address'); ?>
167 </p>
168 <p class="oe-restaurant-slider-address-para ov-mini-description">
169 <?php echo esc_html($static_settings['mini_descriptions'][0] ?? 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'); ?>
170 </p>
171 </div>
172 </div>
173
174 <div
175 class="col-xl-6 col-lg-6 col-md-9 col-sm-8 col-12 pt-md-0 pt-sm-3 oe-restaurant-slider-call d-flex">
176 <div class="oe-restaurant-slider-call-icon ">
177 <img src="<?php echo esc_url(isset($static_settings['mini_images_2'][0]) ? wp_get_attachment_url($static_settings['mini_images_2'][0]) : ''); ?>"
178 alt="">
179 </div>
180 <div class="oe-restaurant-slider-call-box ms-3">
181 <p class="oe-restaurant-slider-call-title ov-mini-imp">
182 <?php echo esc_html($static_settings['mini_title2'][0] ?? 'Call For Us'); ?>
183 </p>
184 <p class="oe-restaurant-slider-call-para ov-mini-description">
185 <?php echo esc_html($static_settings['slide_no'] ?? '+12 3456789123'); ?>
186 </p>
187 </div>
188 </div>
189 </div>
190 <!-- vedio content -->
191 <div id="vedio-img-box"
192 class="col-xl-1 col-lg-2 oe-restaurant-slider-video-content-box p-0"
193 style="background-image: url('<?php echo esc_url(isset($static_settings['video_bg_image']) ? $static_settings['video_bg_image'] : ''); ?>');">
194 <div class="oe-restaurant-slider-video-box">
195 <a class="oe-restaurant-slider-video-btn myVideoBtns"
196 data-url="<?php echo esc_url(isset($static_settings['slide_video_url']) ? $static_settings['slide_video_url'] : '#'); ?>"
197 href="#">
198 <i class="fa fa-play"></i>
199 </a>
200 </div>
201
202 <!-- Video Modal -->
203 <div id="myVideoNewModals" class="modal-new animated fadeInDownBig delay-1000"
204 style="display: none;">
205 <div class="modal-contents">
206 <button class="close-one">&times;<span
207 class="screen-reader-text"><?php echo esc_html('Close button'); ?></span></button>
208 <iframe id="videoEmbed" width="100%" height="345" frameborder="0"
209 allowfullscreen></iframe>
210 </div>
211 </div>
212 </div>
213
214 <!-- vedio content end -->
215 </div>
216
217
218 <div
219 class="col-xl-4 col-lg-4 oe-restaurant-slider-review-content-box p-0 position-relative">
220 <div class="oe-restaurant-slider-review-outer-box">
221 <div class="oe-restaurant-slider-review-box d-flex">
222 <div class="oe-restaurant-slider-review-image align-self-center">
223 <img src="<?php echo esc_url(isset($static_settings['corner_images'][0]) ? wp_get_attachment_url($static_settings['corner_images'][0]) : ''); ?>"
224 alt="">
225
226 </div>
227 <div
228 class="oe-restaurant-slider-review-text text-sm-start text-center align-self-center">
229 <p class="oe-restaurant-slider-review-count review-font">
230 <?php echo esc_html($static_settings['ov_template_review_no'] ?? '05k+'); ?>
231 </p>
232 <p class="oe-restaurant-slider-review-count-text review-text-font">
233 <?php echo esc_html($static_settings['ov_template_review_text'] ?? 'Tourist Review'); ?>
234 </p>
235 </div>
236 </div>
237
238 <div class="oe-restaurant-slider-special-box">
239 <p class="oe-restaurant-slider-special-title slide-list">
240 <?php echo esc_html($static_settings['list_title'] ?? 'Daily Specials'); ?>
241 </p>
242 <p class="oe-restaurant-slider-special-text slide-desc">
243 <?php echo esc_html($static_settings['list_description'] ?? 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'); ?>
244 </p>
245
246 <div class="oe-restaurant-slider-special-points-box ">
247 <ul style="padding-left: 18px;">
248 <?php
249 if (!empty($static_settings['enter_list'])) {
250 foreach ($static_settings['enter_list'] as $item) {
251 echo '<li class="slide-list-content">' . esc_html($item) . '</li>';
252 }
253 } else {
254 echo '<li>BBQ Ribs</li><li>Grilled Salmon</li><li>Cavatappi Pasta</li><li>Summertime Pesto Pasta</li>';
255 }
256 ?>
257 </ul>
258 </div>
259 </div>
260 </div>
261 </div>
262
263 </div>
264
265
266 </div>
267
268
269
270 </div>
271 <div class="icon-list-box">
272 <div class="icons-list">
273 <div class="icons"><a
274 href="<?php echo esc_url($static_settings['facebook_url'] ?? '#'); ?>" target="_blank"><i
275 class="fa-brands fa-facebook-f"></i></a></div>
276 <div class="icons"><a
277 href="<?php echo esc_url($static_settings['instagram_url'] ?? '#'); ?>" target="_blank"><i
278 class="fa-brands fa-instagram"></i></a></div>
279 <div class="icons"><a
280 href="<?php echo esc_url($static_settings['youtube_url'] ?? '#'); ?>" target="_blank"><i
281 class="fa-brands fa-youtube"></i></a></div>
282 <div class="icons"><a
283 href="<?php echo esc_url($static_settings['basketball_url'] ?? '#'); ?>" target="_blank"><i
284 class="fa-solid fa-basketball"></i></a></div>
285 <div class="icons"><a
286 href="<?php echo esc_url($static_settings['twitter_url'] ?? '#'); ?>" target="_blank"><i
287 class="fa-brands fa-twitter"></i></a></div>
288 </div>
289 </div>
290
291 </div>
292 </div>
293
294
295 </div>
296
297
298
299
300
301 </div>
302
303
304 </section>
305
306
307
308 <script>
309 // left menu
310 jQuery(".Show").on('click', function() {
311 jQuery(".left_menu_col").toggleClass("open");
312 });
313 </script>