Current File : /home/kelaby89/teamhachem.com/wp-content/themes/artkombat/inc/template-parts.php
<?php if ( ! defined( 'ABSPATH' ) ) { die( 'Direct access forbidden.' ); }
/**
 * Functions that displays html parts of theme on output
 */


/**
 * Single comment function
 */
if ( !function_exists( 'artkombat_single_comment' ) ) {

	function artkombat_single_comment( $comment, $args, $depth ) {

		$GLOBALS['comment'] = $comment;
		switch ( $comment->comment_type ) {
			case 'pingback' :
				?>
				<li class="trackback"><?php esc_html_e( 'Trackback:', 'artkombat' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( esc_html__( 'Edit', 'artkombat' ), '<span class="edit-link">', '<span>' ); ?>
				<?php
				break;
			case 'trackback' :
				?>
				<li class="pingback"><?php esc_html_e( 'Pingback:', 'artkombat' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( esc_html__( 'Edit', 'artkombat' ), '<span class="edit-link">', '<span>' ); ?>
				<?php
				break;
			default :
				$author_id = $comment->user_id;
				$author_link = get_author_posts_url( $author_id );
				?>
				<li <?php comment_class( 'comment_item' ); ?>>
					<article id="comment-<?php comment_ID(); ?>" class="comment-body comment-single">
						<div class="comment-author-avatar">
							<?php echo get_avatar( $comment, 64 ); ?>
							
						</div>
						<div class="comment-content">
							<div class="comment-info">
	                            <h6 class="comment-author"><?php echo ( ! empty( $author_id ) ? '<a href="' . esc_url( $author_link ) . '">' : '') . comment_author() . ( ! empty( $author_id ) ? '</a>' : ''); ?></h6>

	                            <span class="comment-date-time">
	                            	<span class="comment-date">
	                            		<span class="comment_date_value"><?php echo get_comment_date( get_option( 'date_format' ) ); ?></span>
		                            	<?php echo esc_html__( 'at', 'artkombat' ); ?>
		                            	<span class="comment-time"><?php echo get_comment_date( get_option( 'time_format' ) ); ?></span>
	                            	</span>
	                            </span>
								<?php if ( $comment->comment_approved == 0 ) { ?>
								<div class="comment_not_approved"><?php esc_html_e( 'Your comment is awaiting moderation.', 'artkombat' ); ?></div>
								<?php } ?>	                            
							</div>
							<div class="comment_text_wrap">
								<div class="comment-text"><?php comment_text(); ?></div>
							</div>
							<?php if ( $depth < $args['max_depth'] ) { ?>
								<div class="comment-reply"><?php comment_reply_link( array_merge( $args, array(
									'depth' => $depth,
									'max_depth' => $args['max_depth'],
								) ) ); ?></div>
							<?php } ?>
						</div>
					</article>
				<?php
				break;
		}
	}
}


/**
 * Print html code with footer subscribe section
 */
if ( !function_exists( 'artkombat_the_subscribe_block' ) ) {
	
	function artkombat_the_subscribe_block() {

		global $wp_query;

	    if ( function_exists( 'FW' ) ) {

	    	$subscribe_layout = 'visible';

	        $subscribe_layout_global = fw_get_db_settings_option( 'subscribe' );

	        if ( $subscribe_layout_global == 'visible' ) {

	        	$subscribe_layout = 'visible';
	        }
	            else
	        if ( $subscribe_layout_global == 'hidden' ) {

	        	$subscribe_layout = 'disabled';
	        }

	        if ( $subscribe_layout != 'disabled' ) {

	        	// If default visibility, cheking page settings
	        	$subscribe_layout_page = fw_get_db_post_option( $wp_query->get_queried_object_id(), 'subscribe-layout' );

		        if ( $subscribe_layout_global == 'default' OR $subscribe_layout_page == 'disabled' ) {

		        	$subscribe_layout = $subscribe_layout_page;
		        }
	        	$subscribe_section = get_page_by_path( 'subscribe', OBJECT, 'sections' );
	        }

	        if ( !empty($subscribe_section) AND !empty($subscribe_layout) AND $subscribe_layout != 'disabled' ) {

	            echo '<div class="container subscribe-wrapper"><div class="subscribe-block">'.do_shortcode(wp_kses_post($subscribe_section->post_content)).'</div></div>';
	        }
	    }

	    return true;
	}
}


/**
 * Print html code with topbar section
 */
if ( !function_exists( 'artkombat_the_topbar_block' ) ) {

	function artkombat_the_topbar_block() {

		global $wp_query;

	    if ( function_exists( 'FW' ) ) {

	    	$topbar_layout = 'hidden';
	        $topbar_layout = fw_get_db_settings_option( 'topbar' );

	        if ( $topbar_layout != 'hidden' ) {

	        	$topbar_section = get_page_by_path( 'top-bar', OBJECT, 'sections' );

	        	// If default visibility, cheking page settings
	        	$topbar_layout_page = fw_get_db_post_option( $wp_query->get_queried_object_id(), 'topbar-layout' );

		        if ( $topbar_layout_page == 'disabled' ) {

		        	unset($topbar_section);
		        }
	        }

	        if ( !empty($topbar_section) ) {

	        	if ($topbar_layout == 'desktop') {

	        		$topbar_class = ' hidden-ms hidden-xs hidden-sm';
	        	}
	        		else {

	        		$topbar_class = '';
	        	}

	            echo '<div class="ltx-topbar-block'.esc_attr($topbar_class).'"><div class="container">'.do_shortcode(wp_kses_post($topbar_section->post_content)).'</div></div>';
	        }
	    }

	    return true;
	}
}

/**
 * Prints Footer widgets block
 */
if ( !function_exists( 'artkombat_the_footer_logo_section' ) ) {

	function artkombat_the_footer_logo_section() {

		if ( !function_exists( 'FW' ) ) {

			return false;
		}

		$section_layout = fw_get_db_settings_option( 'footer_top_layout' );
		if ( empty ($section_layout) OR $section_layout == 'hidden' ) {

			return false;
		}

        $artkombat_logo = fw_get_db_settings_option( 'logo' );
		?>
		<section id="ltx-logo-footer">

			<div class="container">
	            <?php

					if ( !empty($artkombat_logo) ) {

						echo '<span class="logo-footer">'.wp_get_attachment_image( $artkombat_logo['attachment_id'], 'full' ).'</span>';
					}

					artkombat_the_social_footer();
	            ?>
			</div>
		</section>
		<?php		
	}
}


/**
 * Displays footer social icons
 */
if ( !function_exists( 'artkombat_the_footer_icons' ) ) {

	function artkombat_the_footer_icons() {

		if ( !function_exists( 'FW' ) ) {

			return false;
		}

		$icons = fw_get_db_settings_option( 'footer-icons' );

		$target = "_blank";
		
		if ( !empty($icons) ) {

			if ( sizeof($icons) >= 3) {

				$col = 'col-lg-3 col-md-6 col-sm-6';
			}
				else
			if ( sizeof($icons) == 3) {

				$col = 'col-md-4';
			}
				else
			if ( sizeof($icons) == 2) {

				$col = 'col-md-6';
			}
				else {

				$col = 'col-md-12';
			}

			echo '<div class="ltx-footer-social">';

				echo '<div class="container">';
					echo '<div class="row">';
						foreach ($icons as $item ) {

							if ( !empty($item['href']) ) {

								echo '<div class="'.esc_attr($col).'"><a href="'. esc_url( $item['href'] ) .'" target="'.esc_attr( $target ).'" class="item" data-mh="ltx-social-footer"><span class="icon '. esc_attr( $item['icon_v2']['icon-class'] ) .'"></span><span class="header">'.esc_html($item['text']).'</span></a></div>';
							}
								else {

								echo '<div class="'.esc_attr($col).'"><span class="item" data-mh="ltx-social-footer"><span class="icon'. esc_attr( $item['icon_v2']['icon-class'] ) .'"></span><span class="header">'.esc_html($item['text']).'</span></span></div>';
							}
						}
					echo '</div>';

				echo '</div>';
			echo '</div>';
		}		
	}
}



/**
 * Prints Footer widgets block
 */
if ( !function_exists( 'artkombat_the_footer_widgets' ) ) {

	function artkombat_the_footer_widgets( $layout = null ) {

		global $wp_query;

		if ( !function_exists( 'FW' ) ) {

			return false;
		}

        $copyright_layout = fw_get_db_post_option( $wp_query->get_queried_object_id(), 'footer-layout' );
        if ( $copyright_layout == 'simple' OR $copyright_layout == 'copyright' OR $copyright_layout == 'copyright-transparent' ) {

        	return false;
        }

	    $artkombat_footer_cols = artkombat_get_footer_cols_num();
	    if ( $artkombat_footer_cols['num'] > 0 ): ?>
		<section id="ltx-widgets-footer" >
			<div class="container container-short">
				<div class="row">
	                <?php
	                for ($x = 1; $x <= 4; $x++): ?>
	                    <?php if ( !isset($artkombat_footer_cols['hidden'][ $x ]) && is_active_sidebar( 'footer-' . $x ) ): ?>
						<div class="<?php echo esc_attr( $artkombat_footer_cols['classes'][$x] ).' '.esc_attr( $artkombat_footer_cols['hidden_mobile'][$x] ); ?> matchHeight clearfix">    
							<div class="footer-widget-area">
								<?php
	                                dynamic_sidebar( 'footer-' . $x );
	                            ?>
							</div>
						</div>
						<?php endif; ?>
	                <?php
	                endfor; ?>
				</div>
			</div>
		</section>
	    <?php endif;
	}
}


/**
 * Display logo
 */
if ( !function_exists( 'artkombat_the_logo' ) ) {

	function artkombat_the_logo( $layout = null ) {

		echo '<a class="logo" href="'. esc_url( home_url( '/' ) ) .'">';

		if ( function_exists( 'FW' ) ) {

			if ( empty($layout) ) {

				$artkombat_logo = fw_get_db_settings_option( 'logo' );	
			}
				else
			if ( $layout == 'white' ) {

				$artkombat_logo = fw_get_db_settings_option( 'logo_white' );	

			}
				else
			if ( $layout == 'vert' ) {

				$artkombat_logo = fw_get_db_settings_option( 'logo_vert' );	
			}		
				else
			if ( $layout == 'vert_white' ) {

				$artkombat_logo = fw_get_db_settings_option( 'logo_vert_white' );	
			}					

			$artkombat_current_scheme =  apply_filters ('artkombat_current_scheme', array());
			if ($artkombat_current_scheme == 'default') {

				$artkombat_current_scheme = 1;
			}

			$artkombat_color_schemes = array();
			$artkombat_color_schemes_ = fw_get_db_settings_option( 'items' );
			if ( !empty($artkombat_color_schemes_) ) {

				foreach ($artkombat_color_schemes_ as $v) {

					$artkombat_color_schemes[$v['slug']] = $v;
				}			
			}

			if ( !empty($artkombat_current_scheme) AND $artkombat_current_scheme != 'default' ) {

			}

			if ( !empty( $artkombat_logo ) ) {

				echo wp_get_attachment_image( $artkombat_logo['attachment_id'], 'full' );
			}									
		}

		if ( empty( $artkombat_logo ) ) {

			echo '<img src="'. esc_url( get_template_directory_uri() . '/assets/images/logo.png' ) . '" alt="' . esc_attr( get_bloginfo( 'title' ) ) . '">';
		}

		echo '</a>';
	}
}


/**
 * Prints pageloader overlay, if enabled
 */
if ( !function_exists( 'artkombat_the_pageloader_overlay' ) ) {

	function artkombat_the_pageloader_overlay() {

		if ( function_exists( 'FW' ) ) {

			$artkombat_pace = fw_get_db_settings_option( 'page-loader' );
			if ( !empty($artkombat_pace) AND $artkombat_pace != 'disabled' ) {

				echo '<div id="preloader"></div>';
			}
		}
	}
}

/**
 * Print copyrights in footer
 */
if ( !function_exists( 'artkombat_the_copyrights' ) ) {

	function artkombat_the_copyrights() {

		if ( function_exists( 'FW' ) ) {

			$artkombat_copyrights = fw_get_db_settings_option( 'copyrights' );

			if ( !empty($artkombat_copyrights) ) {

				echo wp_kses_post( $artkombat_copyrights );	
			}
				else {
				
				echo '<p>'. esc_html__( 'Like-themes &copy; All Rights Reserved - 2018', 'artkombat' ) .'</p>';
			}
		}
			else {

			echo '<p>'. esc_html__( 'Like-themes &copy; All Rights Reserved - 2018', 'artkombat' ) .'</p>';
		}
	}
	
}

/**
 * Footer copyright block
 */
if ( !function_exists( 'artkombat_the_copyrights_section' ) ) {

	function artkombat_the_copyrights_section() {

		global $wp_query;

	    $copyright_layout = 'default';
	    if ( function_exists( 'FW' ) ) {

	        $copyright_layout = fw_get_db_post_option( $wp_query->get_queried_object_id(), 'footer-layout' );
	        $artkombat_logo = fw_get_db_settings_option( 'logo' );	        
	    }
		?>
		<footer class="copyright-block <?php echo 'copyright-layout-'.esc_attr($copyright_layout); ?>">
			<div class="container">
	            <?php

					if ( !empty($copyright_layout) AND $copyright_layout == 'simple' ) {

						if ( !empty($artkombat_logo) ) {

							echo '<span class="logo-footer">'.wp_get_attachment_image( $artkombat_logo['attachment_id'], 'full' ).'</span>';
						}

						artkombat_the_social_footer();
					}

	                artkombat_the_copyrights();
	                artkombat_the_go_top();
	            ?>
			</div>
		</footer>
		<?php
	}
}

/**
 * Displays go top icon
 */
if ( !function_exists( 'artkombat_the_go_top' ) ) {

	function artkombat_the_go_top() {

		if ( function_exists( 'FW' ) ) {

           	$class = '';
    		$go_top = fw_get_db_settings_option( 'go_top_visibility');
	        $go_top_pos = fw_get_db_settings_option( 'go_top_pos');
	        $go_top_img = fw_get_db_settings_option( 'go_top_img');

			if ( $go_top != 'hidden' ) {

				$class .= $go_top_pos;

        		if ( $go_top == 'desktop' ) {

        			$class .= 'hidden-xs hidden-ms';
        		}	
        			else
        		if ( $go_top == 'mobile' ) {

        			$class .= 'visbile-xs visible-ms';
       			}

	            if ( empty($go_top_img) ) {
	                
	                echo '<a href="#" class="ltx-go-top hidden-xs hidden-ms '.esc_attr($class).'"><span class="fa fa-arrow-up"></span></span></a>';
	            }
	            	else {

	            	echo '<a href="#" class="ltx-go-top ltx-go-top-img '.esc_attr($class).'">';
	                	echo wp_get_attachment_image( $go_top_img['attachment_id'], 'full' );
	                	echo '<span>'.esc_html__( 'go top', 'artkombat' ).'</span>';
	            	echo '</a>';
	           	}
			}
		}
	}
}

/**
 * Blog related posts
 */
if ( !function_exists( 'artkombat_related_posts' ) ) {

	function artkombat_related_posts($id) {

		if ( !function_exists('FW') ) {

			return false;
		}

		$tags = wp_get_post_tags($id);

		if ( !empty( $tags ) ) {

			$first_tag = $tags[0]->term_id;

			$args = array(

				'tag__in' => array($first_tag),
				'post__not_in' => array($id),
				'posts_per_page' => 2,
				'ignore_sticky_posts' => 1
			);

			$my_query = new WP_Query($args);
			if ( $my_query->have_posts() ) {

				set_query_var( 'artkombat_featured_disabled', true );
				echo '<div class="ltx-related blog blog-block layout-two-cols">';
				echo '<h3>'.esc_html__( 'Recent posts', 'artkombat' ).'</h3>';

				echo '<div class="row">';
				
				$x = 0;
				while ($my_query->have_posts()) {

					$x++;
					$my_query->the_post();

					$class = '';		

					echo '<div class="col-xl-6 col-lg-6 col-md-6 '.esc_attr($class).'">';
						get_template_part( 'tmpl/post-formats/list' );				
					echo '</div>';
				}

				echo '</div>';

				echo '</div>';				
			}

			wp_reset_query();
			set_query_var( 'artkombat_featured_disabled', false );
		}
	}
}

/**
 * Blog post author info block
 */
if ( !function_exists( 'artkombat_author_bio' ) ) {

	function artkombat_author_bio( ) {
	 
		global $post;
	 
		$content = '';

		if ( is_single() && isset( $post->post_author ) ) {
	 
			$display_name = get_the_author_meta( 'display_name', $post->post_author );

	 		if ( empty( $display_name ) ) {

	 			$display_name = get_the_author_meta( 'nickname', $post->post_author );
	 		}
	 
			$user_description = get_the_author_meta( 'user_description', $post->post_author );

			// No author info, nothing no show
			if ( empty( $user_description ) ) {

				return false;
			}
	 
			$user_website = get_the_author_meta('url', $post->post_author);
	 
			$user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author));

			$author_details = '';

			if ( ! empty( $user_description ) ) {

				$author_details .= '<p class="author-details">' . wp_kses_post( nl2br( $user_description ) ). '</p>';
			}
	  
			$author_details .= '<p class="author-links">';

				if ( ! empty( $user_website ) ) {
				 
					$author_details .= '<a href="' . esc_url( $user_website ) .'" target="_blank" rel="nofollow">'. esc_html__( 'Website', 'artkombat' ) . '</a><span class="i">|</span>';
				}

				$author_details .= '<a href="'. esc_url( $user_posts ) .'" class="btn btn-main btn-xs">'. esc_html__( 'All posts', 'artkombat' ) . '</a>';  
		 
			$author_details .= '</p>';

	 
			$content = '<section class="ltx-author-bio">';
				$content .= '<div class="author-image">';
					$content .= get_avatar( get_the_author_meta('user_email'), 90 );
	  
					if ( ! empty( $display_name ) ) {

						$content .= '<span><p class="author-name">'. esc_html__( 'Author', 'artkombat' ) . '</p><h5>'. $display_name . '</h5></span>';
					}
			 
				$content .= '</div>';
				$content .= '<div class="author-info">';
					$content .= $author_details;
				$content .= '</div>';
			$content .= '</section>';
		}

		echo wp_kses_post( $content );
	}
}

/**
 * Displays post top info
 */

if ( !function_exists( 'artkombat_get_the_post_headline' ) ) {

	function artkombat_get_the_post_headline( $headline = 'inline' ) {

		echo '<div class="ltx-post-headline">';

		if ( $headline == 'date' ) {

			echo '<a href="'. esc_url( get_the_permalink() ) .'" class="ltx-date-large"><span class="date-d">'.get_the_date('d').'</span><span class="date-my">'.get_the_date('M').', '.get_the_date('y').'</span></a>';
		}
			else {

			echo '<a href="'. esc_url( get_the_permalink() ) .'" class="ltx-date"><span class="dt">'.get_the_date().'</span></a>';
		}
    
		if ( function_exists( 'pvc_post_views' ) ) {

			$count = (int)(strip_tags( pvc_post_views(get_the_ID(), false) ));

			echo '<span class="i">/</span>';
			echo '
			<span class="icon-fav">
				<span class="fa fa-eye"></span><i>' . esc_html( $count ) .'</i>
			</span>';
		}


	    if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {

	    	echo '<span class="i">/</span>';
	    	echo '<span class="icon-comments"><span class="fa fa-commenting"></span><a href="'. esc_url( get_the_permalink() ) .'">';

	    	echo get_comments_number();

	    	echo '</a></span>';
	    }


		echo '</div>';
	}
}

/**
 * Displays cats for posts archive
 */

if ( !function_exists( 'artkombat_get_the_cats_archive' ) ) {

	function artkombat_get_the_cats_archive(  ) {

		if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && artkombat_categorized_blog() ) {

			$categories = get_the_category();

			echo '<span class="ltx-cats">';
				if ( !empty($categories) )  {

					echo '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>';
				}
			echo '</span>';
		}

	}
}

/**
 * Displays Blog post info icons block
 * 
 */
if ( !function_exists( 'artkombat_the_post_info' ) ) {

	function artkombat_the_post_info( $authorby = true, $commentsText = false ) {

		$wrapper = true;

	    if ( $wrapper ) {

	    	echo '<ul>';
	    }


		if ( function_exists( 'pvc_post_views' ) ) {

			$count = (int)(strip_tags( pvc_post_views(get_the_ID(), false) ));

			echo '<li class="icon-fav">
				<span class="fa fa-eye"></span><i>' . esc_html( $count ) .'</span></i>
			</li>';
		}

	    
	    if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {

	    	echo '<li class="icon-comments"><span class="fa fa-commenting"></span>';

	    	echo get_comments_number();

	    	echo '</li>';
	    }

	    if ( $wrapper ) {

	    	echo '</ul>';
	    }

	    if ( $authorby ) {

			echo '<div class="ltx-user">'.get_avatar( get_the_author_meta('user_email'), 50 ).'<span class="info">'. esc_html__( 'by', 'artkombat' ) . ' ' .get_the_author_link().'</span></div>';
		}

	}
}

/**
 * Displays Navigation bar icons
 * 
 */
if ( !function_exists( 'artkombat_the_navbar_icons' ) ) {

	function artkombat_the_navbar_icons( $layout = null, $mobile = false ) {

		global $user_ID;

		if ( !function_exists( 'FW' ) ) { return false; }

		$basket_icon = fw_get_db_settings_option( 'basket-icon' );
		$icons = fw_get_db_settings_option( 'navbar-icons' );
		$basket_only = false;

		if ( $mobile ) {

		}
			else
		if ( $layout == 'basket-only' AND $basket_icon == 'mobile' ) {

			$basket_only = true;
		}

		$items = '';
		if ( !empty($icons) ) {

			foreach ($icons as $item) {

				if ( !empty( $basket_only ) AND $item['type']['type_radio'] != 'basket' ) continue;

				$li_class = '';
				if ( empty($mobile) AND empty( $basket_only ) ) {

					if ( empty($item['icon-visible']) || $item['icon-visible'] != 'visible-mob' ) {

						$li_class = ' hidden-md hidden-sm hidden-ms hidden-xs';
					}
						else {

						$li_class = ' hidden-xs';
					}				
				}

				$custom_icon = '';
				if ( $item['icon-type']['icon_radio'] == 'fa' AND !empty($item['icon-type']['fa']['icon_fa']) ) {

					$custom_icon = $item['icon-type']['fa']['icon_fa'];
				}

				if ( $item['type']['type_radio'] == 'search') {

					if ( empty( $custom_icon ) ) { $custom_icon = 'fa-search'; }

					if ( !empty($mobile) ) {

						$id = ' id="top-search-ico-mobile" ';
						$close = '';
					}	
						else {

						$id = ' id="top-search-ico" ';
						$close = '<a href="#" id="top-search-ico-close" class="top-search-ico-close fa fa-close" aria-hidden="true"></a>';
					}

					$items .= '
					<li class="ltx-fa-icon ltx-nav-search  '.esc_attr($li_class).'">
						<div class="top-search">
							<a href="#" '.$id.' class="top-search-ico fa '. esc_attr($custom_icon) .'" aria-hidden="true"></a>
							'.$close.'
							<input placeholder="'.esc_attr__( 'Search', 'artkombat' ).'" value="'. esc_attr( get_search_query() ) .'" type="text">
						</div>
					</li>';
				}

				if ( $item['type']['type_radio'] == 'basket' AND artkombat_is_wc('wc_active')) {

					if ( empty( $custom_icon ) ) { $custom_icon = 'fa-shopping-bag'; }

					$items .= '
						<li class="ltx-fa-icon ltx-nav-cart '.esc_attr($li_class).'">
							<div class="cart-navbar">
								<a href="'. wc_get_cart_url() .'" class="ltx-cart cart shop_table" title="'. esc_attr__( 'View your shopping cart', 'artkombat' ). '">';

									if ( $item['type']['basket']['count'] == 'show' ) {

										$items .= '<span class="cart-contents header-cart-count count">'.WC()->cart->get_cart_contents_count().'</span>';
									}

									$items .= '<i class="fa '. esc_attr($custom_icon) .'" aria-hidden="true"></i>
								</a>
							</div>
						</li>';
				}

				if ( $item['type']['type_radio'] == 'profile' ) {

					if ( empty( $custom_icon ) ) { $custom_icon = 'fa-user-circle-o'; }

					$header = '';
					$userInfo = get_userdata($user_ID);
					if ( !empty($userInfo) ) $header = $userInfo->user_login;
						else
					if ( empty($userInfo) AND !empty($item['type']['profile']['header']) ) $header = $item['type']['profile']['header'];

					$items .= '
						<li class="ltx-fa-icon ltx-nav-profile menu-item-has-children '.esc_attr($li_class).'">
							<a href="'. get_permalink( get_option('woocommerce_myaccount_page_id') ) .'"><span class="fa '. esc_attr($custom_icon) .'"></span>
							 '.esc_html( $header ).'</a>';

						$items .= '</li>';
				}

				if ( $item['type']['type_radio'] == 'social' AND !empty($custom_icon)) {

					$items .= '
						<li class="ltx-fa-icon ltx-nav-social '.esc_attr($li_class).'">
							<a href="'. esc_url( $item['type']['social']['href'] ) .'" class="fa '. esc_attr($custom_icon) .'" target="_blank">
							</a>
						</li>';
				}	
			}
		}

		if ( !empty($items) ) {

			if ( empty( $mobile ) ) {

				echo '<div class="ltx-navbar-icons"><ul>'.$items.'</ul></div>';
			}
				else {

				echo '<div><ul>'.$items.'</ul></div>';
			}
		}
	}
}


/**
 * Get page breadcrumbs
 */
if ( !function_exists( 'artkombat_the_breadcrumbs' ) ) {

	function artkombat_the_breadcrumbs() {

		if ( function_exists( 'bcn_display' ) && !is_front_page() ) {

			echo '<ul class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">';
			bcn_display_list();
			echo '</ul>';
		}
	}
}

/**
 * Social icons in header
 */
if ( !function_exists( 'artkombat_the_social_header' ) ) {

	function artkombat_the_social_header() {

		if ( function_exists( 'FW' ) ) {
			
			$artkombat_social = fw_get_db_settings_option( 'header-social' );
			$artkombat_social_text = fw_get_db_settings_option( 'header-social-text' );

			if ( $artkombat_social == 'enabled' ) {

				do_shortcode('[artkombat-social text="'.esc_attr( $artkombat_social_text ).'"]');
			}
		}
	}
}
	
/**
 * Social icons in footer
 */
if ( !function_exists( 'artkombat_the_social_footer' ) ) {

	function artkombat_the_social_footer() {

		// In this theme we using same markup as header
		artkombat_the_social_header();
	}
}		

/**
 * Social icons in navbar
 */
if ( !function_exists( 'artkombat_the_navbar_social' ) ) {

	function artkombat_the_navbar_social() {

		global $wp_query;

		if ( function_exists( 'FW' ) ) {

			$navbar_layout = fw_get_db_post_option( $wp_query->get_queried_object_id(), 'navbar-layout' );

			if ( !empty( $navbar_layout ) ) {

				echo '<div class="navbar-social">';
				
					do_shortcode('[ltx-social]');

				echo '</div>';
			}
		}
	}
}

Page not found – Hello World !