mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-12 06:53:44 +03:00
Change rendered avatar size (#318)
* Change rendered avatar size Reduces the standard fetched avatar size, dependant on the format. * Reverse image size
This commit is contained in:
parent
19b3897514
commit
04e5480425
|
@ -16,9 +16,13 @@ $is_truncated = isset( $attributes['className'] ) && str_contains( $attributes['
|
|||
// Initialize count to zero for untruncated view.
|
||||
$count_more = 0;
|
||||
|
||||
// Set avatar size at smallest usage in px.
|
||||
$avatar_size = 70;
|
||||
|
||||
if ( $is_truncated ) {
|
||||
$count_more = count( $contributors ) - TRUNCATED_MAX;
|
||||
$contributors = array_splice( $contributors, 0, TRUNCATED_MAX );
|
||||
$avatar_size = 30;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -31,7 +35,7 @@ if ( $is_truncated ) {
|
|||
<li class="pledge-contributor">
|
||||
<span class="pledge-contributor__avatar">
|
||||
<a href="<?php echo esc_url( 'https://profiles.wordpress.org/' . $contributor->user_nicename . '/' ); ?>">
|
||||
<?php echo get_avatar( $contributor->user_email, 280, 'mystery', $contributor->display_name ); ?>
|
||||
<?php echo get_avatar( $contributor->user_email, $avatar_size, 'mystery', $contributor->display_name ); ?>
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue