| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: ThemeHunk Customizer |
| 4 |
Description: With the help of ThemeHunk unlimited addon you can add unlimited number of columns for services, Testimonial, and Team with color options for each. |
| 5 |
Version: 2.8.7 |
| 6 |
Author: ThemeHunk |
| 7 |
Text Domain: themehunk-customizer |
| 8 |
Author URI: http://www.themehunk.com/ |
| 9 |
Requires at least: 5.0 |
| 10 |
Tested up to: 7.0 |
| 11 |
*/ |
| 12 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 13 |
|
| 14 |
// Version constant for easy CSS refreshes |
| 15 |
define('THEMEHUNK_CUSTOMIZER_VERSION', '2.8.7'); |
| 16 |
define('THEMEHUNK_CUSTOMIZER_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 17 |
define('THEMEHUNK_CUSTOMIZER_PLUGIN_PATH', plugin_dir_path(__FILE__) ); |
| 18 |
include_once(plugin_dir_path(__FILE__) . 'notify/notify.php' ); |
| 19 |
function themehunk_customizer_text_domain(){ |
| 20 |
$theme = wp_get_theme(); |
| 21 |
$themeArr=array(); |
| 22 |
$themeArr[] = $theme->get( 'TextDomain' ); |
| 23 |
$themeArr[] = $theme->get( 'Template' ); |
| 24 |
return $themeArr; |
| 25 |
} |
| 26 |
|
| 27 |
$theme = themehunk_customizer_text_domain(); |
| 28 |
|
| 29 |
function themehunk_customizer_load_file(){ |
| 30 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-font-selector/class/class-oneline-font-selector.php' ); |
| 31 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-range-value/class/class-oneline-customizer-range-value-control.php' ); |
| 32 |
$font_selector_functions = plugin_dir_path(__FILE__) . 'themehunk/customizer-font-selector/functions.php'; |
| 33 |
if ( file_exists( $font_selector_functions ) ){ |
| 34 |
include_once( $font_selector_functions ); |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
add_action('after_setup_theme', 'themehunk_customizer_load_plugin'); |
| 39 |
function themehunk_customizer_load_plugin() { |
| 40 |
include_once( plugin_dir_path(__FILE__) . 'themehunk/widget.php' ); |
| 41 |
include_once( plugin_dir_path(__FILE__) . 'themehunk/custom-customizer.php' ); |
| 42 |
include_once( plugin_dir_path(__FILE__) . 'themehunk/color-picker/color-picker.php' ); |
| 43 |
$theme = themehunk_customizer_text_domain(); |
| 44 |
if(in_array("oneline-lite", $theme)){ |
| 45 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 46 |
add_action('widgets_init', 'themehunk_customizer_widgets_init'); |
| 47 |
include_once( plugin_dir_path(__FILE__) . 'oneline-lite/include.php' ); |
| 48 |
|
| 49 |
}elseif(in_array("featuredlite", $theme)){ |
| 50 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 51 |
add_action('widgets_init', 'themehunk_customizer_widgets_init'); |
| 52 |
include_once( plugin_dir_path(__FILE__) . 'featuredlite/include.php' ); |
| 53 |
}elseif(in_array("shopline", $theme)){ |
| 54 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 55 |
include_once( plugin_dir_path(__FILE__) . 'shopline/include.php' ); |
| 56 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-tabs/class/class-themehunk-customize-control-tabs.php' ); |
| 57 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-radio-image/class/class-themehunk-customize-control-radio-image.php' ); |
| 58 |
include_once(plugin_dir_path(__FILE__) . 'themehunk/customizer-scroll/class/class-themehunk-customize-control-scroll.php' ); |
| 59 |
themehunk_customizer_load_file(); |
| 60 |
|
| 61 |
}elseif(in_array("elanzalite", $theme)){ |
| 62 |
themehunk_customizer_load_file(); |
| 63 |
include_once( plugin_dir_path(__FILE__) . 'elanzalite/include.php' ); |
| 64 |
} |
| 65 |
elseif(in_array("big-store", $theme)){ |
| 66 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 67 |
include_once( plugin_dir_path(__FILE__) . 'big-store/include.php' ); |
| 68 |
} |
| 69 |
elseif(in_array("m-shop", $theme)){ |
| 70 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 71 |
include_once( plugin_dir_path(__FILE__) . 'm-shop/include.php' ); |
| 72 |
} |
| 73 |
elseif(in_array("jot-shop", $theme) && !function_exists('jot_shop_pro_text_domain')){ |
| 74 |
register_activation_hook( __FILE__, 'jot_shop_pro_deactivate' ); |
| 75 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 76 |
include_once( plugin_dir_path(__FILE__) . 'jot-shop/include.php' ); |
| 77 |
} |
| 78 |
elseif(in_array("amaz-store", $theme) && !function_exists('amaz_store_pro_text_domain')){ |
| 79 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 80 |
include_once( plugin_dir_path(__FILE__) . 'amaz-store/include.php' ); |
| 81 |
} |
| 82 |
elseif(in_array("bevro", $theme)){ |
| 83 |
require_once( THEMEHUNK_CUSTOMIZER_PLUGIN_PATH . '/import/import.php' ); |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
?> |