From cbbb5ab3c4aee36ce84f447ddabab3fc80be47d4 Mon Sep 17 00:00:00 2001 From: Sagar Deshmukh Date: Thu, 26 Dec 2024 15:21:27 +0530 Subject: [PATCH] PLANET-7646 Add placeholder image to Author block If author image is not available show MistryPerson(mm) avatar image --- author.php | 2 +- templates/author.twig | 2 +- templates/blocks/author_profile.twig | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/author.php b/author.php index c1abdf757d..399ab95b55 100755 --- a/author.php +++ b/author.php @@ -30,7 +30,7 @@ $context['og_title'] = $author->name; $context['og_description'] = get_the_author_meta('description', $author->ID); $context['og_image_data'] = [ - 'url' => get_avatar_url($author->ID, [ 'size' => 300 ]), + 'url' => get_avatar_url($author->ID, [ 'size' => 300, 'default' => 'mm']), 'width' => '300', 'height' => '300', ]; diff --git a/templates/author.twig b/templates/author.twig index f203053c36..9ab6a61be3 100644 --- a/templates/author.twig +++ b/templates/author.twig @@ -5,7 +5,7 @@ {% if ( author.avatar ) %}
{{ author.name }}
{% endif %} diff --git a/templates/blocks/author_profile.twig b/templates/blocks/author_profile.twig index c819761b8a..40ceeddcf8 100644 --- a/templates/blocks/author_profile.twig +++ b/templates/blocks/author_profile.twig @@ -5,7 +5,7 @@
{{ post.author.name }}
@@ -16,7 +16,7 @@
{{ post.author.name }}