• ResolvedPlugin Contributor TryAllTheThings

    (@roots84)


    Hello!

    First of all: Great guest book!
    Is there a way to show the administrator avatar in the guest book reply? I couldn’t find the option in the settings so I added it directly into the code:

    /* Admin Reply Author */
    	$admin_reply .= '
    	<div class="gb-admin_reply_uid">';
    	$admin_reply_name = gwolle_gb_is_moderator( $entry->get_admin_reply_uid() );
    	if ( isset($read_setting['read_name']) && $read_setting['read_name']  === 'true' && $admin_reply_name ) {
    		// Admin Avatar
    		if ( isset($read_setting['read_avatar']) && $read_setting['read_avatar']  === 'true' ) {
    			$avatar = get_avatar( $entry->get_admin_reply_uid(), 32, '', $admin_reply_name );
    				if ($avatar) {
    					$admin_reply_header .= '<span class="gb-admin-avatar">' . $avatar . '</span>';
    				}
    			}
    			$admin_reply_header .= '
    				<em>' . __('Admin Reply by:', 'gwolle-gb') . ' ' . $admin_reply_name . '</em>';
    	} else {
    		$admin_reply_header .= '
    		<em>' . __('Admin Reply:', 'gwolle-gb') . '</em>';
    	}
    	$admin_reply .= apply_filters( 'gwolle_gb_admin_reply_header', $admin_reply_header, $entry );
    	$admin_reply .= '
    	</div>

    Maybe you can add it to a future version and add an option to switch it on and off.

    Thanks,
    Stefan

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Administrator Avatar’ is closed to new replies.