PluginProbe
WP Directory Kit / 1.2.3
WP Directory Kit v1.2.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 / dash-widgets / views / dash-widgets-list-listings.php

dash-widgets-list-listings.php in WP Directory Kit 1.2.3, at dash-widgets/views/dash-widgets-list-listings.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 Shortcode Listings list
4 * This is the template that Shortcode listings list
5 *
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 ?>
13 <div class="wdk-dashwidget-element" id="wdk_dashwidget_<?php echo esc_attr($id_element);?>">
14 <div class="wdk-latest-listings wdk-wrap">
15 <?php if(empty($results)):?>
16 <p class="wdk_alert wdk_alert-danger"><?php echo esc_html__('Results not found', 'wpdirectorykit');?></p>
17 <?php else: ?>
18 <table class="wp-list-table widefat fixed striped table-view-list pages wdk-table responsive" style="width: 100%;">
19 <thead>
20 <tr>
21 <th style="width:50px;"><?php echo __('#ID', 'wpdirectorykit'); ?></th>
22 <th><?php echo __('Image', 'wpdirectorykit'); ?></th>
23 <th><?php echo __('Title', 'wpdirectorykit'); ?></th>
24 <th class="actions_col"><?php echo __('Actions', 'wpdirectorykit'); ?></th>
25 </tr>
26 </thead>
27 <tbody>
28 <?php foreach($results as $key=>$listing): ?>
29 <?php
30 $url = get_permalink($listing);
31 ?>
32 <tr>
33 <td data-label="<?php echo __('#ID', 'wpdirectorykit'); ?>"><?php echo wdk_field_value('post_id', $listing); ?></td>
34 <td>
35 <a href="<?php echo esc_url($url);?>" target="_blank" title="<?php echo esc_attr(wdk_field_value('post_title', $listing));?>" class="d-block">
36 <img src="<?php echo esc_url(wdk_image_src($listing, 'full'));?>" alt="<?php echo esc_attr(wdk_show_data('post_title', $listing, '', TRUE, TRUE));?>">
37 </a>
38 </td>
39 <td class="title column-title page-title" data-label="<?php echo esc_html__('Title','wpdirectorykit');?>" class="max-width">
40 <strong>
41 <a class="row-title" href="<?php echo get_admin_url() . "admin.php?page=wdk_listing&id=" . wmvc_show_data('ID', $listing, '-'); ?>"><?php echo wmvc_show_data('post_title', $listing, '-'); ?></a>
42 <?php if(!wmvc_show_data('is_activated', $listing, 0)): ?>
43 <span class="label label-danger"><?php echo __('Not activated', 'wpdirectorykit'); ?></span>
44 <?php endif; ?>
45 <?php if(!wmvc_show_data('is_approved', $listing, 0) && function_exists('run_wdk_membership')): ?>
46 <span class="label label-danger"><?php echo esc_html__('Not approved', 'wpdirectorykit'); ?></span>
47 <?php endif; ?>
48 <?php if(wmvc_show_data('is_featured', $listing, 0)): ?>
49 <span class="label label-info"><?php echo esc_html__('featured', 'wpdirectorykit'); ?></span>
50 <?php endif; ?>
51 </strong>
52 </td>
53 <td data-label="<?php echo esc_html__('Actions','wpdirectorykit');?>" class="actions_col check-column">
54 <div class="nav">
55 <a href="<?php echo esc_url($url); ?>" class="" target="_blank"><span class="dashicons dashicons-search"></span></a>
56
57 <?php if(!wmvc_user_in_role('administrator')):?>
58 <?php if(function_exists('wdk_dash_url') && wdk_dash_url('dash_page=listings&function=edit') && current_user_can('edit_own_listings')):?>
59 <a href="<?php echo esc_url(wdk_dash_url('dash_page=listings&function=edit&id=' . wmvc_show_data('post_id', $listing, '-'))); ?>" class=""><span class="dashicons dashicons-edit"></span></a>
60 <?php endif;?>
61 <?php else:?>
62 <a href="<?php echo esc_url(admin_url('admin.php?page=wdk_listing&id='.wdk_field_value('post_id', $listing))); ?>" class=""><span class="dashicons dashicons-edit"></span></a>
63 <?php endif;?>
64 </div>
65 </td>
66 </tr>
67 <?php endforeach; ?>
68 </tbody>
69 </table>
70 <div class="footer">
71 <a href="<?php echo esc_url(admin_url('admin.php?page=wdk'));?>" class="button">
72 <?php echo esc_html__('Show More', 'wpdirectorykit'); ?>
73 </a>
74 </div>
75 <?php endif; ?>
76 </div>
77 </div>
78
79