<!--[archive/header/author]-->

<?php

    $email = str_replace("-", ".", get_post_meta(get_queried_object_id(), 'cap-user_login', true))."@news-profile.ru";

?>

<?php  if( get_post_meta( get_queried_object_id() , 'show_data', true) == 1 ) : ?>

    <div class="author position-relative">

        <div class="position-relative d-flex flex-column flex-md-row" itemscope="" itemtype="https://schema.org/Person">

            <div class="text-center text-md-left">

                <?= get_the_post_thumbnail( get_queried_object() ) ?>

            </div>

            <div class="d-flex flex flex-column align-items-center align-items-md-start justify-content-between">

                <div class="author__body d-flex flex flex-column align-items-center align-items-md-start justify-content-center">

                    <h1 class="author__title mt-3 mt-md-0 mb-2 mb-md-2" itemprop="name" lang="ru">

                        <?= get_queried_object()->display_name ?>

                    </h1>

                    <div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0">

                        <a href="mailto:<?= $email ?>" itemprop="email">

                            <?= $email ?>

                        </a>

                    </div>

                    <div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0" itemprop="description">

                        <div style="margin-top: 8px;"><?= wpautop( get_queried_object()->description ); ?></div>
					
					</div>
					
					<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0" itemprop="url">
							<?php echo get_profile_website_link( get_queried_object()->website );?>
					</div>
					
                </div>

            </div>

        </div>

    </div>

<?php else: ?>


        <div class="position-relative d-flex flex-column flex-md-row mb-4" itemscope itemtype="https://schema.org/Person">

            <div class="d-flex flex flex-column align-items-center align-items-md-start justify-content-between">

                <div class="author__body d-flex flex flex-column align-items-center align-items-md-start justify-content-center">

                    <h1 class="author__title mt-3 mt-md-0 mb-2 mb-md-2" itemprop="name" lang="ru">

                        <?= get_queried_object()->display_name ?>

                    </h1>

                </div>

            </div>

        </div>


<?php endif; ?>

<!--[/archive/header/author]-->