Guest User

Untitled

a guest
Jun 10th, 2019
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. define('IRK_THEME_VER', wp_get_theme()->get('Version'));
  15. define('IRK_THEME_PATH', trailingslashit(get_template_directory()));
  16. define('IRK_THEME_URI', trailingslashit(get_template_directory_uri()));
  17. define('IRK_INC_PATH', trailingslashit(IRK_THEME_PATH . 'includes'));
  18. define('IRK_CLASS_PATH', trailingslashit(IRK_THEME_PATH . 'classes'));
  19. define('IRK_TPL_PATH', trailingslashit(IRK_THEME_PATH . 'templates'));
  20. define('IRK_WIDGET_PATH', trailingslashit(IRK_THEME_PATH . 'widgets'));
  21. define('IRK_VCEL_PATH', trailingslashit(IRK_THEME_PATH . 'vc-elements'));
  22. define('IRK_PART_PATH', trailingslashit(IRK_THEME_PATH . 'partials'));
  23. define('IRK_MM_PATH', trailingslashit(get_template_directory() . '/mega-menu'));
  24. define('IRK_QV_PATH', trailingslashit(get_template_directory() . '/quickview'));
  25. define('IRK_VIDEO_PATH', trailingslashit(get_template_directory() . '/video'));
  26. define('IRK_PU_PATH', trailingslashit(get_template_directory() . '/popup'));
  27. define('IRK_CSS_URI', trailingslashit(get_template_directory_uri() . '/assets/css'));
  28. define('IRK_IMG_URI', trailingslashit(get_template_directory_uri() . '/assets/img'));
  29. define('IRK_JS_URI', trailingslashit(get_template_directory_uri() . '/assets/js'));
  30. define('IRK_FONTS_URI', trailingslashit(get_template_directory_uri() . '/assets/fonts/iranyekan'));
  31. include IRK_INC_PATH . 'theme-functions.php';
  32. include IRK_MM_PATH . 'mega-menu.php';
  33. include IRK_INC_PATH . 'slider-cpt.php';
  34. include IRK_INC_PATH . 'breadcrumbs.php';
  35. include IRK_INC_PATH . 'news-cpt.php';
  36. include IRK_INC_PATH . 'comment-callback.php';
  37. include IRK_INC_PATH . 'brand-tax.php';
  38.  
  39. if (!irk_get_option('advanced_attributes')) {
  40. include IRK_INC_PATH . 'class-var-radio-button.php';
  41. }
  42.  
  43. include IRK_WIDGET_PATH . 'class-widget-banner.php';
  44. include IRK_WIDGET_PATH . 'class-widget-multi-banner.php';
  45. include IRK_WIDGET_PATH . 'class-widget-services.php';
  46. include IRK_WIDGET_PATH . 'class-widget-product.php';
  47. include IRK_WIDGET_PATH . 'class-widget-posts-slider.php';
  48. include IRK_WIDGET_PATH . 'class-widget-suggestion.php';
  49. include IRK_WIDGET_PATH . 'class-widget-posts.php';
  50. include IRK_WIDGET_PATH . 'class-widget-related-posts.php';
  51. include IRK_WIDGET_PATH . 'class-widget-news.php';
  52. include IRK_WIDGET_PATH . 'class-widget-brands.php';
  53. include IRK_INC_PATH . 'wc-hooks.php';
  54. include IRK_QV_PATH . 'quickview.php';
  55. include IRK_INC_PATH . 'ajax.php';
  56. add_action('vc_before_init', 'irk_vc_before_init_actions');
  57.  
  58. if (is_admin()) {
  59. include IRK_INC_PATH . 'jdf.php';
  60. include IRK_INC_PATH . 'admin-ajax.php';
  61. include IRK_INC_PATH . 'admin-menu.php';
  62. include IRK_INC_PATH . 'page-mtb.php';
  63. include IRK_INC_PATH . 'cat-mtb.php';
  64. include IRK_INC_PATH . 'amazing.php';
  65. include IRK_INC_PATH . 'product-cat-mtb.php';
  66. include IRK_INC_PATH . 'options-backup.php';
  67. include IRK_INC_PATH . 'product-mtb.php';
  68. include IRK_INC_PATH . 'tinymce-btn.php';
  69. include IRK_CLASS_PATH . 'class-product-price-field.php';
  70. include IRK_CLASS_PATH . 'class-product-upcoming-field.php';
  71. } else {
  72. include IRK_INC_PATH . 'shortcode.php';
  73. include IRK_INC_PATH . 'tab-seller-products.php';
  74. include IRK_THEME_PATH . 'panel-favorites/panel-favorites.php';
  75. include IRK_PU_PATH . 'popup.php';
  76.  
  77. if (irk_get_option('auth_google')) {
  78. include IRK_INC_PATH . 'socials-auth.php';
  79. }
  80. }
  81.  
  82. add_action('admin_notices', 'irk_admin_notices');
  83.  
  84. if (!irk_is_woocommerce_activated() && !is_admin() && $GLOBALS['pagenow'] !== 'wp-login.php') {
  85. wp_die('جهت استفاده از پوسته لطفا افزونه <a href="https://wordpress.org/plugins/woocommerce/" target="_blank">ووکامرس</a> را نصب و فعال نمایید.');
  86. }
  87.  
  88. add_action('after_setup_theme', 'irk_init_theme');
  89. add_action('after_switch_theme', 'irk_set_myaccount_page_id');
  90. add_action('wp_enqueue_scripts', 'irk_attach_asset_files');
  91. add_action('admin_enqueue_scripts', 'irk_attach_admin_asset_files');
  92. add_action(
  93. 'admin_head',
  94. function() {
  95. echo '<meta name="_nonce" content="' . wp_create_nonce('ajax_nonce') . '">' . PHP_EOL;
  96. }
  97. );
  98. add_action(
  99. 'wp_head',
  100. function() {
  101. echo '<meta name="irk_nonce" content="' . wp_create_nonce('ajax_nonce') . '">' . PHP_EOL;
  102. echo '<meta name="img_uri" content="' . IRK_IMG_URI . '">' . PHP_EOL;
  103. }
  104. );
  105. add_action(
  106. 'after_setup_theme',
  107. function() {
  108. register_nav_menu('top_menu', 'فهرست بالا');
  109. register_nav_menu('cat_menu', 'فهرست دسته‌ها');
  110. register_nav_menu('footer_menu1', 'فهرست پابرگ 1');
  111. register_nav_menu('footer_menu2', 'فهرست پابرگ 2');
  112. register_nav_menu('footer_menu3', 'فهرست پابرگ 3');
  113. }
  114. );
  115. add_action('widgets_init', 'irk_theme_slug_widgets_init');
  116. add_filter('upload_mimes', 'irk_mime_types');
  117. add_filter('body_class', 'irk_add_compare_page_class');
  118. add_filter('body_class', 'irk_body_classes');
  119. add_action('wp_enqueue_scripts', 'irk_apply_theme_settings');
  120. add_action('template_redirect', 'irk_404_page_redirect');
  121.  
  122. if (is_admin()) {
  123. require 'theme-updates/theme-update-checker.php';
  124. $update_checker = new ThemeUpdateChecker('irankala', 'http://sreza-salehi.ir/irankala-update-a1aa7s0fav/info.json');
  125. }
  126.  
  127. add_filter('body_class', 'irk_add_theme_demo_class');
  128. add_action('init', 'irk_zhk_guard_init');
  129.  
  130. class IRK_Theme_SDK
  131. {
  132. private $name = null;
  133. private $slug = null;
  134. private $parent_slug = null;
  135. private $text_domain = null;
  136. private static $option_name = null;
  137. private $product_token = null;
  138. public static $api_url = 'http://guard.zhaket.com/api/';
  139. private static $instance = null;
  140.  
  141. public function __construct(array $settings)
  142. {
  143. $defaults = array('name' => '', 'slug' => 'zhk_guard_register', 'parent_slug' => 'irk-options', 'text_domain' => '', 'product_token' => '', 'option_name' => 'zhk_guard_register_settings');
  144.  
  145. foreach ($settings as $key => $setting) {
  146. if (array_key_exists($key, $defaults) && !empty($setting)) {
  147. $defaults[$key] = $setting;
  148. }
  149. }
  150. $this->name = $defaults['name'];
  151. $this->slug = $defaults['slug'];
  152. $this->parent_slug = $defaults['parent_slug'];
  153. $this->text_domain = $defaults['text_domain'];
  154. self::$option_name = $defaults['option_name'];
  155. $this->product_token = $defaults['product_token'];
  156. add_action('admin_menu', array($this, 'admin_menu'));
  157. add_action('wp_ajax_' . $this->slug, array($this, 'wp_starter'));
  158. add_action('wp_ajax_' . $this->slug . '_revalidate', array($this, 'revalidate_starter'));
  159. add_action('init', array($this, 'schedule_programs'));
  160. add_action($this->slug . '_daily_validator', array($this, 'daily_event'));
  161. add_action('admin_notices', array($this, 'admin_notice'));
  162. }
  163.  
  164. public function admin_menu()
  165. {
  166. add_submenu_page($this->parent_slug, 'ثبت نسخه', 'ثبت نسخه', 'manage_options', $this->slug, array($this, 'menu_content'));
  167. }
  168.  
  169. public function menu_content()
  170. {
  171. $option = get_option(self::$option_name);
  172. $now = json_decode(get_option($option));
  173. $starter = (isset($now->starter) && !empty($now->starter) ? base64_decode($now->starter) : '');
  174.  
  175. if (isset($_GET['debugger']) && !empty($_GET['debugger']) && $_GET['debugger'] === 'show') {
  176. $data_show = $option;
  177. } else {
  178. $data_show = '';
  179. ................................................................
  180. .........................................
  181. ................
Add Comment
Please, Sign In to add comment