<?php
/**
* Dokan Dashboard Template
*
* Dokan Dahsboard Announcement widget template
*
* @since 2.4
*
* @package dokan
*/
?>
<div class="dashboard-widget dokan-announcement-widget">
<div class="widget-title">
<?php _e( 'Latest Notifications', 'dokan' ); ?>
</div>
<?php
?>
<?php if ( $notices ): ?>
<ul class="list-unstyled">
<?php foreach (array_slice($notices, 0, 2) as $notice ): ?>
<?php
$notice_url = trailingslashit( dokan_get_navigation_url( 'single-announcement' ).''.$notice->ID );
?>
<li>
<div class="dokan-dashboard-announce-date <?php echo ( $notice->status == 'unread' ) ? 'dokan-dashboard-announce-unread' : 'dokan-dashboard-announce-read'; ?>">
<span class="announce-day"><?php echo date_i18n( 'd', strtotime( $notice->post_date ) ); ?></span>
<span class="announce-month"><?php echo date_i18n( 'M', strtotime( $notice->post_date ) ); ?></span>
<span class="announce-year"><?php echo date_i18n( 'Y', strtotime( $notice->post_date ) ); ?></span>
</div>
<div class="dokan-dashboard-announce-content">
<a href="<?php echo $notice_url; ?>"><h3><?php echo $notice->post_title; ?></h3></a>
<p><?php echo wp_trim_words( $notice->post_content, 8, '...' ); ?></p>
</div>
<div class="dokan-clearfix"></div>
</li>
<?php endforeach ?>
</ul>
<a class="btn-vendor-primary mb-0" href="<?php echo $announcement_url; ?>"><?php _e( 'See All Notifications', 'dokan' ); ?></a>
<?php else: ?>
<div class="dokan-no-announcement">
<div class="annoument-no-wrapper">
<img class="dokan-announcement-icon" src="<?PHP echo get_template_directory_uri();?>/inc/images/icons/bell-thin.svg" alt="Bell"/>
<p><?php _e( 'No notifications', 'dokan' ) ?></p>
</div>
</div>
<?php endif ?>
</div> <!-- .products -->
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.