Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Change the initials avatar colours to gray with white text
- * @return array
- */
- add_filter('site-reviews/avatar/colors', function () {
- return [
- ['background' => '#aaa', 'color' => '#fff'],
- ];
- });
- /**
- * Only display initials avatars; make sure to disable the "Regenerate Avatars" setting.
- * @param array $attributes
- * @param \GeminiLabs\SiteReviews\Review $review
- * @return array
- */
- add_filter('site-reviews/avatar/attributes', function ($attributes, $review) {
- if ('initials' === glsr_get_option('reviews.avatars_fallback')) {
- $attributes['src'] = glsr('Modules\Avatar')->generateInitials($review);
- }
- return $attributes;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement