HEX
Server: LiteSpeed
System: Linux cde2.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dtptviut (1121)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dtptviut/domains/morsunivers.dk/public_html/wp-content/themes/mts_dropshipping/header.php
<?php
/**
 * The template for displaying the header.
 *
 * Displays everything from the doctype declaration down to the navigation.
 *
 * @package Dropshipping
 */
?>
<!DOCTYPE html>
<?php $mts_options = get_option( MTS_THEME_NAME ); ?>
<html class="no-js" <?php language_attributes(); ?>>
<head itemscope itemtype="http://schema.org/WebSite">
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
	<!--[if IE ]>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<![endif]-->
	<link rel="profile" href="http://gmpg.org/xfn/11" />
	<?php mts_meta(); ?>
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
	<?php wp_head(); ?>
</head>
<body id="blog" <?php body_class( 'main' ); ?> itemscope itemtype="http://schema.org/WebPage">
	<div class="main-container">
		<header id="site-header" role="banner" itemscope itemtype="http://schema.org/WPHeader">
			<div class="top-header">
				<div class="container clearfix">
					<?php
					$mts_top_description = $mts_options['mts_top_description'];
					if ( ! empty( $mts_top_description ) ) {
						echo '<div class="top-description">';
						echo $mts_top_description;
						echo '</div>';
					}
					?>
					<?php if ( $mts_options['mts_show_top_nav'] == '1' ) {
						?>
						<nav class="navigation">
							<?php if ( has_nav_menu( 'top-menu' ) ) { ?>
								<?php wp_nav_menu( array( 'theme_location' => 'top-menu', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
							<?php } ?>
						</nav>
						<?php
					}
					$mts_social_icon_header = $mts_options['mts_social_icon_header'];
					$mts_header_social      = $mts_options['mts_header_social'];
					if ( '1' === $mts_social_icon_header && ! empty( $mts_header_social ) && is_array( $mts_header_social ) ) { 
						?>
						<div class="header-social">
							<?php
							foreach ( $mts_header_social as $header_icons ) :
								$mts_header_icon       = $header_icons['mts_header_icon'];
								$mts_header_icon_link  = $header_icons['mts_header_icon_link'];
								$mts_header_icon_color = $header_icons['mts_header_icon_color'];
								if ( ! empty( $mts_header_icon ) && isset( $mts_header_icon ) ) : ?>
									<a href="<?php print $mts_header_icon_link; ?>" class="header-<?php print $mts_header_icon; ?>" style="color: <?php echo $mts_header_icon_color; ?>; "><span class="fa fa-<?php print $mts_header_icon; ?>"></span></a>
									<?php
								endif;
							endforeach;
							?>
						</div>
					<?php } ?>
				</div>
			</div>
			<div id="header">
				<div class="container">
					<div class="logo-wrap">
						<?php
						$mts_logo = wp_get_attachment_image_src( $mts_options['mts_logo'], 'full' );
						if ( '' !== $mts_options['mts_logo'] && $mts_logo ) {
							if ( is_home() || is_404() ) {
								?>
								<h1 id="logo" class="image-logo" itemprop="headline">
									<a href="<?php echo esc_url( home_url() ); ?>"><img src="<?php echo esc_url( $mts_logo[0] ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" width="<?php echo esc_attr( $mts_logo[1] ); ?>" height="<?php echo esc_attr( $mts_logo[2] ); ?>"></a>
								</h1><!-- END #logo -->
								<?php
							} else {
								?>
								<h2 id="logo" class="image-logo" itemprop="headline">
									<a href="<?php echo esc_url( home_url() ); ?>">
										<img src="<?php echo esc_url( $mts_logo[0] ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" width="<?php echo esc_attr( $mts_logo[1] ); ?>" height="<?php echo esc_attr( $mts_logo[2] ); ?>"></a>
								</h2><!-- END #logo -->
								<?php
							}
						} else {
							if ( is_home() || is_404() ) {
								?>
								<h1 id="logo" class="text-logo" itemprop="headline">
									<a href="<?php echo esc_url( home_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
								</h1><!-- END #logo -->
								<?php
							} else {
								?>
								<h2 id="logo" class="text-logo" itemprop="headline">
									<a href="<?php echo esc_url( home_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
								</h2><!-- END #logo -->
								<?php
							}
						}
						?>
					</div>
					<?php
					if ( ! empty( $mts_options['mts_header_search'] ) ) {
						?>
						<div class="widget widget_search">
							<form method="get" id="searchform" class="search-form" action="<?php echo esc_attr( home_url() ); ?>" _lpchecked="1">
								<fieldset>
									<?php
									if ( mts_is_wc_active() && ( is_woocommerce() || is_home() || is_cart() || is_checkout() || is_account_page() || mts_is_wishlist_page() ) ) { ?>
										<input type="text" name="s" id="s" value="" placeholder="<?php esc_html_e( 'Search for product', 'dropshipping' ); ?>" autocomplete="off" />
										<?php if ( isset($_REQUEST['product_cat'] ) && ! empty( $_REQUEST['product_cat'] ) ) {
											$optselect = $_REQUEST['product_cat'];
										} else {
											$optselect = 0;
										}
										$args = array(
											'show_option_all' => esc_html__( 'Select Category', 'dropshipping' ),
											'hierarchical' => 1,
											'class'        => 'header-cat',
											'taxonomy'     => 'product_cat',
											'name'         => 'product_cat',
											'echo'         => 1,
											'value_field'  => 'slug',
											'selected'     => $optselect,
										);
										wp_dropdown_categories( $args );
										?>
										<input type="hidden" name="post_type" value="product" class="post-type-input"/>
										<?php
									} else {
										?>
										<input type="text" name="s" id="s" value="" placeholder="<?php esc_html_e( 'Enter Keyword...', 'dropshipping' ); ?>" autocomplete="off" /> 
										<?php
										if ( isset($_REQUEST['cat'] ) && ! empty( $_REQUEST['cat'] ) ) {
											$optselect = $_REQUEST['cat'];
										} else {
											$optselect = 0;
										}
										$args = array(
											'show_option_all' => esc_html__( 'Select Category', 'dropshipping' ),	
											'hierarchical'    => 1,
											'echo'            => 1,
											'class'           => 'header-cat',
											'value_field'     => 'slug',
											'selected'        => $optselect,
										);
										wp_dropdown_categories( $args );
										?>  
										<input type="hidden" name="post_type" value="post" class="post-type-input"/>
									<?php } ?>									
									<button id="search-image" class="sbutton" type="submit" value=""><i class="fa fa-search"></i></button>
								</fieldset>
							</form>
						</div>
						<?php
					}
					if ( mts_is_wc_active() && ( $mts_options['mts_login_register'] == '1' || ( ! empty( $mts_options['mts_header_wishlist'] ) && ! empty( $mts_options['mts_wishlist'] ) ) || $mts_options['mts_header_cart'] == '1' ) ) { ?>
						<div class="header-carts">
							<?php
							if ( $mts_options['mts_login_register'] == '1' ) { 
								?>
								<div class="header-login-register">
									<?php if ( is_user_logged_in() ) { ?>
										<div class="login-wrap logged-in">
											<?php
											$current_user = wp_get_current_user();
											echo get_avatar( $current_user->ID, 30 );
											?>
											<span class="user-name"><?php echo $current_user->display_name; ?></span>
											<div class="logged-in-sub">
												<a href="<?php echo get_edit_user_link(); ?>"><?php esc_html_e( 'Edit Profile','dropshipping' ); ?></a>
												<a href="<?php echo wp_logout_url(); ?>"><?php esc_html_e( 'Logout','dropshipping' ); ?></a>
											</div>
										</div>
									<?php } else { ?>
										<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','dropshipping'); ?>" class="login-text"><?php _e('Login / Register','dropshipping'); ?></a>
										<div class="header-login-form"><?php woocommerce_login_form(); ?></div>
									<?php } ?>
								</div>	
								<?php
							}
							if ( ! empty( $mts_options['mts_header_wishlist'] ) && ! empty( $mts_options['mts_wishlist'] ) ) {
								mts_wishlist_link();
							}
							if ( $mts_options['mts_header_cart'] == '1' ) {
								mts_cart();
							}
							?>
						</div>
						<?php
					}
					?>
				</div>
			</div>   

			<?php
			if ( is_active_sidebar( 'widget-header' ) ) {
				dynamic_sidebar('widget-header');
			}
			?>

			<div class="mts-bottom-header">
				<?php
				if ( $mts_options['mts_sticky_nav'] == '1' ) {
					?>
					<div id="catcher" class="clear" ></div>
					<div id="secondary-nav-container" class="sticky-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
				<?php } else { ?>
					<div id="secondary-nav-container" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
				<?php } ?>
				<div class="container clearfix">
					<?php
					if ( $mts_options['mts_nav_title'] == '1' && ! empty( $mts_options['mts_nav_text'] ) ) {
						?>
						<div class="mts-nav-title">
							<a href="javascript:void(0);" class="mts-nav-header-link">
								<i class="fa fa-<?php print $mts_options['mts_nav_title_icon'];?>"></i>
								<span><?php echo $mts_options['mts_nav_text']; ?></span>
							</a>
						<?php
					}
					if ( $mts_options['mts_show_primary_nav'] == '1' ) {
						?>
						<div id="primary-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
						<?php
						if ( '1' !== $mts_options['mts_show_secondary_nav'] ) {
							?>
							<a href="#" id="pull" class="toggle-mobile-menu"><?php esc_html_e( 'Menu', 'dropshipping' ); ?></a>
							<?php
						}
						?>
						<nav class="navigation clearfix<?php if ( '1' !== $mts_options['mts_show_secondary_nav'] ) echo ' mobile-menu-wrapper'; ?>">
							<?php if ( has_nav_menu( 'primary' ) ) { ?>
								<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
							<?php } else { ?>
								<ul class="menu clearfix">
									<?php wp_list_pages('title_li='); ?>
								</ul>
							<?php } ?>
						</nav>			
						</div>
						<?php
					}
					if ( $mts_options['mts_nav_title'] == '1' && ! empty( $mts_options['mts_nav_text'] ) ) {
						echo '</div>';
					}
					if ( $mts_options['mts_show_secondary_nav'] == '1' ) { 
						?>
						<div id="secondary-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
							<a href="#" id="pull" class="toggle-mobile-menu"><?php esc_html_e( 'Menu', 'dropshipping' ); ?></a>
							<?php if ( has_nav_menu( 'mobile' ) ) { ?>
								<nav class="navigation clearfix">
									<?php if ( has_nav_menu( 'secondary' ) ) { ?>
										<?php wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
									<?php } else { ?>
										<ul class="menu clearfix">
											<?php wp_list_categories('title_li='); ?>
										</ul>
									<?php } ?>
								</nav>
								<nav class="navigation mobile-only clearfix mobile-menu-wrapper">
									<?php wp_nav_menu( array( 'theme_location' => 'mobile', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
								</nav>
							<?php } else { ?>
								<nav class="navigation clearfix mobile-menu-wrapper">
									<?php if ( has_nav_menu( 'secondary' ) ) { ?>
										<?php wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
									<?php } else { ?>
										<ul class="menu clearfix">
											<?php wp_list_categories('title_li='); ?>
										</ul>
									<?php } ?>
								</nav>
							<?php } ?>
						</div>
					<?php } ?>
					<?php if ( ! empty( $mts_options['mts_header_buttons'] ) && is_array($mts_options['mts_header_buttons']) && ! empty($mts_options['mts_header_buttons_section'])) { ?>
						<div class="mts_header_buttons">
							<?php foreach ( $mts_options['mts_header_buttons'] as $button ) :
								$mts_header_button_title = $button['mts_header_button_title'];
								$mts_header_button_link  = $button['mts_header_button_link'];
								$mts_header_button_color = $button['mts_header_button_color'];
								if( ! empty( $mts_header_button_link ) || ! empty( $mts_header_button_title ) ) : ?>
									<div class="header-button">
										<?php if( ! empty( $mts_header_button_link )) { ?><a href="<?php print $button['mts_header_button_link'] ?>" style="color: <?php echo $mts_header_button_color; ?>; "><?php } print $mts_header_button_title; if( ! empty( $mts_header_button_link )) { ?></a> <?php } ?> 
									</div>
								<?php endif;
							endforeach; ?>
						</div>
					<?php } ?>
				</div>	
				</div>
			</div>
		</header>