Current File : /home/kelaby89/iluxelectrical.com.au/wp-content/themes/strnix/framework/classes/strnix-int.php
<?php

	class strnix_Int {
		/**
		 * All header and breadcrumb.
		 */
		public static function strnix_breadcrumb() {
				$breadcrumb_title = 'strnix';
				$breadcrumb_class = 'breadcrumb_no_bg';
				if ( is_front_page() && is_home() ) :
					$breadcrumb_title = ''; // deafult blog
					$breadcrumb_class = 'deafult-home-breadcrumb';
				elseif ( is_front_page() && !is_home() ) :
					$breadcrumb_title = ''; // custom home or deafult
					$breadcrumb_class = 'custom-home-breadcrumb';
				elseif ( is_home() ) :
					$blog_breadcrumb_switch = strnix_get_options('blog_breadcrumb_switch');
					if ( $blog_breadcrumb_switch == '1' ) :
						$blog_breadcrumb_content = strnix_get_options('blog_breadcrumb_content');
						$breadcrumb_title = $blog_breadcrumb_content;
					else :
						$breadcrumb_title = '';
					endif;
					$breadcrumb_class = 'blog-breadcrumb';
				elseif ( is_archive() ) :
					$breadcrumb_title = get_the_archive_title();
					$breadcrumb_class = 'blog-breadcrumb';
				elseif ( is_single() ) :
					$blog_single_breadcrumb_switch = strnix_get_options('blog_single_breadcrumb_switch');
					if ( $blog_single_breadcrumb_switch == '1' ) :
						$blog_single_breadcrumb_content = strnix_get_options('blog_single_breadcrumb_content');
						$breadcrumb_title = $blog_single_breadcrumb_content;
					else :
						$breadcrumb_title = '';
					endif;
					$breadcrumb_class = 'blog-single-breadcrumb';
				elseif ( is_404() ) :
					$breadcrumb_title = esc_html__('Error Page', 'strnix');
					$breadcrumb_class = 'blog-breadcrumb';
				elseif ( is_search() ) :
					if ( have_posts() ) :
						$breadcrumb_title = esc_html__('Search Results for: ', 'strnix') . get_search_query();
						$breadcrumb_class = 'blog-breadcrumb';
					else :
						$breadcrumb_title = esc_html__('Nothing Found', 'strnix');
						$breadcrumb_class = 'blog-breadcrumb';
					endif;
				elseif ( !is_home() && !is_front_page() && !is_search() && !is_404() ) :
					$breadcrumb_title = get_the_title();
					$breadcrumb_class = 'page-breadcrumb';
				endif;
				$breadcrumb_active_class = 'breadcrumb-not-active';
				if (function_exists('bcn_display')) : 
					$breadcrumb_active_class = '';
				endif;

			?>
			<?php
				$strnix_show_breadcrumb = get_post_meta(get_the_ID(), 'strnix_theme_metabox_show_breadcrumb', true);
			?>
			<?php if ($strnix_show_breadcrumb != 'off') : ?>
				<?php if(isset($breadcrumb_title) && !empty($breadcrumb_title)) : ?>
					<section class="page-banner <?php echo esc_attr($breadcrumb_class . ' ' . $breadcrumb_active_class); ?>">
						<div class="image-layer"></div>
						<div class="auto-container">
							<?php if (function_exists('bcn_display')) : ?>
								<div class="breadcrumb-box">
									<div class="auto-container">
										<?php bcn_display(); ?>
									</div>
								</div>
							<?php endif; ?>
							<h1><?php echo wp_kses($breadcrumb_title,'code_contxt'); ?></h1>
						</div>
					</section>
				<?php endif; ?>
			<?php endif; ?>
			<?php
		}
		/**
		 * preloader compatibility.
		 */
		public static function strnix_preloader() {
				$preloader_on_off = strnix_get_options('preloader_on_off');
			?>
				<?php if($preloader_on_off) : ?>
					<div class="preloader"><div class="icon"></div></div>
				<?php endif; ?>
			<?php
		}
		/**
		 * back to top compatibility.
		 */
		public static function strnix_back_to_top() {
				$back_to_top_on_off = strnix_get_options('back_to_top_on_off');
			?>
				<?php if($back_to_top_on_off === '1') : ?>
					<div class="scroll-top-footer scroll-to-target" data-target="html"><span class="flaticon-arrows"></span></div>
				<?php endif;?>
			<?php
		}
		/**
		 * header top bar one compatibility.
		 */
		public static function strnix_header_topbar_one() {
				$topbar_inof_text = strnix_get_options('topbar_inof_text');
				$topbar_email_title = strnix_get_options('topbar_email_title');
				$topbar_email = strnix_get_options('topbar_email');
				$top_bar_social_icon = strnix_get_options('top_bar_social_icon');
			?>
				<div class="header-top header-top-one">
					<div class="auto-container">
						<div class="inner clearfix">
							<?php if($topbar_inof_text) : ?>
								<div class="top-left clearfix">
									<div class="top-text"><?php echo wp_kses($topbar_inof_text, 'code_contxt'); ?></div>
								</div>
							<?php endif; ?>
							<?php if($topbar_email_title || $top_bar_social_icon) : ?>
								<div class="top-right clearfix">
									<?php if($topbar_email_title) : ?>
										<div class="email">
											<a href="mailto:<?php echo esc_attr($topbar_email); ?>"><?php echo wp_kses($topbar_email_title, 'code_contxt'); ?> <?php echo wp_kses($topbar_email, 'code_contxt'); ?>
											</a>
										</div>
									<?php endif; ?>
									<?php if($top_bar_social_icon) : ?>
										<ul class="social-links clearfix">
											<?php echo wp_kses($top_bar_social_icon, 'code_contxt'); ?>
										</ul>
									<?php endif; ?>
								</div>
							<?php endif; ?>
						</div>
					</div>
				</div>
			<?php
		}
		/**
		 * header top bar two compatibility.
		 */
		public static function strnix_header_topbar_two() {
				$topbar_inof_text = strnix_get_options('topbar_inof_text');
				$topbar_email_title = strnix_get_options('topbar_email_title');
				$topbar_email = strnix_get_options('topbar_email');
				$topbar_phone = strnix_get_options('topbar_phone');
				$topbar_phone_num = strnix_get_options('topbar_phone_num');
				$top_bar_menu_link = strnix_get_options('top_bar_menu_link');
				$top_bar_social_icon = strnix_get_options('top_bar_social_icon');
			?>
				<div class="header-top header-top-two">
					<div class="auto-container">
						<div class="inner clearfix">
							<div class="top-left clearfix">
								<div class="address">
									<?php echo wp_kses($topbar_inof_text, 'code_contxt'); ?>
								</div>
								<div class="email">
									<a href="mailto:<?php echo esc_attr($topbar_email); ?>"><?php echo wp_kses($topbar_email_title, 'code_contxt'); ?> <?php echo wp_kses($topbar_email, 'code_contxt'); ?>
									</a>
								</div>
							</div>

							<div class="top-right clearfix">
								<?php if($top_bar_menu_link) : ?>
									<div class="links">
											<ul class="clearfix">
												<?php echo wp_kses($top_bar_menu_link, 'code_contxt'); ?>
											</ul>
									</div>
								<?php endif; ?>
								<?php if($top_bar_social_icon) : ?>
									<ul class="social-links clearfix">
										<?php echo wp_kses($top_bar_social_icon, 'code_contxt'); ?>
									</ul>
								<?php endif; ?>
							</div>
						</div>
					</div>
				</div>
			<?php
		}
		/**
		 * header top bar three compatibility.
		 */
		public static function strnix_header_topbar_three() {
			$topbar_inof_text = strnix_get_options('topbar_inof_text');
			$topbar_email_title = strnix_get_options('topbar_email_title');
			$topbar_email = strnix_get_options('topbar_email');
			$topbar_phone = strnix_get_options('topbar_phone');
			$topbar_phone_num = strnix_get_options('topbar_phone_num');
			$top_bar_social_icon = strnix_get_options('top_bar_social_icon');
			?>
				<div class="header-top header-top-three">
					<div class="auto-container">
						<div class="inner clearfix">
							<div class="top-left clearfix">
								<div class="top-text"><?php echo wp_kses($topbar_inof_text, 'code_contxt'); ?></div>
							</div>
							<?php if($topbar_phone_num || $topbar_email) : ?>
								<div class="top-right clearfix">
									<?php if($topbar_phone_num || $topbar_email) : ?>
										<div class="links">
											<ul class="clearfix">
												<?php if($topbar_phone_num) : ?>
													<li>
														<div class="phone"><?php echo wp_kses($topbar_phone, 'code_contxt'); ?>
															<a href="tel:<?php echo esc_attr($topbar_phone_num); ?>"><?php echo wp_kses($topbar_phone_num, 'code_contxt'); ?>
															</a>
														</div>
													</li>
												<?php endif; ?>
												<?php if($topbar_email) : ?>
													<li>
														<div class="email">
															<a href="mailto:<?php echo esc_attr($topbar_email); ?>"><?php echo wp_kses($topbar_email_title, 'code_contxt'); ?> <?php echo wp_kses($topbar_email, 'code_contxt'); ?>
															</a>
														</div>
													</li>
												<?php endif; ?>
											</ul>
										</div>
									<?php endif; ?>
									<?php if($top_bar_social_icon) : ?>
										<ul class="social-links clearfix">
											<?php echo wp_kses($top_bar_social_icon, 'code_contxt'); ?>
										</ul>
									<?php endif; ?>
								</div>
							<?php endif; ?>
						</div>
					</div>
				</div>
			<?php
		}
		/**
		 * header logo compatibility.
		 */
		public static function strnix_header_logo() {
			?>
				<div class="logo-box">
					<div class="logo">
						<?php
							$strnix_theme_metabox_header_logo = get_post_meta(get_the_ID(), 'strnix_theme_metabox_header_logo', array( 'size' => 'full' ));
							if(!empty($strnix_theme_metabox_header_logo)) {
								?>
								<a href="<?php echo esc_url(home_url('/')); ?>">
									<img src="<?php echo esc_url( wp_get_attachment_url( $strnix_theme_metabox_header_logo ) );?>" alt="<?php esc_attr_e('Logo', 'strnix') ?>">
								</a> 
								<?php
							} else {
								if (has_custom_logo()) {
									the_custom_logo();
								} elseif (!has_custom_logo()) {
									?>
									<a href="<?php echo esc_url(home_url('/')); ?>">
										<img src="<?php echo esc_url(STRNIX_IMG_URL . 'logo.svg') ?>" alt="<?php esc_attr_e('Logo', 'strnix') ?>">
									</a> 
									<?php
								}
							}
						?>
					</div>
				</div>
			<?php
		}
		/**
		 * header menu compatibility.
		 */
		public static function strnix_header_menu() {
			?>
				<nav class="main-menu navbar-expand-md navbar-light">
					<div class="collapse navbar-collapse show clearfix" id="navbarSupportedContent">
						<?php
							if ( has_nav_menu( 'primary' ) ) { ?>
								<?php
									wp_nav_menu( array(
										'theme_location' => 'primary',
										'menu_class'      => 'navigation clearfix',
										'container'       => 'ul',
									) );
								?>
							<?php }else{ ?>
									<?php
										wp_nav_menu( array(
											'menu_class'      => 'navigation clearfix',
											'container'       => 'ul',
										) );
									?>
								<?php
							}
						?>
					</div>
				</nav>
			<?php
		}
		/**
		 * sticky header compatibility.
		 */
		public static function strnix_sticky_header() {
			$sticky_header_logo = strnix_get_options('sticky_header_logo');
			?>
				<div class="sticky-header">
					<div class="auto-container clearfix">
						<!--Logo-->
						<div class="logo pull-left">
							<?php if ( isset($sticky_header_logo['url'] ) && $sticky_header_logo['url'] != '' ) : ?>
								<a href="<?php echo esc_url(home_url('/')); ?>" ><img src="<?php echo esc_url($sticky_header_logo['url'], 'strnix'); ?>"></a>
							<?php else : ?>
								<a href="<?php echo esc_url(home_url('/')); ?>" ><img src="<?php echo esc_url(STRNIX_IMG_URL . 'sticky-logo.png') ?>" alt="<?php esc_attr_e('Logo', 'strnix') ?>"></a>
							<?php endif; ?>
						</div>
						<!--Right Col-->
						<div class="pull-right">
							<!-- Main Menu -->
							<nav class="main-menu clearfix">
								<!--Keep This Empty / Menu will come through Javascript-->
							</nav><!-- Main Menu End-->
						</div>
					</div>
				</div>
			<?php
		}
		/**
		 * mobile part compatibility.
		 */
		public static function strnix_mobile_part() {
			$responsive_menu_logo = strnix_get_options('responsive_menu_logo');
			?>
				<div class="mobile-menu">
					<div class="menu-backdrop"></div>
					<div class="close-btn"><span class="icon flaticon-cancel"></span></div>
					
					<nav class="menu-box">
						<div class="nav-logo">
							<a href="<?php echo esc_url(home_url('/')); ?>">
								<?php if ( isset($responsive_menu_logo['url'] ) && $responsive_menu_logo['url'] != '' ) : ?>
									<img src="<?php echo esc_url($responsive_menu_logo['url'], 'strnix'); ?>">
								<?php else : ?>
									<img src="<?php echo esc_url(STRNIX_IMG_URL . 'nav-logo.svg') ?>" alt="<?php esc_attr_e('Logo', 'strnix') ?>">
								<?php endif; ?>
							</a> 
						</div>
						<div class="menu-outer"><!--Here Menu Will Come Automatically Via Javascript / Same Menu as in Header--></div>
					</nav>
				</div>
			<?php
		}
		/**
		 * strnix search popup compatibility.
		 */
		public static function strnix_search_popup() {
				$header_menu_search_switch = strnix_get_options('header_menu_search_switch');
			?>
				<?php if($header_menu_search_switch == 1) : ?>
					<div id="search-popup" class="search-popup">
						<div class="close-search theme-btn"><span class="flaticon-cancel"></span></div>
						<div class="popup-inner">
							<div class="overlay-layer"></div>
							<div class="search-form">
								<form method="post" action="<?php echo esc_url(home_url('/')); ?>">
									<div class="form-group">
										<fieldset>
											<input type="search" class="form-control" name="s" value="" placeholder="<?php esc_attr_e('Search Here', 'strnix'); ?>" required>
											<input type="submit" value="<?php esc_attr_e('Search Now!', 'strnix'); ?>" class="theme-btn">
										</fieldset>
									</div>
								</form>
							</div>
						</div>
					</div>
				<?php endif; ?>
			<?php
		}
		/**
		 * strnix compatibility.
		 */
		public static function strnix_kses_allowed_html($tags, $context) {
			switch ($context) {
				case 'code_contxt':
					$tags = array(
						'li' => array(
						),
						'span' => array(
							'class' => array()
						),
						'a' => array(
							'href' => array(),
							'target' => array(),
							'class' => array()
						),
						'i' => array(
							'class' => array()
						),
						'p' => array(),
						'em' => array(),
						'strong' => array()
					);
					return $tags;
				case 'author_avatar':
					$tags = array(
						'img' => array('class' => array(), 'height' => array(), 'width' => array(), 'src' => array(), 'alt' => array())
					);
					return $tags;
				default:
					return $tags;
			}
		}
		
	}
	$strnix_int = new strnix_Int();
Page not found – Hello World !