????

Your IP : 216.73.216.174


Current Path : /home2/morganrand/www/wp-content-bkp/themes/wanderfuls/skins/classes/gaps/
Upload File :
Current File : /home2/morganrand/www/wp-content-bkp/themes/wanderfuls/skins/classes/gaps/gaps-skin.php

<?php
/**
 * Gaps Skin Class
 *
 * @package Wanderfuls WordPress Theme
 * @subpackage Skins
 * @deprecated Since 3.0.0
 */

if ( ! class_exists( 'Wanderfuls_Gaps_Skin' ) ) {
	
	class Wanderfuls_Gaps_Skin {

		/**
		 * Main constructor
		 *
		 * @since 1.3.0
		 */
		public function __construct() {

			// Actions
			add_action( 'wp_enqueue_scripts', array( $this, 'load_styles' ), 999 );
			add_action( 'wp_head', array( $this, 'remove_header_menu' ), 10 );

			// Filters
			add_filter( 'tb_main_layout', array( $this, 'main_layout' ), 10 );

		}

		/**
		 * Load custom stylesheet for this skin
		 *
		 * @since 1.3.0
		 */
		public function load_styles() {
			wp_enqueue_style(
				'gaps-skin', TB_SKIN_DIR_URI .'classes/gaps/css/gaps-style.css',
				array( 'tb-style' ),
				TB_THEME_VERSION,
				'all'
			);
		}

		/**
		 * Remove the menu from the header_bottom hook for header styles 2 and 3
		 *
		 * @since 2.0.0
		 */
		public function remove_header_menu() {
			if ( in_array( tb_global_obj( 'header_style' ), array( 'two', 'three' ) ) ) {
				remove_action( 'tb_hook_header_bottom', 'tb_header_menu' );
				add_action( 'tb_hook_main_before', array( $this, 'gaps_menu_two_three' ) );
			}
		}

		/**
		 * Custom function for displaying menu styles 2 and 3 required for this skin
		 *
		 * @since 2.0.2
		 */
		public function gaps_menu_two_three() {

			// Get current filter
			$filter = current_filter();

			// Set bool variable
			$get = false;

			// Check current filter against header style
			if ( in_array( tb_global_obj( 'header_style' ), array( 'two', 'three' ) )
				&& 'tb_hook_main_before' == $filter
			) {
				$get = true;
			}

			// Get menu template part
			if ( $get ) {
				get_template_part( 'partials/header/header-menu' );
			}
			
		}

		/**
		 * Set main layout to boxed
		 *
		 * @since 3.0.0
		 */
		public function main_layout( $layout ) {
			return 'boxed';
		}

	}

}
$tb_gaps_skin = new Wanderfuls_Gaps_Skin();