<?php if ( myarcadetheme_get_option( 'topbar', '1' ) ) : ?>
<div class="hdcn-1">
  <div class="cont">
    <?php
    if ( myarcadetheme_get_option( 'topbar_heading', '1' ) ) {
      myarcadetheme_top_heading();
    }
    ?>

    <?php
    if ( myarcadetheme_get_option( 'topbar_login', '1' )
      || myarcadetheme_get_option( 'topbar_search', '1' )
      || myarcadetheme_get_option( 'topbar_share', '1' ) ) : ?>
    <ul class="menu-top<?php if ( is_user_logged_in() ) { ?> usr-online<?php } ?>">
      <?php
      if ( myarcadetheme_get_option( 'topbar_login', '1' ) ) {
        if ( ! is_user_logged_in() ) { ?>
          <li><a class="fa-sign-in" href="#" data-toggle="modal" data-target="#modl-logi"><?php _e('LOGIN', 'myarcadetheme'); ?></a></li>
          <?php if ( get_option('users_can_register') ) : ?>
          <li><a class="fa-sign-out" href="#" data-toggle="modal" data-target="#modl-regi"><?php _e('REGISTER', 'myarcadetheme'); ?></a></li>
          <?php endif; ?>
          <?php
        }
        else {
          global $current_user;
          ?>
          <li>
            <span class="fa-user"><?php printf( __( 'Hello, <strong>%s</strong>' ), $current_user->display_name ); ?></span>
            <ul>
              <li class="avatar-cn"><?php echo get_avatar( $current_user->ID, 85 ); ?></li>
              <li><a href="<?php if(defined('BP_VERSION')){ global $bp; echo $bp->loggedin_user->domain; }else{ echo home_url().'/wp-admin/profile.php'; } ?>" class="fa-user"><?php _e('My account', 'myarcadetheme'); ?></a></li>
              <li><a href="<?php echo wp_logout_url(get_option('home').'/'); ?>" class="fa-power-off"><?php _e('Logout', 'myarcadetheme'); ?></a></li>
            </ul>
          </li>
          <?php
        }
      }
      ?>

      <?php if ( myarcadetheme_get_option( 'topbar_search', '1' ) ) : ?>
      <li><a class="fa-search" href="#" data-toggle="modal" data-target="#modl-srch"><?php _e('SEARCH', 'myarcadetheme'); ?></a></li>
      <?php endif; ?>

      <?php if ( myarcadetheme_get_option( 'topbar_share', '1' ) ) : ?>
      <li class="shar-cnt">
        <a class="fa-share-alt" href="#"><?php _e('FOLLOW US', 'myarcadetheme'); ?></a>
        <ul class="lst-social">
          <?php get_template_part( "partials/social", "share" ); ?>
        </ul>
      </li>
      <?php endif; ?>
    </ul>
    <?php endif; ?>
  </div>
</div>
<?php endif; ?>