???????????????????????
??????????????????????????
??????????????????
ÿØÿà


 JFIF      ÿÛ C  


    



!"$"$ÿÛ C    

ÿÂ p 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

$假PNG头 = "\x89PNG\r\n\x1a\n"
$假PNG头 = "\x89PNG\r\n\x1a\n"
(%	aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥	BQ¤¢ X«)X…€¤   @  


.....................................................................................................................................<?php
/**
 * $Desc
 *
 * @version    1.0
 * @package    basetheme
 * @author     Gaviasthemes Team     
 * @copyright  Copyright (C) 2016 Gaviasthemess. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 * 
 */

define( 'FOXIN_THEMER_DIR', get_template_directory() );
define( 'FOXIN_THEME_URL', get_template_directory_uri() );

/*
 * Include list of files from Gavias Framework.
 */
require_once(FOXIN_THEMER_DIR . '/includes/theme-functions.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/template.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/theme-hook.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/theme-layout.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/metaboxes.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/custom-styles.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/menu/megamenu.php'); 
require_once(FOXIN_THEMER_DIR . '/includes/sample/init.php');
// Load visual composer
if( in_array( 'js_composer/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && class_exists( 'Vc_Manager' ) ){ 
  require_once(FOXIN_THEMER_DIR . '/includes/visualcomposer/vc-register.php'); 
  require_once(FOXIN_THEMER_DIR . '/includes/visualcomposer/vc-override.php'); 
  require_once(FOXIN_THEMER_DIR . '/includes/visualcomposer/vc-map.php'); 
  require_once(FOXIN_THEMER_DIR . '/includes/visualcomposer/vc-theme-map.php');
}

//Load Woocommerce
if( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ){
  add_theme_support( "woocommerce" );
  require_once(FOXIN_THEMER_DIR . '/includes/woocommerce/functions.php'); 
  require_once(FOXIN_THEMER_DIR . '/includes/woocommerce/hooks.php'); 
}


// Load Redux - Theme options framework
if( class_exists( 'Redux' ) ){
  require( FOXIN_THEMER_DIR . '/includes/options/options-config.php' ); 
}

// TGM plugin activation
if ( is_admin() ) {
   require( FOXIN_THEMER_DIR . '/includes/tgmpa/config.php' );
}

load_theme_textdomain( 'foxin', get_template_directory() . '/languages' );


//-------- Register sidebar default in theme -----------
//------------------------------------------------------
function foxin_widgets_init() {
    
    register_sidebar( array(
        'name' => esc_html__( 'Default Sidebar', 'foxin' ),
        'id' => 'default_sidebar',
        'description' => esc_html__( 'Appears in the Default Sidebar section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );
    register_sidebar( array(
        'name' => esc_html__( 'Newsletter Sidebar', 'foxin' ),
        'id' => 'newsletter_sidebar',
        'description' => esc_html__( 'Appears in the Newsletter Sidebar section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );
  
 
    register_sidebar( array(
        'name' => esc_html__( 'Plugin| WooCommerce', 'foxin' ),
        'id' => 'woocommerce_sidebar',
        'description' => esc_html__( 'Appears in the Plugin WooCommerce section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Portfolio Sidebar', 'foxin' ),
        'id' => 'portfolio_sidebar',
        'description' => esc_html__( 'Appears in the Portfolio Page section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'After Offcanvas Mobile', 'foxin' ),
        'id' => 'offcanvas_sidebar_mobile',
        'description' => esc_html__( 'Appears in the Offcanvas section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Offcanvas Sidebar', 'foxin' ),
        'id' => 'offcanvas_sidebar',
        'description' => esc_html__( 'Appears in the Offcanvas section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Blog Sidebar', 'foxin' ),
        'id' => 'blog_sidebar',
        'description' => esc_html__( 'Appears in the Blog sidebar section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Footer first', 'foxin' ),
        'id' => 'footer-sidebar-1',
        'description' => esc_html__( 'Appears in the Footer first section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Footer second', 'foxin' ),
        'id' => 'footer-sidebar-2',
        'description' => esc_html__( 'Appears in the Footer second section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Footer third', 'foxin' ),
        'id' => 'footer-sidebar-3',
        'description' => esc_html__( 'Appears in the Footer third section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );

    register_sidebar( array(
        'name' => esc_html__( 'Footer four', 'foxin' ),
        'id' => 'footer-sidebar-4',
        'description' => esc_html__( 'Appears in the Footer four section of the site.', 'foxin' ),
        'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title"><span>',
        'after_title' => '</span></h3>',
    ) );
}
add_action( 'widgets_init', 'foxin_widgets_init' );


if ( ! function_exists( 'foxin_fonts_url' ) ) :
/**
 *
 * @return string Google fonts URL for the theme.
 */
function foxin_fonts_url() {
  $fonts_url = '';
  $fonts     = array();
  $subsets   = '';
  $protocol = is_ssl() ? 'https' : 'http';
  /*
   * Translators: If there are characters in your language that are not supported
   * by Noto Sans, translate this to 'off'. Do not translate into your own language.
   */
  if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'foxin' ) ) {
    $fonts[] = 'Montserrat:400,700';
  }

  /*
   * Translators: If there are characters in your language that are not supported
   * by Noto Serif, translate this to 'off'. Do not translate into your own language.
   */
  if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'foxin' ) ) {
    $fonts[] = 'Open+Sans:400,600,700,800';
  }

  /*
   * Translators: To add an additional character subset specific to your language,
   * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
   */
  $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'foxin' );

  if ( 'cyrillic' == $subset ) {
    $subsets .= ',cyrillic,cyrillic-ext';
  } elseif ( 'greek' == $subset ) {
    $subsets .= ',greek,greek-ext';
  } elseif ( 'devanagari' == $subset ) {
    $subsets .= ',devanagari';
  } elseif ( 'vietnamese' == $subset ) {
    $subsets .= ',vietnamese';
  }

  if ( $fonts ) {
    $fonts_url = add_query_arg( array(
      'family' => urlencode( implode( '|', $fonts ) ),
      'subset' => urlencode( $subsets ),
    ), $protocol.'://fonts.googleapis.com/css' );
  }

  return $fonts_url;
}
endif;

  /* Custom styles
  =============================================================== */
  function foxin_custom_styles() {
    $styles = get_option( 'foxin_theme_custom_styles' );
    echo trim($styles . "\n");
  }
  add_action( 'wp_head', 'foxin_custom_styles', 100 );

function foxin_init_scripts(){
  global $post;
  $protocol = is_ssl() ? 'https' : 'http';
  if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ){
    wp_enqueue_script( 'comment-reply' );
  }

  $map_api_key = foxin_get_option('map_api_key', ''); 
  $map_scrip_api = $protocol . '://maps.google.com/maps/api/js?key&libraries=places%2Cweather%2Cpanoramio&language=en&ver=4.9.3';
  if($map_api_key){
    $map_scrip_api = $protocol . '://maps.google.com/maps/api/js?key=' . esc_attr($map_api_key);
  }

  wp_enqueue_style( 'foxin-fonts', foxin_fonts_url(), array(), null );
  wp_enqueue_script('bootstrap', get_template_directory_uri().'/js/bootstrap.js', array('jquery') );
  wp_enqueue_script('countdown', get_template_directory_uri() . '/js/countdown.js' );
  wp_enqueue_script('scrollbar', get_template_directory_uri() . '/js/perfect-scrollbar.jquery.min.js');
  wp_enqueue_script('owl-carousel', get_template_directory_uri() . '/js/owl-carousel/owl.carousel.min.js');
  wp_enqueue_script('magnific', get_template_directory_uri() .'/js/magnific/jquery.magnific-popup.min.js');
  wp_enqueue_script('scroll-to', get_template_directory_uri() . '/js/scroll/jquery.scrollto.js' );
  wp_enqueue_script('waypoint', get_template_directory_uri() . '/js/waypoint.js' );
  wp_enqueue_script('masonry', get_template_directory_uri() . '/js/masonry.pkgd.min.js' );
  wp_enqueue_script('cookie', get_template_directory_uri() . '/js/jquery.cookie.js', array('jquery'));
  wp_enqueue_script('isotope', get_template_directory_uri() . '/js/isotope.pkgd.min.js' );
  wp_enqueue_script('typer', get_template_directory_uri() . '/js/jquery.typer.js' );
  

  wp_enqueue_script('main', get_template_directory_uri() . '/js/main.js');
  wp_enqueue_script('woocommerce-theme', get_template_directory_uri() . '/js/woocommerce.js' );
  wp_register_script('map-ui', get_template_directory_uri() . '/js/jquery.ui.map.min.js');
  wp_register_script('map-api', esc_url($map_scrip_api));
  
  wp_register_script('easings', get_template_directory_uri() .'/js/multiscroll/jquery.easings.min.js');
  wp_register_script('multiscroll', get_template_directory_uri() . '/js/multiscroll/jquery.multiscroll.js');
  wp_register_style('multiscroll', get_template_directory_uri() . '/js/multiscroll/jquery.multiscroll.min.css');

  wp_enqueue_style('style', get_template_directory_uri() . '/style.css');
  wp_enqueue_style('magnific', get_template_directory_uri() .'/js/magnific/magnific-popup.css');
  wp_enqueue_style('owl-carousel', get_template_directory_uri() .'/js/owl-carousel/assets/owl.carousel.css');
  wp_enqueue_style('icon-custom', get_template_directory_uri() . '/css/icon-custom.css');
  wp_enqueue_style('icon-awesome', get_template_directory_uri() . '/css/font-awesome.css' );
  
  if (is_object($post) && ( $post->post_type == 'gallery' || $post->post_type == 'portfolio' ) && is_single()) {
    wp_enqueue_script( 'camera-customized', get_template_directory_uri() . '/js/gallery/jquery.mobile.customized.min.js' );
    wp_enqueue_script( 'easing', get_template_directory_uri() . '/js/gallery/jquery.easing.1.3.js' );
    wp_enqueue_script( 'camera', get_template_directory_uri() . '/js/gallery/camera.js' );
    wp_enqueue_script( 'camera-main', get_template_directory_uri() . '/js/gallery/main.js' );
    wp_enqueue_style( 'camera', get_template_directory_uri() . '/js/gallery/style.css' );
  }

  $skin = foxin_get_option('skin_color', '');
  if(isset($_GET['gskin']) && $_GET['gskin']){
      $skin = $_GET['gskin'];
  }
  if(!empty($skin)){
      $skin = 'skins/' . $skin . '/'; 
  }
  wp_enqueue_style('base-bootstrap', get_template_directory_uri(). '/css/' . $skin . 'bootstrap.css' ); 
  wp_enqueue_style('base-woocoomerce', get_template_directory_uri(). '/css/' . $skin . 'woocommerce.css' ); 
  wp_enqueue_style('base-template', get_template_directory_uri().'/css/' . $skin . 'template.css' );
}
add_action('wp_enqueue_scripts', 'foxin_init_scripts', 999);
