<?php global $qaleb;?>
<?php if($qaleb['login-ac']=='1'){?>
<div class="form-wrapper-wrapl">
<div class="container">
<div class="form-wrapperl">
<?php if ( is_user_logged_in() ) : ?>
<div class="user_links">
<?php global $userdata; get_currentuserinfo(); echo get_avatar( $userdata->ID, 50 ); ?> 
<strong><?php global $current_user; get_currentuserinfo(); echo $current_user->display_name; ?></strong>
</div>
<?php if($qaleb['login-button']=='1'){?>
<a class="io-login" href="<?php echo home_url(); ?>/wp-admin">پیشخوان</a>
<a class="io-logout" href="<?php echo wp_logout_url( home_url() ); ?>">خروج</a>
<?php } ?>
<?php else: ?>
<?php wp_login_form(); ?>
<?php endif; ?>
</div></div>
</div>
<?php } ?>