<?php
$mhUser = tdf_current_user();
if (!$mhUser) {
    return;
}

if (is_author()) : ?>
    <div class="myhome-avatar myhome-user-image-control-size">
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
        </svg>
    </div>
<?php else : ?>
    <a
            class="myhome-avatar-link-wrapper"
            href="<?php echo esc_url($mhUser->getUrl()); ?>"
    >
        <div class="myhome-avatar myhome-user-image-control-size">
            <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
            </svg>
        </div>
    </a>
<?php
endif;