PluginProbe
WP Directory Kit / 1.2.3
WP Directory Kit v1.2.3
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / elementor-elements / views / wdk-button-login.php

wdk-button-login.php in WP Directory Kit 1.2.3, at elementor-elements/views/wdk-button-login.php

68 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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')):?>
52 <?php
53 global $Winter_MVC_wdk_messages_chat;
54 $Winter_MVC_wdk_messages_chat->model('messageschat_m');
55 $total_new_message = $Winter_MVC_wdk_messages_chat->messageschat_m->total_relationship_user(get_current_user_id(), array('chat_is_readed IS NULL'=>NULL));
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