Skip to content

Commit

Permalink
FIX: thumbnail bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cheh committed Nov 3, 2016
1 parent 2f7189c commit b34f378
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inc/class-trending-posts-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,14 @@ public function widget( $args, $instance ) {
break;
}

$title = get_the_title();
$image_args = wp_parse_args( array(
'visible' => has_post_thumbnail(),
), $image_args );

$image = $this->utility->media->get_image( $image_args );

$title = get_the_title();

if ( $title_length > 0 ) {
$title = wp_html_excerpt( $title, $title_length, $title_trimmed_more );
}
Expand Down

0 comments on commit b34f378

Please sign in to comment.