first commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
/**
|
||||
* @var string $before_widget
|
||||
* @var string $after_widget
|
||||
* @var array $popular_posts
|
||||
*/
|
||||
$unique_id = uniqid();
|
||||
|
||||
echo wp_kses_post( $before_widget );
|
||||
|
||||
if ( $title ) {
|
||||
echo wp_kses_post( $before_title . $title . $after_title );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<ul id="recent_posts_<?php echo esc_attr( $unique_id ); ?>" class="media-list">
|
||||
<?php while ( $popular_posts->have_posts() ) : $popular_posts->the_post(); ?>
|
||||
<li <?php post_class( 'media' ); ?>>
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<a href="<?php the_permalink(); ?>" class="media-left media-middle">
|
||||
<?php echo get_the_post_thumbnail( get_the_ID(), 'thumbnail' ); ?>
|
||||
</a>
|
||||
<?php endif; //has_post_thumbnail ?>
|
||||
<div class="media-body media-middle text-left">
|
||||
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
|
||||
</div>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php wp_reset_postdata(); // reset the query ?>
|
||||
</ul>
|
||||
<?php echo wp_kses_post( $after_widget ); ?>
|
||||
Reference in New Issue
Block a user