PluginProbe
WP Directory Kit / 1.5.6
WP Directory Kit v1.5.6
1.5.9 1.5.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 All 37 releases
wpdirectorykit / elementor-elements / views / wdk-locations-grid-cover.php

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

86 lines 4.4 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 Locations Grid Cover.
4 * This is the template that elementor element locations, 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 = wdk_get_option('wdk_results_page');
20 }
21
22 //get translation page
23 if(function_exists('PLL'))
24 {
25 $results_page = pll_get_post($results_page);
26 }
27
28 $results_page = get_permalink($results_page);
29
30 ?>
31
32 <div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>">
33 <div class="wdk-locations-grid-cover">
34 <div class="wdk-row">
35 <?php if(count($results) > 0):?>
36 <?php foreach ($results as $key => $value):?>
37 <div class="wdk-col">
38 <div class="wdk-locations-card-cover">
39 <?php if(wmvc_show_data('layout_image_type', $settings) == 'icon'):?>
40 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'icon_id', 'icon_path'));?>" alt="<?php echo esc_attr(wmvc_show_data('location_title', $value));?>" class="wdk-icon">
41 <?php else:?>
42 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'image_id', 'image_path'));?>" alt="<?php echo esc_attr(wmvc_show_data('location_title', $value));?>" class="wdk-image">
43 <?php endif;?>
44 <div class="wdk-locations-card-body">
45 <div class="wdk-action-left">
46 <?php if(wmvc_show_data('content_icon_type', $settings) == 'image' && wdk_image_src($value, 'full', NULL,'icon_id')):?>
47 <img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'icon_id', 'icon_path'));?>" alt="<?php echo esc_attr(wmvc_show_data('category_title', $value));?>">
48 <?php elseif(wmvc_show_data('content_icon_type', $settings) == 'font'):?>
49 <i class="<?php echo wmvc_show_data('font_icon_code', $value,'');?>"></i>
50 <?php endif;?>
51 </div>
52 <div class="wdk-left-content">
53 <h3 class="wdk-title"><?php echo esc_html(wmvc_show_data('location_title', $value));?></h3>
54 <span class="wdk-listings-count">
55 <?php
56 echo esc_html(wdk_sprintf(_nx(
57 '%1$s Listing',
58 '%1$s Listings',
59 wmvc_show_data('listings_counter', $value, '0'),
60 'profile listings count',
61 'wpdirectorykit'
62 ), wmvc_show_data('listings_counter', $value, '0')));
63 ?>
64 </span>
65 </div>
66 <div class="wdk-action-right">
67 <a class="wdk-location-btn" href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results">
68 <?php \Elementor\Icons_Manager::render_icon( $settings['link_icon'], [ 'aria-hidden' => 'true' ] ); ?>
69 </a>
70 </div>
71 </div>
72 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results" class="wdk-link"></a>
73 <div class="mask"></div>
74 <div class="overlay"></div>
75 </div>
76 </div>
77 <?php endforeach;?>
78 <?php else:?>
79 <div class="wdk-col wdk-col-full wdk-col-full-always">
80 <p class="wdk_alert wdk_alert-danger"><?php echo esc_html__('Locations not found', 'wpdirectorykit');?></p>
81 </div>
82 <?php endif;?>
83 </div>
84 </div>
85 </div>
86