Skip to content

Commit

Permalink
Feature: display uploaded donor avatar on donor wall (#7620)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheAdams authored Nov 14, 2024
1 parent 982ead3 commit 13cc82e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/shortcode-donor-wall.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
<img class='give-donor-container__image__anonymous' src='$imageUrl' alt='$alt' style='height: {$avatarSize}px;'/>
</div>
";
} elseif (($avatar = $donor->get_meta('_give_donor_avatar_id', true))) {
// Donor has an avatar
$imageUrl = wp_get_attachment_image_url($avatar, 'thumbnail');
$alt = __('Donor Avatar', 'give');

echo "
<div class='give-donor-container__image' >
<img src='$imageUrl' alt='$alt' style='height: {$avatarSize}px;'/>
</div>
";

} elseif ($donation['_give_payment_donor_email'] && give_validate_gravatar(
$donation['_give_payment_donor_email']
)) {
Expand Down

0 comments on commit 13cc82e

Please sign in to comment.