Skip to content

Commit

Permalink
Top Posts: allow one to customize avatar image options w/ filter
Browse files Browse the repository at this point in the history
The jetpack_top_posts_widget_image_options filter allows third-parties to specify custom image options, including the fallback_to_avatars parameter. However we currently do not use the value that comes from the filter when we actually fetch the image. That fixes it.
  • Loading branch information
jeherve committed Jul 23, 2019
1 parent 5b1d803 commit 72d66bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/widgets/top-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function widget( $args, $instance ) {
$image = Jetpack_PostImages::get_image(
$post['post_id'],
array(
'fallback_to_avatars' => true,
'fallback_to_avatars' => (bool) $get_image_options['fallback_to_avatars'],
'width' => (int) $width,
'height' => (int) $height,
'avatar_size' => (int) $get_image_options['avatar_size'],
Expand Down

0 comments on commit 72d66bb

Please sign in to comment.