| 1 |
<?php |
| 2 |
/** |
| 3 |
* The template for Element Button Login. |
| 4 |
* This is the template that elementor element login, logout, link |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
|
| 12 |
?> |
| 13 |
|
| 14 |
<div class="wdk-element wdk-button-login" id="wdk_el_<?php echo esc_html($id_element);?>"> |
| 15 |
<?php if(!is_user_logged_in()):?> |
| 16 |
<a href="<?php echo esc_attr(wmvc_show_data('link_not_login_url', $settings));?>" id="<?php echo esc_attr(wmvc_show_data('link_not_login_id', $settings));?>" class="wdk-element-button login"> |
| 17 |
<?php if(wmvc_show_data('link_not_login_icon_position', $settings) == 'left') :?> |
| 18 |
<?php \Elementor\Icons_Manager::render_icon( $settings['link_not_login_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 19 |
<?php endif;?> |
| 20 |
<?php echo esc_html(wmvc_show_data('link_not_login_text', $settings));?> |
| 21 |
<?php if(wmvc_show_data('link_not_login_icon_position', $settings) == 'right') :?> |
| 22 |
<?php \Elementor\Icons_Manager::render_icon( $settings['link_not_login_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 23 |
<?php endif;?> |
| 24 |
</a> |
| 25 |
<?php endif;?> |
| 26 |
|
| 27 |
<?php if(is_user_logged_in()):?> |
| 28 |
<a href="<?php echo esc_attr(wmvc_show_data('link_login_url', $settings));?>" id="<?php echo esc_attr(wmvc_show_data('link_login_id', $settings));?>" |
| 29 |
title="<?php echo esc_attr(wmvc_show_data('link_login_text_attr', $settings));?>" |
| 30 |
class="wdk-element-button logout"> |
| 31 |
<?php if(wmvc_show_data('link_login_icon_position', $settings) == 'left') :?> |
| 32 |
<?php \Elementor\Icons_Manager::render_icon( $settings['link_login_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 33 |
<?php endif;?> |
| 34 |
<?php echo esc_html(wmvc_show_data('link_login_text', $settings));?> |
| 35 |
<?php if(wmvc_show_data('link_login_icon_position', $settings) == 'right') :?> |
| 36 |
<?php \Elementor\Icons_Manager::render_icon( $settings['link_login_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 37 |
<?php endif;?> |
| 38 |
</a> |
| 39 |
<span class="dash-span"> |
| 40 |
<a href="<?php echo esc_attr(wmvc_show_data('link_dash_url', $settings));?>" |
| 41 |
title="<?php echo esc_attr(wmvc_show_data('link_dash_text_attr', $settings));?>" |
| 42 |
id="<?php echo esc_attr(wmvc_show_data('link_dash_id', $settings));?>" class="wdk-element-button dash logout"> |
| 43 |
<?php if(wmvc_show_data('link_dash_icon_position', $settings) == 'left') :?> |
| 44 |
<?php \Elementor\Icons_Manager::render_icon( $settings['link_dash_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 45 |
<?php endif;?> |
| 46 |
<?php echo esc_html(wmvc_show_data('link_dash_text', $settings));?> |
| 47 |
<?php if(wmvc_show_data('link_dash_icon_position', $settings) == 'right') :?> |
| 48 |
<?php \Elementor\Icons_Manager::render_icon( $settings['link_dash_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 49 |
<?php endif;?> |
| 50 |
</a> |
| 51 |
<?php if(function_exists('run_wdk_messages_chat') && function_exists('wdk_dash_url')):?> |
| 52 |
<?php |
| 53 |
global $Winter_MVC_wdk_messages_chat; |
| 54 |
$this->WMVC->model('messages_m'); |
| 55 |
$total_new_message = $this->WMVC->messages_m->total_unread(); |
| 56 |
if($total_new_message): |
| 57 |
?> |
| 58 |
<a href="<?php echo esc_url(wdk_dash_url('dash_page=messages&function=chat'));?>" |
| 59 |
title="<?php echo esc_html__('New messages', 'wpdirectorykit');?>" class="count_messages"> |
| 60 |
<?php echo esc_html($total_new_message);?> |
| 61 |
</a> |
| 62 |
<?php endif;?> |
| 63 |
<?php endif;?> |
| 64 |
</span> |
| 65 |
<?php endif;?> |
| 66 |
</div> |
| 67 |
|
| 68 |
|