PluginProbe
WP Directory Kit / 1.3.3
WP Directory Kit v1.3.3
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / elementor-elements / views / wdk-categories-grid-cover.php

wdk-categories-grid-cover.php in WP Directory Kit 1.3.3, at elementor-elements/views/wdk-categories-grid-cover.php

162 lines 9.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Element categories Grid Cover.
4 * This is the template that elementor element categories, images, links
5 *
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 ?>
13
14 <?php
15 $results_page = wmvc_show_data('conf_link', $settings);
16 if(!is_array($results_page) && !empty($results_page)) {
17 $results_page = get_permalink($results_page);
18 } else {
19 $results_page = get_permalink(wdk_get_option('wdk_results_page'));
20 }
21 ?>
22
23 <div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>">
24 <div class="wdk-categories-grid-cover">
25
26 <?php if($settings['enable_carousel'] == 'yes'):?>
27 <div class="wdk_slider_box <?php echo esc_attr($settings['layout_carousel_animation_style']).'_animation';?> <?php echo join(' ', [$settings['styles_carousel_dots_position_style'], $settings['styles_carousel_arrows_position']]);?>">
28 <div class="wdk_slider_body">
29 <div class="wdk_slider_ini">
30 <?php else:?>
31 <div class="wdk-row <?php if(isset($settings['is_mobile_view_enable']) && $settings['is_mobile_view_enable'] == 'yes'):?> WdkScrollMobileSwipe_enable <?php endif;?>">
32 <?php endif;?>
33
34 <?php if(count($results) > 0):?>
35 <?php foreach ($results as $key => $value):?>
36 <div class="wdk-col">
37 <div class="wdk-categories-card-cover">
38 <?php if(wmvc_show_data('layout_image_type', $settings) == 'icon'):?>
39 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'icon_id', 'icon_path'));?>" alt="<?php echo wmvc_show_data('category_title', $value);?>" class="wdk-icon">
40 <?php else:?>
41 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'image_id', 'image_path'));?>" alt="<?php echo wmvc_show_data('category_title', $value);?>" class="wdk-image">
42 <?php endif;?>
43 <div class="wdk-categories-card-body">
44 <div class="wdk-action-left">
45 <?php if(wmvc_show_data('content_icon_type', $settings) == 'image' && wdk_image_src($value, 'full', NULL,'icon_id')):?>
46 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'icon_id', 'icon_path'));?>" alt="<?php echo wmvc_show_data('category_title', $value);?>">
47 <?php elseif(wmvc_show_data('content_icon_type', $settings) == 'font'):?>
48 <i class="<?php echo wmvc_show_data('font_icon_code', $value,'');?>"></i>
49 <?php endif;?>
50 </div>
51 <div class="wdk-left-content">
52 <h3 class="wdk-title"><?php echo wmvc_show_data('category_title', $value);?></h3>
53 <span class="wdk-listings-count">
54 <?php
55 echo esc_html(wdk_sprintf(_nx(
56 '%1$s Listing',
57 '%1$s Listings',
58 wmvc_show_data('listings_counter', $value, '0'),
59 'profile listings count',
60 'wpdirectorykit'
61 ), wmvc_show_data('listings_counter', $value, '0')));
62 ?>
63 </span>
64 </div>
65 <div class="wdk-action-right">
66 <a class="wdk-category-btn" href="<?php echo esc_url(wdk_url_suffix($results_page,'search_category='.wmvc_show_data('idcategory', $value)));?>#results">
67 <?php \Elementor\Icons_Manager::render_icon( $settings['link_icon'], [ 'aria-hidden' => 'true' ] ); ?>
68 </a>
69 </div>
70 </div>
71 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_category='.wmvc_show_data('idcategory', $value)));?>#results" class="wdk-link"></a>
72 <div class="mask"></div>
73 <div class="overlay"></div>
74 </div>
75 </div>
76 <?php endforeach;?>
77 <?php else:?>
78 <div class="wdk-col wdk-col-full wdk-col-full-always">
79 <p class="wdk_alert wdk_alert-danger"><?php echo esc_html__('categories not found', 'wpdirectorykit');?></p>
80 </div>
81 <?php endif;?>
82
83 <?php if($settings['enable_carousel'] == 'yes'):?>
84 </div>
85 <div class="wdk_slider_arrows">
86 <a class="wdk-slider-prev wdk_lr_slider_arrow">
87 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_left'], [ 'aria-hidden' => 'true' ] ); ?>
88 </a>
89 <a class="wdk-slider-next wdk_lr_slider_arrow">
90 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_right'], [ 'aria-hidden' => 'true' ] ); ?>
91 </a>
92 </div>
93 </div>
94 </div>
95 <?php else:?>
96 </div>
97 <?php endif;?>
98 </div>
99 <?php if($settings['enable_carousel'] == 'yes'):?>
100 <script>
101 jQuery(document).ready(function($){
102 var el = $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_slider_ini').slick({
103 dots: true,
104 arrows: true,
105 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns', $settings, '3')))) ? wmvc_show_data('layout_carousel_columns', $settings, '3') : 3;?>,
106 slidesToScroll: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns', $settings, '3')))) ? wmvc_show_data('layout_carousel_columns', $settings, '3') : 3;?>,
107 <?php if(!empty(wmvc_show_data('layout_carousel_is_infinite', $settings))):?>
108 infinite: <?php echo wmvc_show_data('layout_carousel_is_infinite', $settings, 'true');?>,
109 <?php endif;?>
110 <?php if(!empty(wmvc_show_data('layout_carousel_is_autoplay', $settings))):?>
111 autoplay: <?php echo wmvc_show_data('layout_carousel_is_autoplay', $settings, 'false');?>,
112 <?php endif;?>
113 nextArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_slider_arrows .wdk-slider-next'),
114 prevArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_slider_arrows .wdk-slider-prev'),
115 customPaging: function(slider, i) {
116 // this example would render "tabs" with titles
117 return '<span class="wdk_lr_dot"><?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_dots_icon'], [ 'aria-hidden' => 'true' ] ); ?></span>';
118 },
119 responsive: [
120 {
121 breakpoint: 991,
122 settings: {
123 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_tablet', $settings, '2')))) ? wmvc_show_data('layout_carousel_columns_tablet', $settings, '2') : 2;?>,
124 slidesToScroll: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_tablet', $settings, '2')))) ? wmvc_show_data('layout_carousel_columns_tablet', $settings, '2') : 2;?>,
125 }
126 },
127 {
128 breakpoint: 768,
129 settings: {
130 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_mobile', $settings, '1')))) ? wmvc_show_data('layout_carousel_columns_mobile', $settings, '1') : 1;?>,
131 slidesToScroll: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_mobile', $settings, '1')))) ? wmvc_show_data('layout_carousel_columns_mobile', $settings, '1') : 1;?>,
132 }
133 },
134 ]
135 }).on('breakpoint', function(event, slick, breakpoint){
136 wdk_result_listings_thumbnail_slider(el);
137
138 if (typeof wdk_favorite == 'function') {
139 wdk_favorite('.wdk_slider_ini');
140 }
141
142 if (typeof wdk_init_compare_elem == 'function') {
143 wdk_init_compare_elem();
144 }
145 });
146
147 wdk_slick_slider_init(el, ()=>{
148 wdk_result_listings_thumbnail_slider(el);
149
150 if (typeof wdk_favorite == 'function') {
151 wdk_favorite('.wdk_slider_ini');
152 }
153
154 if (typeof wdk_init_compare_elem == 'function') {
155 wdk_init_compare_elem();
156 }
157 });
158 })
159 </script>
160 <?php endif;?>
161 </div>
162