Hi guys how to redirect the publish button to the login page? only when not logged in yet!
<div class="header">
<nav class="header-bar" data-topbar role="navigation">
<ul class="name">
<li>
<a href="<?php echo osc_base_url(); ?>"><?php echo osc_page_title(); ?></a>
</li>
</ul>
<ul class="menu">
<?php if( osc_users_enabled() ) { ?>
<?php if( osc_is_web_user_logged_in() ) { ?>
<li class="has-dropdown"><a href="#">
<?php _e('My account', 'ctg_housing'); ?>
</a> <?php echo ctg_private_user_menu_dropdown(); ?> </li>
<li class="divider"></li>
<li><a href="<?php echo osc_user_logout_url(); ?>">
<?php _e('Logout', 'ctg_housing'); ?>
</a> </li>
<?php } else { ?>
<li>
<a id="login_open" href="<?php echo osc_user_login_url(); ?>">
<?php _e('Login', 'ctg_housing') ; ?>
</a>
</li>
<?php if(osc_user_registration_enabled()) { ?>
<li>
<a id="menu-btn" href="<?php echo osc_register_account_url() ; ?>">
<?php _e('Register', 'ctg_housing'); ?>
</a>
</li>
<?php }; ?>
<?php } ?>
<?php } ?>
<?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li class="publish"><a href="<?php echo osc_item_post_url_in_category() ; ?>">
<?php _e("Publish", 'ctg_housing');?>
</a></li>
<?php } ?>
</ul>
</nav>
</div>