From 98e7fc0b8931d2bc01d49c97639a18c6a1c899db Mon Sep 17 00:00:00 2001 From: Foxaii Date: Wed, 22 Jan 2014 18:24:10 +0000 Subject: [PATCH] Fix avatar classes --- lib/comments.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/comments.php b/lib/comments.php index 70a51fc..3b1f96f 100644 --- a/lib/comments.php +++ b/lib/comments.php @@ -42,8 +42,10 @@ class Roots_Walker_Comment extends Walker_Comment { } } -function roots_get_avatar($avatar) { +function roots_get_avatar($avatar, $type) { + if (!is_object($type)) { return $avatar; } + $avatar = str_replace("class='avatar", "class='avatar pull-left media-object", $avatar); return $avatar; } -add_filter('get_avatar', 'roots_get_avatar'); +add_filter('get_avatar', 'roots_get_avatar', 10, 2);