LLMS_Admin_Dashboard_Widget::output()
Output the dashboard widget.
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.dashboard-widget.php
public function output() {
?>
<div class="llms-dashboard-widget-wrap">
<h3><?php esc_html_e( 'Activity this week:', 'lifterlms' ); ?></h3>
<a class="llms-button-primary" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=course' ) ); ?>">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
<?php esc_html_e( 'Create a New Course', 'lifterlms' ); ?>
</a>
</div>
<div class="activity-block">
<?php echo $this->get_widgets(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in template file. ?>
</div>
<div class="activity-block">
<h3><?php esc_html_e( 'LifterLMS News & Podcasts', 'lifterlms' ); ?></h3>
</div>
<ul class="llms-dashboard-widget-feed">
<?php foreach ( $this->get_feed() as $item ) : ?>
<li>
<a href="<?php echo esc_url( $item->get_permalink() ); ?>" target="_blank" rel="noopener">
<?php echo esc_html( $item->get_title() ); ?>
</a>
<span class="llms-dashboard-widget-feed-date">
<?php echo esc_html( date_i18n( get_option( 'date_format' ), $item->get_date( 'U' ) ) ); ?>
|
<?php echo strpos( $item->get_permalink(), '//podcast' ) !== false ? esc_html__( 'Podcast', 'lifterlms' ) : esc_html__( 'Blog', 'lifterlms' ); ?>
</span>
</li>
<?php endforeach; ?>
</ul>
<ul class="subsubsub">
<li>
<a href="https://lifterlms.com/blog/" target="_blank" rel="noopener" aria-label="<?php esc_attr_e( 'Opens in a new tab', 'lifterlms' ); ?>">
<?php esc_html_e( 'View all blog posts', 'lifterlms' ); ?>
<span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
|
</li>
<li>
<a href="https://podcast.lifterlms.com/" target="_blank" rel="noopener" aria-label="<?php esc_attr_e( 'Opens in a new tab', 'lifterlms' ); ?>">
<?php esc_html_e( 'View all podcasts', 'lifterlms' ); ?>
<span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
|
</li>
<li>
<a href="https://lifterlms.com/help/" target="_blank" rel="noopener" aria-label="<?php esc_attr_e( 'Opens in a new tab', 'lifterlms' ); ?>">
<?php esc_html_e( 'Get support', 'lifterlms' ); ?>
<span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
</li>
</ul>
<?php
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.2.0 | Introduced. |