PluginProbe
WP Directory Kit / 1.2.7
WP Directory Kit v1.2.7
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-locations-tree.php

wdk-locations-tree.php in WP Directory Kit 1.2.7, at elementor-elements/views/wdk-locations-tree.php

79 lines 4.8 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 List.
4 * This is the template that elementor element list, locations results
5 *
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 ?>
13 <?php
14 $results_page = wmvc_show_data('conf_link', $settings);
15 if(!is_array($results_page) && !empty($results_page)) {
16 $results_page = get_permalink($results_page);
17 } else {
18 $results_page = get_permalink(wdk_get_option('wdk_results_page'));
19 }
20 ?>
21
22 <div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>">
23 <div class="wdk-locations-tree">
24
25 <div class="wdk-row">
26 <?php if(!empty($locations)):?>
27 <div class="wdk-col">
28 <div class="location-block">
29 <?php foreach ($locations as $key => $value):?>
30 <?php if(wmvc_show_data('parent_id', $value) == 0):?>
31
32 <?php if($key != 0):?>
33 </ul>
34 </div>
35 </div>
36 <div class="wdk-col">
37 <div class="location-block">
38 <?php endif;?>
39
40 <h3 class="title <?php if(wmvc_show_data('show_icon', $settings) == 'yes' && wmvc_show_data('layout_image_type', $settings) == 'image'):?> image_top <?php endif;?>">
41 <?php if(wmvc_show_data('show_icon', $settings) == 'yes'):?>
42 <?php if(wmvc_show_data('layout_image_type', $settings) == 'icon'):?>
43 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results">
44 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'icon_id', 'icon_path'));?>" alt="<?php echo wmvc_show_data('location_title', $value);?>" class="wdk-icon">
45 </a>
46 <?php elseif(wmvc_show_data('layout_image_type', $settings) == 'image'):?>
47 <a class="wdk-d-block" href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results">
48 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'image_id','image_path'));?>" alt="<?php echo wmvc_show_data('location_title', $value);?>" class="wdk-image">
49 </a>
50 <?php elseif(wmvc_show_data('layout_image_type', $settings) == 'font_icon'):?>
51 <span class="wdk-font-icon" style="background-color: <?php echo esc_attr(wmvc_show_data('location_color', $value));?>;"><i class="<?php echo esc_attr(wmvc_show_data('font_icon_code', $value));?>"></i></span>
52 <?php endif;?>
53 <?php endif;?>
54 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results">
55 <?php echo wmvc_show_data('location_title', $value);?>
56 </a>
57 </h3>
58 <ul class="wdk-locations">
59 <?php else:?>
60 <li class="wdk-item">
61 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results" class="wdk-link">
62 <?php \Elementor\Icons_Manager::render_icon( $settings['item_icon_i'], [ 'aria-hidden' => 'true' ] );?>
63 <span class="wdk-title"><?php echo wmvc_show_data('location_title', $value);?></span>
64 <span class="wdk-count"><?php echo wmvc_show_data('listings_counter', $value, 0);?></span>
65 </a>
66 </li>
67 <?php endif;?>
68 <?php endforeach;?>
69 </ul>
70 </div>
71 </div>
72 <?php else:?>
73 <div class="wdk-col wdk-col-full wdk-col-full-always">
74 <p class="wdk_alert wdk_alert-danger"><?php echo esc_html__('Categories not found', 'wpdirectorykit');?></p>
75 </div>
76 <?php endif;?>
77 </div>
78 </div>
79 </div>