PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
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-categories-tree-top.php

wdk-categories-tree-top.php in WP Directory Kit 1.5.9, at elementor-elements/views/wdk-categories-tree-top.php

107 lines 6.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 Categories List.
4 * This is the template that elementor element list, categories 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 = wdk_get_option('wdk_results_page');
19 }
20
21 //get translation page
22 if(function_exists('PLL'))
23 {
24 $results_page = pll_get_post($results_page);
25 }
26
27 $results_page = get_permalink($results_page);
28
29 ?>
30 <div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>">
31 <div class="wdk-categories-tree-top">
32 <?php if(!empty($categories_primary)):?>
33 <div class="wdk-primary">
34 <div class="wdk-row">
35 <?php foreach ($categories_primary as $key => $value):?>
36 <div class="wdk-col">
37 <div class="category-card">
38 <div class="body">
39 <h3 class="title"><?php echo esc_html(wmvc_show_data('category_title', $value));?></h3>
40 <div class="sub">
41 <?php
42 /* translators: 1: Number of listings. */
43 echo esc_html(wdk_sprintf(_nx(
44 '%1$s Listing',
45 '%1$s Listings',
46 wmvc_show_data('listings_counter', $value, '0'),
47 'profile listings count',
48 'wpdirectorykit'
49 ), wmvc_show_data('listings_counter', $value, '0')));
50 ?>
51 </div>
52 </div>
53 <div class="thumbnail">
54 <?php if(wmvc_show_data('primary_layout_image_type', $settings) == 'icon'):?>
55 <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));?>" class="wdk-icon">
56 <?php elseif(wmvc_show_data('primary_layout_image_type', $settings) == 'image'):?>
57 <img class="jsplaceholder" onerror="this.src = '<?php echo esc_url(wdk_placeholder_image_src());?>';" src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'image_id','image_path'));?>" alt="<?php echo esc_attr(wmvc_show_data('category_title', $value));?>" class="wdk-image">
58 <?php elseif(wmvc_show_data('primary_layout_image_type', $settings) == 'font_icon'):?>
59 <span class="wdk-font-icon" style="background-color: <?php echo esc_attr(wmvc_show_data('category_color', $value));?>;"><i class="<?php echo esc_attr(wmvc_show_data('font_icon_code', $value));?>"></i></span>
60 <?php endif;?>
61 </div>
62 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_category='.wmvc_show_data('idcategory', $value)));?>#results" class="complete_link"></a>
63 </div>
64 </div>
65 <?php endforeach;?>
66 </div>
67 </div>
68 <?php endif;?>
69 <?php if(!empty($categories_secondary)):?>
70 <div class="wdk-secondary">
71 <div class="wdk-row">
72 <?php foreach ($categories_secondary as $key => $value):?>
73 <div class="wdk-col">
74 <div class="category-card">
75 <div class="body">
76 <h3 class="title"><?php echo esc_html(wmvc_show_data('category_title', $value));?></h3>
77 <div class="sub">
78 <?php
79 /* translators: 1: Number of listings. */
80 echo esc_html(wdk_sprintf(_nx(
81 '%1$s Listing',
82 '%1$s Listings',
83 wmvc_show_data('listings_counter', $value, '0'),
84 'profile listings count',
85 'wpdirectorykit'
86 ), wmvc_show_data('listings_counter', $value, '0')));
87 ?>
88 </div>
89 </div>
90 <div class="thumbnail">
91 <?php if(wmvc_show_data('secondary_layout_image_type', $settings) == 'icon'):?>
92 <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));?>" class="wdk-icon">
93 <?php elseif(wmvc_show_data('secondary_layout_image_type', $settings) == 'image'):?>
94 <img class="jsplaceholder" onerror="this.src = '<?php echo esc_url(wdk_placeholder_image_src());?>';" src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'image_id','image_path'));?>" alt="<?php echo esc_attr(wmvc_show_data('category_title', $value));?>" class="wdk-image">
95 <?php elseif(wmvc_show_data('secondary_layout_image_type', $settings) == 'font_icon'):?>
96 <span class="wdk-font-icon" style="background-color: <?php echo esc_attr(wmvc_show_data('category_color', $value));?>;"><i class="<?php echo esc_attr(wmvc_show_data('font_icon_code', $value));?>"></i></span>
97 <?php endif;?>
98 </div>
99 <a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_category='.wmvc_show_data('idcategory', $value)));?>#results" class="complete_link"></a>
100 </div>
101 </div>
102 <?php endforeach;?>
103 </div>
104 </div>
105 <?php endif;?>
106 </div>
107 </div>