| 1 |
<?php defined( 'ABSPATH' ) || exit; ?> |
| 2 |
<style> |
| 3 |
.hastheme-header-title { |
| 4 |
width: 100%; |
| 5 |
-webkit-box-shadow: 0 5px 8px rgba(0,0,0,.05); |
| 6 |
box-shadow: 0 5px 8px rgba(0,0,0,.05); |
| 7 |
margin: 0 -12px 8px; |
| 8 |
padding: 0 12px 12px; |
| 9 |
text-decoration: none; |
| 10 |
color: #23282d; |
| 11 |
font-size: 14px; |
| 12 |
} |
| 13 |
.hastheme-header-title a { |
| 14 |
text-decoration: none; |
| 15 |
color: #23282d; |
| 16 |
font-size: 14px; |
| 17 |
} |
| 18 |
.hastheme-dashboard-widget-header img { |
| 19 |
width: 100%; |
| 20 |
} |
| 21 |
.hastheme-dashboard-widget-newsfeed ul li{ |
| 22 |
margin: 10px 0; |
| 23 |
} |
| 24 |
.hastheme-dashboard-widget-newsfeed ul li .hastheme-dashboard-widget-newsfeed-item-title a{ |
| 25 |
font-size: 14px; |
| 26 |
margin-bottom: 3px; |
| 27 |
display: inline-block; |
| 28 |
} |
| 29 |
.hastheme-dashboard-widget-newsfeed-item-description { |
| 30 |
margin: 0 0 1.2em; |
| 31 |
} |
| 32 |
.hastheme-dashboard-widget-footer { |
| 33 |
border-top: 1px solid #eee; |
| 34 |
margin: 0 -12px; |
| 35 |
padding: 12px 6px 0 12px; |
| 36 |
} |
| 37 |
.hastheme-dashboard-widget-footer ul { |
| 38 |
display: -webkit-box; |
| 39 |
display: -ms-flexbox; |
| 40 |
display: flex; |
| 41 |
list-style: none; |
| 42 |
margin: 0; |
| 43 |
padding: 0; |
| 44 |
} |
| 45 |
.hastheme-dashboard-widget-footer ul li { |
| 46 |
padding: 0 10px; |
| 47 |
margin: 0; |
| 48 |
border-left: 1px solid #ddd; |
| 49 |
} |
| 50 |
.hastheme-dashboard-widget-footer ul li:first-child { |
| 51 |
padding-left: 0; |
| 52 |
border: none; |
| 53 |
} |
| 54 |
.hastheme-dashboard-widget-footer ul li a{ |
| 55 |
text-decoration: none; |
| 56 |
} |
| 57 |
</style> |
| 58 |
|
| 59 |
<?php |
| 60 |
$info_data = \EverCompare\Admin\Dashboard_Widget_Api::get_remote_data(); |
| 61 |
$banner = ! empty( $info_data['banner'] ) ? $info_data['banner'] : []; |
| 62 |
?> |
| 63 |
<div class="hastheme-dashboard-widget-area"> |
| 64 |
<div class="hastheme-dashboard-widget-header"> |
| 65 |
<?php if ( ! empty( $banner['status'] ) && ! empty( $banner['image'] ) ) : ?> |
| 66 |
<a href="<?php echo esc_url( $banner['link'] ?? '' ); ?>" target="_blank" rel="noopener"> |
| 67 |
<img src="<?php echo esc_url( $banner['image'] ); ?>" alt="<?php echo esc_attr( $banner['alt'] ?? '' ); ?>" /> |
| 68 |
</a> |
| 69 |
<?php endif; ?> |
| 70 |
</div> |
| 71 |
<?php if ( ! empty( $info_data['feed'] ) ) : ?> |
| 72 |
<div class="hastheme-dashboard-widget-newsfeed"> |
| 73 |
<ul> |
| 74 |
<?php foreach ( $info_data['feed'] as $feed ) : if( $feed['status'] == '0' ) continue; ?> |
| 75 |
<li class="hastheme-dashboard-widget-newsfeed-item"> |
| 76 |
<div class="hastheme-dashboard-widget-newsfeed-item-title"> |
| 77 |
<a target="_blank" href="<?php echo esc_url( $feed['url'] ); ?>"><?php echo esc_html( $feed['title'] ); ?></a> |
| 78 |
</div> |
| 79 |
<div class="hastheme-dashboard-widget-newsfeed-item-description"> |
| 80 |
<?php echo wp_kses_post( $feed['description'] ); ?> |
| 81 |
</div> |
| 82 |
</li> |
| 83 |
<?php endforeach; ?> |
| 84 |
</ul> |
| 85 |
</div> |
| 86 |
<?php endif; ?> |
| 87 |
<div class="hastheme-dashboard-widget-footer"> |
| 88 |
<ul> |
| 89 |
<li> |
| 90 |
<a href="https://hasthemes.com/blog/" target="_blank"> |
| 91 |
<?php esc_html_e( 'Blog', 'ever-compare' ); ?> |
| 92 |
<span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 93 |
</a> |
| 94 |
</li> |
| 95 |
<li> |
| 96 |
<a href="https://hasthemes.com/docs" target="_blank"> |
| 97 |
<?php esc_html_e( 'Documentation', 'ever-compare' ); ?> |
| 98 |
<span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 99 |
</a> |
| 100 |
</li> |
| 101 |
<li> |
| 102 |
<a href="https://hasthemes.com/contact-us/" target="_blank"> |
| 103 |
<?php esc_html_e( 'Support', 'ever-compare' ); ?> |
| 104 |
<span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 105 |
</a> |
| 106 |
</li> |
| 107 |
</ul> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
|