Thread Starter
Foxer
(@foxermarcin)
@danieliser – thank you, that’s looks promising but unfortunately doesn’t work. Probably because you are using standard get_avatar only in case of logged user. Adding filter to get_avatar for non-logged is worthless until get_avatar is avoided by IF-ELSE statement in the plugin’s code.
From items.php (line 149+):
foreach ( $matches as $string ) {
if ( ! array_key_exists( $string, Codes::valid_codes() ) ) {
// If its not a valid code it is likely a fallback.
$replace = $string;
} elseif ( 0 === $current_user->ID && array_key_exists( $string, Codes::valid_codes() ) ) {
// If the code exists & user is not logged in, return nothing.
$replace = '';
} else {
switch ( $string ) {
case 'avatar':
$replace = get_avatar( $current_user->ID, self::$current_item->avatar_size );
break;
[...]