YITH Essential Kit for WooCommerce #1 - Version 1.1.11

Version Description

  • Fixed: YIT panel script not enqueue in admin
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH Essential Kit for WooCommerce #1
Version 1.1.11
Comparing to
See all releases

Code changes from version 1.1.10 to 1.1.11

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
5
  Requires at least: 3.5.1
6
  Tested up to: 4.2.4
7
- Stable tag: 1.1.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -151,6 +151,10 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
151
 
152
  == Changelog ==
153
 
 
 
 
 
154
  = 1.1.10 =
155
 
156
  * Fixed: Prevent framework error
@@ -245,4 +249,4 @@ YITH Essential Kit for WooCommerce #1 will add a new submenu called "YITH Essent
245
 
246
  == Upgrade Notice ==
247
 
248
- Last Stable Tag 1.1.10
4
  Tags: woocommerce,jetpack,woocommerce jetpack, essential, kit, plugins, plugin, product, e-commerce, ecommerce, commerce, shop, yith, yit, yithemes,yith woocommerce colors and labels variations, colors and labels variations,colors and labels variations jetpack,yith woocommerce zoom magnifier,zoom magnifier,zoom magnifier jetpack,yith woocommerce wishlist,wishlist,wishlist jetpack,yith woocommerce compare,compare,compare jetpack,yith woocommerce ajax product filter,ajax product filter,ajax product filter jetpack,yith woocommerce ajax search,ajax search,ajax search jetpack,yith woocommerce catalog mode,catalog mode,catalog mode jetpack,yith woocommerce order tracking,order tracking,order tracking jetpack, yith woocommerce advanced reviews,advanced reviews,advanced reviews jetpack,yith woocommerce badges management,badges management,badges management jetpack,yith woocommerce cart messages,cart messages,cart messages jetpack,yith woocommerce review reminder,review reminder,review reminder jetpack,yith woocommerce quick view,quick view,quick view jetpack,yith live chat,live chat,live chat jetpack,yith woocommerce eu vat,eu vat,eu vat jetpack,yith woocommerce mailchimp,mailchimp,mailchimp jetpack,yith woocommerce stripe,stripe, stripe jetpack,yith infinite scrolling,infinite scrolling,infinite scrolling jetpack,yith woocommerce request a quote,request a quote,request a quote jetpack,yith woocommerce waiting list,waiting list,waiting list jetpack,yith woocommerce tab manager,tab manager,tab manager jetpack,yith woocommerce multi vendor,multi vendor,multi vendor jetpack,product vendor,products vendor,products vendor jetpack, booster for woocommerce
5
  Requires at least: 3.5.1
6
  Tested up to: 4.2.4
7
+ Stable tag: 1.1.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.1.11 =
155
+
156
+ * Fixed: YIT panel script not enqueue in admin
157
+
158
  = 1.1.10 =
159
 
160
  * Fixed: Prevent framework error
249
 
250
  == Upgrade Notice ==
251
 
252
+ Last Stable Tag 1.1.11
init.php CHANGED
@@ -7,7 +7,7 @@ Text Domain: yith-essential-kit-for-woocommerce-1
7
  Domain Path: /languages/
8
  Author: YIThemes
9
  Author URI: http://yithemes.com/
10
- Version: 1.1.10
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
7
  Domain Path: /languages/
8
  Author: YIThemes
9
  Author URI: http://yithemes.com/
10
+ Version: 1.1.11
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
plugin-fw/assets/css/metaboxes.css CHANGED
@@ -237,6 +237,27 @@
237
  .chosen .select_wrapper .chosen-container .chosen-drop .chosen-search input{
238
  width: 100%!important;
239
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
 
241
  /* typography */
242
  .the-metabox.typography .select_wrapper.font-family { width:200px; }
237
  .chosen .select_wrapper .chosen-container .chosen-drop .chosen-search input{
238
  width: 100%!important;
239
  }
240
+ .select_wrapper span {
241
+ height: 26px;
242
+ line-height: 26px;
243
+ padding-left: 6px;
244
+ position: absolute;
245
+ z-index: 2;
246
+ overflow: hidden;
247
+ }
248
+
249
+ .the-metabox .select_wrapper select {
250
+ cursor: pointer;
251
+ height: 28px;
252
+ margin: 0;
253
+ opacity: 0;
254
+ padding: 0;
255
+ position: relative;
256
+ width: inherit;
257
+ z-index: 4;
258
+ background-color: #FAFAFA;
259
+ }
260
+
261
 
262
  /* typography */
263
  .the-metabox.typography .select_wrapper.font-family { width:200px; }
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.6
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 2.9.2
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -319,22 +319,27 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
319
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
320
  */
321
  public function admin_enqueue_scripts() {
322
- global $woocommerce;
323
 
324
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
325
 
326
  wp_enqueue_media();
327
  wp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce->version );
328
- wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $woocommerce->version );
329
  wp_enqueue_style ( 'wp-jquery-ui-dialog' );
330
 
331
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
332
  wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
333
  wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker','jquery-ui-dialog', 'jquery-ui-sortable', 'iris', 'chosen' ), $woocommerce->version, true );
334
- wp_enqueue_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.min.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
335
  wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array(
336
  'i18n_nav_warning' => __( 'The changes you have made will be lost if you leave this page.', 'yith-plugin-fw' )
337
  ) );
 
 
 
 
 
338
  }
339
 
340
  /**
319
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
320
  */
321
  public function admin_enqueue_scripts() {
322
+ global $woocommerce, $pagenow;
323
 
324
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
325
 
326
  wp_enqueue_media();
327
  wp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce->version );
328
+ wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $woocommerce->version );
329
  wp_enqueue_style ( 'wp-jquery-ui-dialog' );
330
 
331
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
332
  wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
333
  wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker','jquery-ui-dialog', 'jquery-ui-sortable', 'iris', 'chosen' ), $woocommerce->version, true );
334
+ wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.min.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
335
  wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array(
336
  'i18n_nav_warning' => __( 'The changes you have made will be lost if you leave this page.', 'yith-plugin-fw' )
337
  ) );
338
+
339
+ if( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yit-plugins_page' ) !== false ){
340
+ wp_enqueue_style( 'yit-plugin-style' );
341
+ wp_enqueue_script( 'yit-plugin-panel' );
342
+ }
343
  }
344
 
345
  /**
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -92,8 +92,12 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
92
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
93
  */
94
  public function add_menu_page() {
95
- $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
96
- add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
 
 
 
 
97
  }
98
 
99
  /**
@@ -121,27 +125,32 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
121
  */
122
  public function admin_enqueue_scripts() {
123
 
124
- global $wp_scripts, $pagenow;
125
 
126
  //scripts
127
- wp_enqueue_media();
128
- wp_enqueue_script( 'jquery-ui' );
129
- wp_enqueue_script( 'jquery-ui-core' );
130
- wp_enqueue_script( 'jquery-ui-slider' );
131
- wp_enqueue_script( 'jquery-ui-dialog' );
132
- wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
133
- wp_enqueue_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
134
- wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
135
- wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
136
 
137
  //styles
138
- $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
139
  wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
140
  wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
141
- wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
142
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
143
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
144
  wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
 
 
 
 
 
145
  }
146
 
147
  /**
92
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
93
  */
94
  public function add_menu_page() {
95
+ global $admin_page_hooks;
96
+
97
+ if( ! isset( $admin_page_hooks['yit_plugin_panel'] ) ){
98
+ $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
99
+ add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
100
+ }
101
  }
102
 
103
  /**
125
  */
126
  public function admin_enqueue_scripts() {
127
 
128
+ global $wp_scripts, $pagenow;
129
 
130
  //scripts
131
+ wp_enqueue_media();
132
+ wp_enqueue_script( 'jquery-ui' );
133
+ wp_enqueue_script( 'jquery-ui-core' );
134
+ wp_enqueue_script( 'jquery-ui-slider' );
135
+ wp_enqueue_script( 'jquery-ui-dialog' );
136
+ wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
137
+ wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
138
+ wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
139
+ wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
140
 
141
  //styles
142
+ $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
143
  wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
144
  wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
145
+ wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
146
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
147
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
148
  wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
149
+
150
+ if( 'admin.php' == $pagenow && strpos('yit-plugins_page',get_current_screen()->id ) !== false ){
151
+ wp_enqueue_style( 'yit-plugin-style' );
152
+ wp_enqueue_script( 'yit-plugin-panel' );
153
+ }
154
  }
155
 
156
  /**
plugin-fw/lib/yit-plugin-subpanel.php CHANGED
@@ -88,22 +88,25 @@ if ( ! class_exists( 'YIT_Plugin_SubPanel' ) ) {
88
  * @since 1.0
89
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
90
  */
91
- public function add_setting_page() {
 
 
92
 
93
- $logo = YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png';
94
 
95
- $admin_logo = function_exists( 'yit_get_option' ) ? yit_get_option( 'admin-logo-menu' ) : '';
 
 
96
 
97
- if ( isset( $admin_logo ) && ! empty( $admin_logo ) && $admin_logo != '' && $admin_logo) {
98
- $logo = $admin_logo;
99
- }
100
  $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
101
  add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'nosuchcapability', 'yit_plugin_panel', NULL, $logo, $position );
 
102
 
103
- add_submenu_page( 'yit_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array( $this, 'yit_panel' ) );
104
- remove_submenu_page( 'yit_plugin_panel', 'yit_plugin_panel' );
105
 
106
- }
107
 
108
  /**
109
  * Show a tabbed panel to setting page
88
  * @since 1.0
89
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
90
  */
91
+ public function add_setting_page() {
92
+ global $admin_page_hooks;
93
+ $logo = YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png';
94
 
95
+ $admin_logo = function_exists( 'yit_get_option' ) ? yit_get_option( 'admin-logo-menu' ) : '';
96
 
97
+ if ( isset( $admin_logo ) && !empty( $admin_logo ) && $admin_logo != '' && $admin_logo ) {
98
+ $logo = $admin_logo;
99
+ }
100
 
101
+ if( ! isset( $admin_page_hooks['yit_plugin_panel'] ) ) {
 
 
102
  $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
103
  add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'nosuchcapability', 'yit_plugin_panel', NULL, $logo, $position );
104
+ }
105
 
106
+ add_submenu_page( 'yit_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array( $this, 'yit_panel' ) );
107
+ remove_submenu_page( 'yit_plugin_panel', 'yit_plugin_panel' );
108
 
109
+ }
110
 
111
  /**
112
  * Show a tabbed panel to setting page
plugin-fw/licence/lib/yit-plugin-licence.php CHANGED
@@ -8,11 +8,11 @@
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
 
15
- if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
16
  /**
17
  * YIT Plugin Licence Panel
18
  *
@@ -23,7 +23,6 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
23
  * @since 1.0
24
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
25
  */
26
-
27
  class YIT_Plugin_Licence extends YIT_Licence {
28
 
29
  /**
@@ -59,9 +58,9 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
59
  public function __construct() {
60
  parent::__construct();
61
 
62
- if ( ! is_admin() ) {
63
- return;
64
- }
65
 
66
  $this->_settings = array(
67
  'parent_page' => 'yit_plugin_panel',
@@ -78,7 +77,7 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
78
  add_action( 'yit_licence_after_check', array( $this, 'licence_after_check' ) );
79
  }
80
 
81
-
82
  public function licence_after_check() {
83
  /* === Regenerate Update Plugins Transient === */
84
  YIT_Upgrade()->force_regenerate_update_transient();
@@ -132,16 +131,20 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
132
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
133
  */
134
  public function register( $plugin_init, $secret_key, $product_id ) {
135
- if ( ! function_exists( 'get_plugins' ) ) {
136
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
137
  }
138
 
139
  $plugins = get_plugins();
140
  $plugins[$plugin_init]['secret_key'] = $secret_key;
141
  $plugins[$plugin_init]['product_id'] = $product_id;
142
- $this->_products[$plugin_init] = $plugins[$plugin_init];
143
  }
144
- }
 
 
 
 
145
  }
146
 
147
  /**
@@ -151,7 +154,7 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
151
  * @since 1.0
152
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
153
  */
154
- if( ! function_exists( 'YIT_Plugin_Licence' ) ){
155
  function YIT_Plugin_Licence() {
156
  return YIT_Plugin_Licence::instance();
157
  }
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
+ if ( !defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
 
15
+ if ( !class_exists( 'YIT_Plugin_Licence' ) ) {
16
  /**
17
  * YIT Plugin Licence Panel
18
  *
23
  * @since 1.0
24
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
25
  */
 
26
  class YIT_Plugin_Licence extends YIT_Licence {
27
 
28
  /**
58
  public function __construct() {
59
  parent::__construct();
60
 
61
+ if ( !is_admin() ) {
62
+ return;
63
+ }
64
 
65
  $this->_settings = array(
66
  'parent_page' => 'yit_plugin_panel',
77
  add_action( 'yit_licence_after_check', array( $this, 'licence_after_check' ) );
78
  }
79
 
80
+
81
  public function licence_after_check() {
82
  /* === Regenerate Update Plugins Transient === */
83
  YIT_Upgrade()->force_regenerate_update_transient();
131
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
132
  */
133
  public function register( $plugin_init, $secret_key, $product_id ) {
134
+ if ( !function_exists( 'get_plugins' ) ) {
135
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
  }
137
 
138
  $plugins = get_plugins();
139
  $plugins[$plugin_init]['secret_key'] = $secret_key;
140
  $plugins[$plugin_init]['product_id'] = $product_id;
141
+ $this->_products[$plugin_init] = $plugins[$plugin_init];
142
  }
143
+
144
+ public function get_product_type() {
145
+ return $this->_product_type;
146
+ }
147
+ }
148
  }
149
 
150
  /**
154
  * @since 1.0
155
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
156
  */
157
+ if ( !function_exists( 'YIT_Plugin_Licence' ) ) {
158
  function YIT_Plugin_Licence() {
159
  return YIT_Plugin_Licence::instance();
160
  }
plugin-fw/licence/lib/yit-theme-licence.php CHANGED
@@ -8,11 +8,11 @@
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
 
15
- if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
16
  /**
17
  * YIT Plugin Licence Panel
18
  *
@@ -23,7 +23,6 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
23
  * @since 1.0
24
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
25
  */
26
-
27
  class YIT_Theme_Licence extends YIT_Licence {
28
 
29
  /**
@@ -106,15 +105,15 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
106
  public function add_submenu_page() {
107
 
108
  $admin_tree = array(
109
- 'parent_slug' => apply_filters( 'yit_licence_parent_slug', 'yit_panel'),
110
- 'page_title' => __( 'License Activation', 'yith-plugin-fw' ),
111
- 'menu_title' => __( 'License Activation', 'yith-plugin-fw' ),
112
- 'capability' => 'manage_options',
113
- 'menu_slug' => 'yit_panel_license',
114
- 'function' => 'show_activation_panel'
115
- );
116
-
117
- add_submenu_page( $admin_tree['parent_slug'],
118
  sprintf( __( '%s', 'yith-plugin-fw' ), $admin_tree['page_title'] ),
119
  sprintf( __( '%s', 'yith-plugin-fw' ), $admin_tree['menu_title'] ),
120
  $admin_tree['capability'],
@@ -127,8 +126,8 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
127
  * Premium product registration
128
  *
129
  * @param $product_init | string | The product init file
130
- * @param $secret_key | string | The product secret key
131
- * @param $product_id | string | The product slug (product_id)
132
  *
133
  * @return void
134
  *
@@ -136,11 +135,11 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
136
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
137
  */
138
  public function register( $product_init, $secret_key, $product_id ) {
139
- $theme = wp_get_theme();
140
- $products[$product_init]['Name'] = $theme->Name;
141
- $products[$product_init]['secret_key'] = $secret_key;
142
- $products[$product_init]['product_id'] = $product_id;
143
- $this->_products[$product_init] = $products[$product_init];
144
  }
145
 
146
  /**
@@ -150,14 +149,15 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
150
  * @since 2.2
151
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
152
  */
153
- public function show_old_licence_message(){
154
  return time() < $this->_old_licence_expires;
155
  }
156
 
157
- public function get_old_licence_message(){
158
  ob_start(); ?>
159
  <div class="activation-faq">
160
  <h3><?php _e( 'I cannot find the license key for activating the theme I have bought some time ago. Where can I find it?', 'yith-plugin-fw' ) ?></h3>
 
161
  <p>
162
  <?php
163
  _e( 'If you have purchased one of our products before 27 January 2015, you can benefit from support and updates (the services offered with the license)
@@ -170,6 +170,10 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
170
  <?php
171
  echo ob_get_clean();
172
  }
 
 
 
 
173
  }
174
  }
175
 
@@ -180,7 +184,7 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
180
  * @since 1.0
181
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
182
  */
183
- if( ! function_exists( 'YIT_Theme_Licence' ) ){
184
  function YIT_Theme_Licence() {
185
  return YIT_Theme_Licence::instance();
186
  }
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
+ if ( !defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
 
15
+ if ( !class_exists( 'YIT_Theme_Licence' ) ) {
16
  /**
17
  * YIT Plugin Licence Panel
18
  *
23
  * @since 1.0
24
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
25
  */
 
26
  class YIT_Theme_Licence extends YIT_Licence {
27
 
28
  /**
105
  public function add_submenu_page() {
106
 
107
  $admin_tree = array(
108
+ 'parent_slug' => apply_filters( 'yit_licence_parent_slug', 'yit_panel' ),
109
+ 'page_title' => __( 'License Activation', 'yith-plugin-fw' ),
110
+ 'menu_title' => __( 'License Activation', 'yith-plugin-fw' ),
111
+ 'capability' => 'manage_options',
112
+ 'menu_slug' => 'yit_panel_license',
113
+ 'function' => 'show_activation_panel'
114
+ );
115
+
116
+ add_submenu_page( $admin_tree['parent_slug'],
117
  sprintf( __( '%s', 'yith-plugin-fw' ), $admin_tree['page_title'] ),
118
  sprintf( __( '%s', 'yith-plugin-fw' ), $admin_tree['menu_title'] ),
119
  $admin_tree['capability'],
126
  * Premium product registration
127
  *
128
  * @param $product_init | string | The product init file
129
+ * @param $secret_key | string | The product secret key
130
+ * @param $product_id | string | The product slug (product_id)
131
  *
132
  * @return void
133
  *
135
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
136
  */
137
  public function register( $product_init, $secret_key, $product_id ) {
138
+ $theme = wp_get_theme();
139
+ $products[$product_init]['Name'] = $theme->Name;
140
+ $products[$product_init]['secret_key'] = $secret_key;
141
+ $products[$product_init]['product_id'] = $product_id;
142
+ $this->_products[$product_init] = $products[$product_init];
143
  }
144
 
145
  /**
149
  * @since 2.2
150
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
151
  */
152
+ public function show_old_licence_message() {
153
  return time() < $this->_old_licence_expires;
154
  }
155
 
156
+ public function get_old_licence_message() {
157
  ob_start(); ?>
158
  <div class="activation-faq">
159
  <h3><?php _e( 'I cannot find the license key for activating the theme I have bought some time ago. Where can I find it?', 'yith-plugin-fw' ) ?></h3>
160
+
161
  <p>
162
  <?php
163
  _e( 'If you have purchased one of our products before 27 January 2015, you can benefit from support and updates (the services offered with the license)
170
  <?php
171
  echo ob_get_clean();
172
  }
173
+
174
+ public function get_product_type() {
175
+ return $this->_product_type;
176
+ }
177
  }
178
  }
179
 
184
  * @since 1.0
185
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
186
  */
187
+ if ( !function_exists( 'YIT_Theme_Licence' ) ) {
188
  function YIT_Theme_Licence() {
189
  return YIT_Theme_Licence::instance();
190
  }
plugin-fw/licence/templates/panel/activation/activation-panel.php CHANGED
@@ -27,7 +27,7 @@ $num_members_products_activate = $this->get_number_of_membership_products();
27
  <div class="licence-check-section">
28
  <form method="post" id="licence-check-update" action="<?php echo admin_url( 'admin-ajax.php' ) ?>">
29
  <span class="licence-label" style="display: block;"><?php _e( 'Have you updated your licenses? Have you asked for an extension? Update information concerning your products.', 'yith-plugin-fw' ); ?></span>
30
- <input type="hidden" name="action" value="update_licence_information-<?php echo $this->_product_type ?>" />
31
  <input type="submit" name="submit" value="<?php _e( 'Update license information', 'yith-plugin-fw' ) ?>" class="button-licence licence-check" />
32
  <div class="spinner"></div>
33
  </form>
@@ -63,7 +63,7 @@ $num_members_products_activate = $this->get_number_of_membership_products();
63
  <input type="submit" name="submit" value="<?php _e( 'Activate', 'yith-plugin-fw' )?>" class="button-licence licence-activation" data-formid="<?php echo $info['product_id'] ?>"/>
64
  </td>
65
  </tr>
66
- <input type="hidden" name="action" value="activate-<?php echo $this->_product_type ?>" />
67
  <input type="hidden" name="product_init" value="<?php echo $init ?>" />
68
  </tbody>
69
  </table>
@@ -140,7 +140,7 @@ $num_members_products_activate = $this->get_number_of_membership_products();
140
  data-licence-email="<?php echo $info['licence']['email'] ?>"
141
  data-licence-key="<?php echo $info['licence']['licence_key'] ?>"
142
  data-product-init="<?php echo $init ?>"
143
- data-action="deactivate-<?php echo $this->_product_type ?>">
144
  <?php _e( 'Deactivate', 'yith-plugin-fw' ) ?>
145
  </a>
146
 
@@ -224,7 +224,11 @@ $num_members_products_activate = $this->get_number_of_membership_products();
224
  <?php if( $this->show_renew_button ) : ?>
225
  <td>
226
  <a class="button-licence licence-renew" href="<?php echo $this->get_renewing_uri( $info['licence']['licence_key'] ) ?>" target="_blank">
227
- <?php printf( '%s %s', __( 'Renew', 'yith-plugin-fw' ), $info['licence']['is_membership'] ? __( 'Membership', 'yith-plugin-fw' ) : __( 'License', 'yith-plugin-fw' ) ) ?>
 
 
 
 
228
  </a>
229
  </td>
230
  <?php endif; ?>
27
  <div class="licence-check-section">
28
  <form method="post" id="licence-check-update" action="<?php echo admin_url( 'admin-ajax.php' ) ?>">
29
  <span class="licence-label" style="display: block;"><?php _e( 'Have you updated your licenses? Have you asked for an extension? Update information concerning your products.', 'yith-plugin-fw' ); ?></span>
30
+ <input type="hidden" name="action" value="update_licence_information-<?php echo $this->get_product_type(); ?>" />
31
  <input type="submit" name="submit" value="<?php _e( 'Update license information', 'yith-plugin-fw' ) ?>" class="button-licence licence-check" />
32
  <div class="spinner"></div>
33
  </form>
63
  <input type="submit" name="submit" value="<?php _e( 'Activate', 'yith-plugin-fw' )?>" class="button-licence licence-activation" data-formid="<?php echo $info['product_id'] ?>"/>
64
  </td>
65
  </tr>
66
+ <input type="hidden" name="action" value="activate-<?php echo $this->get_product_type(); ?>" />
67
  <input type="hidden" name="product_init" value="<?php echo $init ?>" />
68
  </tbody>
69
  </table>
140
  data-licence-email="<?php echo $info['licence']['email'] ?>"
141
  data-licence-key="<?php echo $info['licence']['licence_key'] ?>"
142
  data-product-init="<?php echo $init ?>"
143
+ data-action="deactivate-<?php echo $this->get_product_type(); ?>">
144
  <?php _e( 'Deactivate', 'yith-plugin-fw' ) ?>
145
  </a>
146
 
224
  <?php if( $this->show_renew_button ) : ?>
225
  <td>
226
  <a class="button-licence licence-renew" href="<?php echo $this->get_renewing_uri( $info['licence']['licence_key'] ) ?>" target="_blank">
227
+ <?php if( $info['licence']['is_membership'] ) : ?>
228
+ <?php _e( 'Order again', 'yith-plugin-fw' ) ?>
229
+ <?php else : ?>
230
+ <?php __( 'Renew license', 'yith-plugin-fw' ) ?>
231
+ <?php endif; ?>
232
  </a>
233
  </td>
234
  <?php endif; ?>