| 1 |
<?php |
| 2 |
/** |
| 3 |
* The template for Element Listing Images. |
| 4 |
* This is the template that elementor element images, results |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
|
| 12 |
?> |
| 13 |
<div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>"> |
| 14 |
<div class="wdk-field-files-list"> |
| 15 |
<?php if($is_edit_mode):?> |
| 16 |
<div class="files-row"> |
| 17 |
<ul class="files"> |
| 18 |
<li class="list-item"> |
| 19 |
<a class="file-link" href="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/xlsx.png');?>" target="_blank" title="<?php echo esc_attr__('Excel Worksheet', 'wpdirectorykit');?> "> |
| 20 |
<img src="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/xlsx.png');?>" class="wdk-listing-file-icon" alt=""> |
| 21 |
<?php echo esc_html__('Excel Worksheet', 'wpdirectorykit');?> |
| 22 |
</a> |
| 23 |
</li> |
| 24 |
<li class="list-item"> |
| 25 |
<a class="file-link" href="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/docx.png');?>" target="_blank" title="<?php echo esc_attr__('Document Worksheet', 'wpdirectorykit');?> "> |
| 26 |
<img src="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/docx.png');?>" class="wdk-listing-file-icon" alt=""> |
| 27 |
<?php echo esc_html__('Document Worksheet', 'wpdirectorykit');?> |
| 28 |
</a> |
| 29 |
</li> |
| 30 |
<li class="list-item"> |
| 31 |
<a class="file-link" href="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/pdf.png');?>" target="_blank" title="<?php echo esc_attr__('Pdf Worksheet', 'wpdirectorykit');?>"> |
| 32 |
<img src="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/pdf.png');?>" class="wdk-listing-file-icon" alt=""> |
| 33 |
<?php echo esc_html__('Pdf Worksheet', 'wpdirectorykit');?> |
| 34 |
</a> |
| 35 |
</li> |
| 36 |
<li class="list-item"> |
| 37 |
<a class="file-link" href="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/txt.png');?>" target="_blank" title="<?php echo esc_attr__('Txt Worksheet', 'wpdirectorykit');?> "> |
| 38 |
<img src="<?php echo esc_url(WPDIRECTORYKIT_URL.'public/img/filetype/txt.png');?>" class="wdk-listing-file-icon" alt=""> |
| 39 |
<?php echo esc_html__('Txt Worksheet', 'wpdirectorykit');?> |
| 40 |
</a> |
| 41 |
</li> |
| 42 |
</ul> |
| 43 |
</div> |
| 44 |
<?php else:?> |
| 45 |
<?php if(count($images)>0):?> |
| 46 |
<?php $files_opened_tag = false; ?> |
| 47 |
<?php foreach($images as $image):?> |
| 48 |
<?php |
| 49 |
if(!$files_opened_tag):?> |
| 50 |
<div class="files-row"> |
| 51 |
<ul class="files"> |
| 52 |
<?php $files_opened_tag = true; endif;?> |
| 53 |
|
| 54 |
<?php |
| 55 |
if(file_exists(WPDIRECTORYKIT_PATH.'/public/img/filetype/'.wdk_file_extension($image['src']).'.png')) { |
| 56 |
$src = WPDIRECTORYKIT_URL.'public/img/filetype/'.wdk_file_extension($image['src']).'.png'; |
| 57 |
} else { |
| 58 |
$src = WPDIRECTORYKIT_URL.'public/img/filetype/_blank.png'; |
| 59 |
} |
| 60 |
?> |
| 61 |
|
| 62 |
<li class="list-item"> |
| 63 |
<a class="file-link" href="<?php echo esc_url($image['src']);?>" target="_blank" title="<?php echo esc_attr(wmvc_show_data('title',$image,'',TRUE,TRUE));?>"> |
| 64 |
<img src="<?php echo esc_url($src);?>" class="wdk-listing-file-icon" alt="<?php echo esc_attr(wmvc_show_data('alt',$image,'',TRUE,TRUE));?>"> |
| 65 |
<?php echo esc_html(wmvc_show_data('title',$image,'',TRUE,TRUE));?> |
| 66 |
</a> |
| 67 |
</li> |
| 68 |
<?php endforeach;?> |
| 69 |
<?php if($files_opened_tag):?> |
| 70 |
</ul> |
| 71 |
</div> |
| 72 |
<?php endif;?> |
| 73 |
<?php endif;?> |
| 74 |
<?php endif;?> |
| 75 |
</div> |
| 76 |
</div> |
| 77 |
|
| 78 |
|