YITH WooCommerce Ajax Search - Version 1.7.5

Version Description

  • Released on 5 March 2020 =
  • New: Support for WordPress 5.4
  • New: Support for WooCommerce 4.0
  • Update: Plugin framework
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Search
Version 1.7.5
Comparing to
See all releases

Code changes from version 1.7.4 to 1.7.5

Files changed (49) hide show
  1. README.txt +8 -2
  2. class.yith-wcas-admin.php +204 -247
  3. class.yith-wcas-frontend.php +65 -68
  4. class.yith-wcas.php +223 -227
  5. functions.yith-wcas.php +23 -17
  6. init.php +142 -134
  7. plugin-fw/assets/css/yith-fields.css +144 -136
  8. plugin-fw/assets/fonts/yith-icon.eot +0 -0
  9. plugin-fw/assets/fonts/yith-icon.svg +9 -0
  10. plugin-fw/assets/fonts/yith-icon.ttf +0 -0
  11. plugin-fw/assets/fonts/yith-icon.woff +0 -0
  12. plugin-fw/assets/images/banner-free.png +0 -0
  13. plugin-fw/assets/images/banner-premium.png +0 -0
  14. plugin-fw/assets/images/rate_banner.png +0 -0
  15. plugin-fw/assets/images/upgrade_banner.png +0 -0
  16. plugin-fw/assets/js/metabox.js +9 -1
  17. plugin-fw/assets/js/metabox.min.js +1 -7
  18. plugin-fw/assets/js/yit-plugin-panel.js +19 -2
  19. plugin-fw/assets/js/yit-plugin-panel.min.js +8 -7
  20. plugin-fw/assets/js/yith-fields.js +7 -1
  21. plugin-fw/assets/js/yith-fields.min.js +12 -11
  22. plugin-fw/init.php +2 -2
  23. plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
  24. plugin-fw/languages/yith-plugin-fw-el.po +811 -0
  25. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  26. plugin-fw/languages/yith-plugin-fw-es_ES.po +652 -484
  27. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  28. plugin-fw/languages/yith-plugin-fw-it_IT.po +644 -481
  29. plugin-fw/languages/yith-plugin-fw-nl_NL.mo +0 -0
  30. plugin-fw/languages/yith-plugin-fw-nl_NL.po +1140 -0
  31. plugin-fw/languages/yith-plugin-fw.pot +261 -383
  32. plugin-fw/lib/promo/yith-promo.php +13 -2
  33. plugin-fw/lib/yit-cpt-unlimited.php +4 -2
  34. plugin-fw/lib/yit-metabox.php +78 -51
  35. plugin-fw/lib/yit-plugin-gradients.php +6 -6
  36. plugin-fw/lib/yit-plugin-panel-wc.php +27 -16
  37. plugin-fw/lib/yit-plugin-panel.php +21 -35
  38. plugin-fw/lib/yit-pointers.php +2 -2
  39. plugin-fw/lib/yith-system-status.php +45 -39
  40. plugin-fw/templates/fields/country-select.php +1 -2
  41. plugin-fw/templates/fields/multi-colorpicker.php +3 -3
  42. plugin-fw/templates/fields/multi-select.php +2 -1
  43. plugin-fw/templates/fields/onoff.php +3 -1
  44. plugin-fw/templates/panel/panel-field-container.php +4 -2
  45. plugin-fw/yit-functions.php +23 -2
  46. plugin-fw/yit-plugin.php +2 -1
  47. templates/admin/premium.php +311 -306
  48. templates/yith-woocommerce-ajax-search.php +26 -35
  49. widgets/class.yith-wcas-ajax-search.php +104 -94
README.txt CHANGED
@@ -3,8 +3,8 @@
3
Contributors: yithemes
4
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
Requires at least: 4.0.0
6
- Tested up to: 5.3
7
- Stable tag: 1.7.4
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -138,6 +138,12 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
138
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
139
140
== Changelog ==
141
= 1.7.4 - Released on 23 December 2019 =
142
143
* New: Support for WooCommerce 3.9
3
Contributors: yithemes
4
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
Requires at least: 4.0.0
6
+ Tested up to: 5.4
7
+ Stable tag: 1.7.5
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
138
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
139
140
== Changelog ==
141
+
142
+ = 1.7.5 - Released on 5 March 2020 =
143
+ * New: Support for WordPress 5.4
144
+ * New: Support for WooCommerce 4.0
145
+ * Update: Plugin framework
146
+
147
= 1.7.4 - Released on 23 December 2019 =
148
149
* New: Support for WooCommerce 3.9
class.yith-wcas-admin.php CHANGED
@@ -1,247 +1,204 @@
1
- <?php
2
- /**
3
- * Admin class
4
- *
5
- * @author YITH
6
- * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.1
8
- */
9
-
10
- if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
11
-
12
- if( !class_exists( 'YITH_WCAS_Admin' ) ) {
13
- /**
14
- * Admin class.
15
- * The class manage all the admin behaviors.
16
- *
17
- * @since 1.0.0
18
- */
19
- class YITH_WCAS_Admin {
20
- /**
21
- * Plugin options
22
- *
23
- * @var array
24
- * @access public
25
- * @since 1.0.0
26
- */
27
- public $options = array();
28
-
29
- /**
30
- * Plugin version
31
- *
32
- * @var string
33
- * @since 1.0.0
34
- */
35
- public $version;
36
-
37
- /**
38
- * @var $_panel Panel Object
39
- */
40
- protected $_panel;
41
-
42
- /**
43
- * @var $_premium string Premium tab template file name
44
- */
45
- protected $_premium = 'premium.php';
46
-
47
- /**
48
- * @var string Premium version landing link
49
- */
50
- protected $_premium_landing = 'https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/';
51
-
52
- /**
53
- * @var string Ajax Search panel page
54
- */
55
- protected $_panel_page = 'yith_wcas_panel';
56
-
57
-
58
- /**
59
- * Constructor
60
- *
61
- * @access public
62
- * @since 1.0.0
63
- */
64
- public function __construct( $version ) {
65
-
66
- $this->version = $version;
67
-
68
- add_action( 'admin_menu', array( $this, 'register_panel' ), 5) ;
69
- add_action( 'init', array( $this, 'gutenberg_integration' ) );
70
- //Add action links
71
- add_filter( 'plugin_action_links_' . plugin_basename( YITH_WCAS_DIR . '/' . basename( YITH_WCAS_FILE ) ), array( $this, 'action_links' ) );
72
- add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
73
-
74
- add_action( 'yith_ajax_search_premium', array( $this, 'premium_tab' ) );
75
-
76
- add_action( 'admin_init', array( $this, 'register_pointer' ) );
77
-
78
- // YITH WCAS Loaded
79
- do_action( 'yith_wcas_loaded' );
80
- }
81
-
82
-
83
- /**
84
- * Gutenberg Integration
85
- */
86
- public function gutenberg_integration() {
87
- if ( function_exists( 'yith_plugin_fw_gutenberg_add_blocks' ) ) {
88
- $blocks = include_once( YITH_WCAS_DIR . 'plugin-options/gutenberg/blocks.php' );
89
- yith_plugin_fw_gutenberg_add_blocks( $blocks );
90
- }
91
- }
92
-
93
- /**
94
- * Action Links
95
- *
96
- * add the action links to plugin admin page
97
- *
98
- * @param $links | links plugin array
99
- *
100
- * @return mixed Array
101
- * @since 1.0
102
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
103
- * @return mixed
104
- * @use plugin_action_links_{$plugin_file_name}
105
- */
106
- public function action_links( $links ) {
107
- $links = yith_add_action_links( $links, $this->_panel_page, false );
108
- return $links;
109
- }
110
-
111
- /**
112
- * Add a panel under YITH Plugins tab
113
- *
114
- * @return void
115
- * @since 1.0
116
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
117
- * @use /Yit_Plugin_Panel class
118
- * @see plugin-fw/lib/yit-plugin-panel.php
119
- */
120
- public function register_panel() {
121
-
122
- if ( ! empty( $this->_panel ) ) {
123
- return;
124
- }
125
-
126
- $admin_tabs = array(
127
- 'settings' => __( 'Settings', 'yith-woocommerce-ajax-search' ),
128
- 'premium' => __( 'Premium Version', 'yith-woocommerce-ajax-search' ),
129
- );
130
-
131
- $args = array(
132
- 'create_menu_page' => true,
133
- 'parent_slug' => '',
134
- 'plugin_slug' => YITH_WCAS_SLUG,
135
- 'page_title' => __( 'YITH WooCommerce Ajax Search', 'yith-woocommerce-ajax-search' ),
136
- 'menu_title' => __( 'Ajax Search', 'yith-woocommerce-ajax-search' ),
137
- 'capability' => 'manage_options',
138
- 'parent' => '',
139
- 'parent_page' => 'yith_plugin_panel',
140
- 'page' => $this->_panel_page,
141
- 'admin-tabs' => $admin_tabs,
142
- 'class' => yith_set_wrapper_class(),
143
- 'options-path' => YITH_WCAS_DIR . '/plugin-options'
144
- );
145
-
146
-
147
- /* === Fixed: not updated theme === */
148
- if( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
149
- require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
150
- }
151
-
152
- $this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
153
- }
154
-
155
- /**
156
- * Premium Tab Template
157
- *
158
- * Load the premium tab template on admin page
159
- *
160
- * @return void
161
- * @since 1.0
162
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
163
- * @return void
164
- */
165
- public function premium_tab() {
166
- $premium_tab_template =YITH_WCAS_TEMPLATE_PATH . '/admin/' . $this->_premium;
167
- if( file_exists( $premium_tab_template ) ) {
168
- include_once($premium_tab_template);
169
- }
170
-
171
- }
172
-
173
- /**
174
- * plugin_row_meta
175
- *
176
- * add the action links to plugin admin page
177
- *
178
- * @param $plugin_meta
179
- * @param $plugin_file
180
- * @param $plugin_data
181
- * @param $status
182
- *
183
- * @return Array
184
- * @since 1.0
185
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
186
- * @use plugin_row_meta
187
- */
188
- public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_WCAS_FREE_INIT' ) {
189
- if ( defined( $init_file ) && constant( $init_file ) == $plugin_file ) {
190
- $new_row_meta_args['slug'] = YITH_WCAS_SLUG;
191
- }
192
-
193
- return $new_row_meta_args;
194
- }
195
-
196
-
197
- public function register_pointer(){
198
-
199
- if( ! class_exists( 'YIT_Pointers' ) ){
200
- include_once( 'plugin-fw/lib/yit-pointers.php' );
201
- }
202
-
203
- $args[] = array(
204
- 'screen_id' => 'plugins',
205
- 'pointer_id' => 'yith_wcas_panel',
206
- 'target' => '#toplevel_page_yit_plugin_panel',
207
- 'content' => sprintf( '<h3> %s </h3> <p> %s <a href="%s">%s</a></p>',
208
- __( 'YITH WooCommerce Ajax Search', 'yith-woocommerce-ajax-search' ),
209
- __( 'In the YIT Plugin tab you can find the YITH WooCommerce Ajax Search options.
210
- With this menu, you can access to all the settings of our plugins that you have activated.
211
- YITH WooCommerce Ajax Search is available in an outstanding PREMIUM version with many new options','yith-woocommerce-ajax-search'), $this->_premium_landing, __('discover it now', 'yith-woocommerce-ajax-search' ) ),
212
- 'position' => array( 'edge' => 'left', 'align' => 'center' ),
213
- 'init' => YITH_WCAS_FREE_INIT
214
- );
215
-
216
- $args[] = array(
217
- 'screen_id' => 'update',
218
- 'pointer_id' => 'yith_wcas_panel',
219
- 'target' => '#toplevel_page_yit_plugin_panel',
220
- 'content' => sprintf( '<h3> %s </h3> <p> %s <a href="%s">%s</a></p>',
221
- __( 'YITH WooCommerce Ajax Search Updated', 'yith-woocommerce-ajax-search' ),
222
- __( 'From now on, you can find all the options of YITH WooCommerce Ajax Search Updated under YIT Plugin -> Ajax Search instead of WooCommerce -> Settings -> Ajax Search, as in the previous version.
223
- When one of our plugins updates, a new voice will be added to this menu.
224
- YITH WooCommerce Ajax Search renovates with new available options, discover the', 'yith-woocommerce-ajax-search'),
225
- $this->get_premium_landing_uri(), __('PREMIUM version', 'yith-woocommerce-ajax-search' )
226
- ),
227
- 'position' => array( 'edge' => 'left', 'align' => 'center' ),
228
- 'init' => YITH_WCAS_FREE_INIT
229
- );
230
-
231
- YIT_Pointers()->register( $args );
232
- }
233
-
234
-
235
- /**
236
- * Get the premium landing uri
237
- *
238
- * @since 1.0.0
239
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
240
- * @return string The premium landing link
241
- */
242
- public function get_premium_landing_uri(){
243
- return $this->_premium_landing;
244
- }
245
-
246
- }
247
- }
1
+ <?php
2
+ /**
3
+ * Admin class
4
+ *
5
+ * @author YITH
6
+ * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
+ */
9
+
10
+ if ( ! defined( 'YITH_WCAS' ) ) {
11
+ exit; } // Exit if accessed directly
12
+
13
+ if ( ! class_exists( 'YITH_WCAS_Admin' ) ) {
14
+ /**
15
+ * Admin class.
16
+ * The class manage all the admin behaviors.
17
+ *
18
+ * @since 1.0.0
19
+ */
20
+ class YITH_WCAS_Admin {
21
+ /**
22
+ * Plugin options
23
+ *
24
+ * @var array
25
+ * @access public
26
+ * @since 1.0.0
27
+ */
28
+ public $options = array();
29
+
30
+ /**
31
+ * Panel object
32
+ *
33
+ * @var Panel Object
34
+ */
35
+ protected $_panel;
36
+
37
+ /**
38
+ * Premium tab template file name.
39
+ *
40
+ * @var string
41
+ */
42
+ protected $_premium = 'premium.php';
43
+
44
+ /**
45
+ * Premium version landing link.
46
+ *
47
+ * @var string
48
+ */
49
+ protected $_premium_landing = 'https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/';
50
+
51
+ /**
52
+ * Ajax Search panel page.
53
+ *
54
+ * @var string
55
+ */
56
+ protected $_panel_page = 'yith_wcas_panel';
57
+
58
+
59
+ /**
60
+ * Constructor
61
+ *
62
+ * @access public
63
+ * @since 1.0.0
64
+ */
65
+ public function __construct() {
66
+
67
+ add_action( 'admin_menu', array( $this, 'register_panel' ), 5 );
68
+ add_action( 'init', array( $this, 'gutenberg_integration' ) );
69
+ // Add action links.
70
+ add_filter( 'plugin_action_links_' . plugin_basename( YITH_WCAS_DIR . '/' . basename( YITH_WCAS_FILE ) ), array( $this, 'action_links' ) );
71
+ add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
72
+
73
+ add_action( 'yith_ajax_search_premium', array( $this, 'premium_tab' ) );
74
+
75
+ // YITH WCAS Loaded.
76
+ do_action( 'yith_wcas_loaded' );
77
+ }
78
+
79
+
80
+ /**
81
+ * Gutenberg Integration
82
+ */
83
+ public function gutenberg_integration() {
84
+ if ( function_exists( 'yith_plugin_fw_gutenberg_add_blocks' ) ) {
85
+ $blocks = include_once YITH_WCAS_DIR . 'plugin-options/gutenberg/blocks.php';
86
+ yith_plugin_fw_gutenberg_add_blocks( $blocks );
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Action Links
92
+ *
93
+ * Add the action links to plugin admin page
94
+ *
95
+ * @param string $links | links plugin array.
96
+ *
97
+ * @return mixed
98
+ * @since 1.0
99
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
100
+ * @use plugin_action_links_{$plugin_file_name}
101
+ */
102
+ public function action_links( $links ) {
103
+ $links = yith_add_action_links( $links, $this->_panel_page, false );
104
+ return $links;
105
+ }
106
+
107
+ /**
108
+ * Add a panel under YITH Plugins tab
109
+ *
110
+ * @return void
111
+ * @since 1.0
112
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
113
+ * @use /Yit_Plugin_Panel class
114
+ * @see plugin-fw/lib/yit-plugin-panel.php
115
+ */
116
+ public function register_panel() {
117
+
118
+ if ( ! empty( $this->_panel ) ) {
119
+ return;
120
+ }
121
+
122
+ $admin_tabs = array(
123
+ 'settings' => __( 'Settings', 'yith-woocommerce-ajax-search' ),
124
+ 'premium' => __( 'Premium Version', 'yith-woocommerce-ajax-search' ),
125
+ );
126
+
127
+ $args = array(
128
+ 'create_menu_page' => true,
129
+ 'parent_slug' => '',
130
+ 'plugin_slug' => YITH_WCAS_SLUG,
131
+ 'page_title' => __( 'YITH WooCommerce Ajax Search', 'yith-woocommerce-ajax-search' ),
132
+ 'menu_title' => __( 'Ajax Search', 'yith-woocommerce-ajax-search' ),
133
+ 'capability' => 'manage_options',
134
+ 'parent' => '',
135
+ 'parent_page' => 'yith_plugin_panel',
136
+ 'page' => $this->_panel_page,
137
+ 'admin-tabs' => $admin_tabs,
138
+ 'class' => yith_set_wrapper_class(),
139
+ 'options-path' => YITH_WCAS_DIR . '/plugin-options',
140
+ );
141
+
142
+ /* === Fixed: not updated theme === */
143
+ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
144
+ require_once 'plugin-fw/lib/yit-plugin-panel-wc.php';
145
+ }
146
+
147
+ $this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
148
+ }
149
+
150
+ /**
151
+ * Premium Tab Template
152
+ *
153
+ * Load the premium tab template on admin page
154
+ *
155
+ * @return void
156
+ * @since 1.0
157
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
158
+ */
159
+ public function premium_tab() {
160
+ $premium_tab_template = YITH_WCAS_TEMPLATE_PATH . '/admin/' . $this->_premium;
161
+ if ( file_exists( $premium_tab_template ) ) {
162
+ include_once $premium_tab_template;
163
+ }
164
+
165
+ }
166
+
167
+ /**
168
+ * Add the action links to plugin admin page
169
+ *
170
+ * @param string $new_row_meta_args Plugin Meta New args.
171
+ * @param string $plugin_meta Plugin Meta.
172
+ * @param string $plugin_file Plugin file.
173
+ * @param array $plugin_data Plugin data.
174
+ * @param string $status Status.
175
+ * @param string $init_file Init file.
176
+ *
177
+ * @return array
178
+ * @since 1.0
179
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
180
+ * @use plugin_row_meta
181
+ */
182
+ public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_WCAS_FREE_INIT' ) {
183
+ if ( defined( $init_file ) && constant( $init_file ) === $plugin_file ) {
184
+ $new_row_meta_args['slug'] = YITH_WCAS_SLUG;
185
+ }
186
+
187
+ return $new_row_meta_args;
188
+ }
189
+
190
+
191
+
192
+ /**
193
+ * Get the premium landing uri
194
+ *
195
+ * @since 1.0.0
196
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
197
+ * @return string The premium landing link
198
+ */
199
+ public function get_premium_landing_uri() {
200
+ return $this->_premium_landing;
201
+ }
202
+
203
+ }
204
+ }
class.yith-wcas-frontend.php CHANGED
@@ -1,68 +1,65 @@
1
- <?php
2
- /**
3
- * Frontend class
4
- *
5
- * @author YITH
6
- * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.1
8
- */
9
-
10
- if ( !defined( 'YITH_WCAS' ) ) { exit; } // Exit if accessed directly
11
-
12
- if( !class_exists( 'YITH_WCAS_Frontend' ) ) {
13
- /**
14
- * Admin class.
15
- * The class manage all the Frontend behaviors.
16
- *
17
- * @since 1.0.0
18
- */
19
- class YITH_WCAS_Frontend {
20
- /**
21
- * Plugin version
22
- *
23
- * @var string
24
- * @since 1.0.0
25
- */
26
- public $version;
27
-
28
- /**
29
- * Constructor
30
- *
31
- * @access public
32
- * @since 1.0.0
33
- */
34
- public function __construct( $version ) {
35
- $this->version = $version;
36
-
37
- //custom styles and javascripts
38
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
39
- }
40
-
41
- /**
42
- * Enqueue styles and scripts
43
- *
44
- * @access public
45
- * @return void
46
- * @since 1.0.0
47
- */
48
- public function enqueue_styles_scripts() {
49
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
50
- wp_register_script('yith_autocomplete', YITH_WCAS_URL . 'assets/js/yith-autocomplete' . $suffix .'.js', array('jquery'), '1.2.7', true);
51
- wp_register_script('yith_wcas_jquery-autocomplete', YITH_WCAS_URL . 'assets/js/devbridge-jquery-autocomplete' . $suffix .'.js', array('jquery'), '1.2.7', true);
52
-
53
- wp_register_script('yith_wcas_frontend', YITH_WCAS_URL . 'assets/js/frontend' . $suffix .'.js', array('jquery'), '1.0', true);
54
-
55
- $css = file_exists( get_stylesheet_directory() . '/woocommerce/yith_ajax_search.css' ) ? get_stylesheet_directory_uri() . '/woocommerce/yith_ajax_search.css' : YITH_WCAS_URL . 'assets/css/yith_wcas_ajax_search.css';
56
- wp_enqueue_style( 'yith_wcas_frontend', $css );
57
-
58
- wp_localize_script( 'yith_wcas_frontend', 'yith_wcas_params', array(
59
- 'loading' => YITH_WCAS_ASSETS_IMAGES_URL.'ajax-loader.gif',
60
- 'ajax_url' => admin_url( 'admin-ajax.php' )
61
-
62
- ));
63
-
64
- wp_enqueue_script('yith_autocomplete' );
65
-
66
- }
67
- }
68
- }
1
+ <?php
2
+ /**
3
+ * Frontend class
4
+ *
5
+ * @author YITH
6
+ * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
+ */
9
+
10
+ if ( ! defined( 'YITH_WCAS' ) ) {
11
+ exit; } // Exit if accessed directly
12
+
13
+ if ( ! class_exists( 'YITH_WCAS_Frontend' ) ) {
14
+ /**
15
+ * Admin class.
16
+ * The class manage all the Frontend behaviors.
17
+ *
18
+ * @since 1.0.0
19
+ */
20
+ class YITH_WCAS_Frontend {
21
+
22
+ /**
23
+ * Constructor
24
+ *
25
+ * @access public
26
+ * @since 1.0.0
27
+ */
28
+ public function __construct( ) {
29
+
30
+ // custom styles and javascript.
31
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
32
+ }
33
+
34
+ /**
35
+ * Enqueue styles and scripts
36
+ *
37
+ * @access public
38
+ * @return void
39
+ * @since 1.0.0
40
+ */
41
+ public function enqueue_styles_scripts() {
42
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
43
+ wp_register_script( 'yith_autocomplete', YITH_WCAS_URL . 'assets/js/yith-autocomplete' . $suffix . '.js', array( 'jquery' ), '1.2.7', true );
44
+ wp_register_script( 'yith_wcas_jquery-autocomplete', YITH_WCAS_URL . 'assets/js/devbridge-jquery-autocomplete' . $suffix . '.js', array( 'jquery' ), '1.2.7', true );
45
+
46
+ wp_register_script( 'yith_wcas_frontend', YITH_WCAS_URL . 'assets/js/frontend' . $suffix . '.js', array( 'jquery' ), '1.0', true );
47
+
48
+ $css = file_exists( get_stylesheet_directory() . '/woocommerce/yith_ajax_search.css' ) ? get_stylesheet_directory_uri() . '/woocommerce/yith_ajax_search.css' : YITH_WCAS_URL . 'assets/css/yith_wcas_ajax_search.css';
49
+ wp_enqueue_style( 'yith_wcas_frontend', $css, array(), YITH_WCAS_VERSION );
50
+
51
+ wp_localize_script(
52
+ 'yith_wcas_frontend',
53
+ 'yith_wcas_params',
54
+ array(
55
+ 'loading' => YITH_WCAS_ASSETS_IMAGES_URL . 'ajax-loader.gif',
56
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
57
+
58
+ )
59
+ );
60
+
61
+ wp_enqueue_script( 'yith_autocomplete' );
62
+
63
+ }
64
+ }
65
+ }
class.yith-wcas.php CHANGED
@@ -1,227 +1,223 @@
1
- <?php
2
- /**
3
- * Main class
4
- *
5
- * @author YITH
6
- * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.1
8
- */
9
-
10
- if ( !defined( 'YITH_WCAS' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
-
14
- if ( !class_exists( 'YITH_WCAS' ) ) {
15
- /**
16
- * YITH WooCommerce Ajax Search
17
- *
18
- * @since 1.0.0
19
- */
20
- class YITH_WCAS {
21
- /**
22
- * Plugin version
23
- *
24
- * @var string
25
- * @since 1.0.0
26
- */
27
- public $version = YITH_WCAS_VERSION;
28
-
29
- /**
30
- * Plugin object
31
- *
32
- * @var string
33
- * @since 1.0.0
34
- */
35
- public $obj = null;
36
-
37
- /**
38
- * Constructor
39
- *
40
- * @return mixed|YITH_WCAS_Admin|YITH_WCAS_Frontend
41
- * @since 1.0.0
42
- */
43
- public function __construct() {
44
-
45
- $this->obj = false;
46
-
47
- // Load Plugin Framework
48
- if( ! isset( $_REQUEST['action'] ) || $_REQUEST['action'] != 'yith_ajax_search_products' ) {
49
- add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
50
-
51
- if ( is_admin() ) {
52
- $this->obj = new YITH_WCAS_Admin( $this->version );
53
-
54
- }else {
55
- $this->obj = new YITH_WCAS_Frontend( $this->version );
56
- }
57
- }else{
58
- if ( class_exists( 'YITH_JetPack' ) ) {
59
- include_once( YJP_DIR . 'plugin-fw/yit-woocommerce-compatibility.php' );
60
- } else {
61
- include_once( YITH_WCAS_DIR . 'plugin-fw/yit-woocommerce-compatibility.php' );
62
- }
63
- }
64
-
65
-
66
- // actions
67
- add_action( 'widgets_init', array( $this, 'registerWidgets' ) );
68
-
69
- add_action( 'wp_ajax_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
70
- add_action( 'wp_ajax_nopriv_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
71
-
72
- //register shortcode
73
- add_shortcode( 'yith_woocommerce_ajax_search', array( $this, 'add_woo_ajax_search_shortcode' ) );
74
-
75
- return $this->obj;
76
- }
77
-
78
-
79
- /**
80
- * Load Plugin Framework
81
- *
82
- * @since 1.0
83
- * @access public
84
- * @return void
85
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
86
- */
87
- public function plugin_fw_loader() {
88
- if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
89
- global $plugin_fw_data;
90
- if( ! empty( $plugin_fw_data ) ){
91
- $plugin_fw_file = array_shift( $plugin_fw_data );
92
- require_once( $plugin_fw_file );
93
- }
94
- }
95
- }
96
-
97
-
98
-
99
- /**
100
- * Load template for [yith_woocommerce_ajax_search] shortcode
101
- *
102
- * @access public
103
- *
104
- * @param $args array
105
- *
106
- * @return void
107
- * @since 1.0.0
108
- */
109
- public function add_woo_ajax_search_shortcode( $args = array() ) {
110
- $args = shortcode_atts( array(), $args );
111
- //for WC 3.6.0
112
- unset( $args['template']);
113
-
114
- ob_start();
115
- $wc_get_template = function_exists( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
116
- $wc_get_template( 'yith-woocommerce-ajax-search.php', $args, '', YITH_WCAS_DIR . 'templates/' );
117
- return ob_get_clean();
118
- }
119
-
120
- /**
121
- * Load and register widgets
122
- *
123
- * @access public
124
- * @since 1.0.0
125
- */
126
- public function registerWidgets() {
127
- register_widget( 'YITH_WCAS_Ajax_Search_Widget' );
128
- }
129
-
130
-
131
- /**
132
- * Perform ajax search products
133
- */
134
- public function ajax_search_products() {
135
- global $woocommerce;
136
- $time_start = getmicrotime();
137
- $transient_enabled = get_option( 'yith_wcas_enable_transient', 'no' );
138
- $transient_duration = get_option( 'yith_wcas_transient_duration', 12 );
139
-
140
- $search_keyword = $_REQUEST['query'];
141
-
142
- $ordering_args = $woocommerce->query->get_catalog_ordering_args( 'title', 'asc' );
143
- $suggestions = array();
144
-
145
- $transient_name = 'ywcas_' . $search_keyword;
146
- if ( $transient_enabled == 'no' || false === ( $suggestions = get_transient( $transient_name ) ) ) {
147
- $args = array(
148
- 's' => apply_filters( 'yith_wcas_ajax_search_products_search_query', $search_keyword ),
149
- 'post_type' => 'product',
150
- 'post_status' => 'publish',
151
- 'ignore_sticky_posts' => 1,
152
- 'orderby' => $ordering_args['orderby'],
153
- 'order' => $ordering_args['order'],
154
- 'posts_per_page' => apply_filters( 'yith_wcas_ajax_search_products_posts_per_page', get_option( 'yith_wcas_posts_per_page' ) ),
155
- 'suppress_filters' => false
156
- );
157
-
158
- if ( isset( $_REQUEST['product_cat'] ) ) {
159
- $args['tax_query'] = array(
160
- 'relation' => 'AND',
161
- array(
162
- 'taxonomy' => 'product_cat',
163
- 'field' => 'slug',
164
- 'terms' => $_REQUEST['product_cat']
165
- )
166
- );
167
- }
168
-
169
- if ( version_compare( WC()->version, '2.7.0', '<' ) ) {
170
- $args['meta_query'] = array(
171
- array(
172
- 'key' => '_visibility',
173
- 'value' => array( 'search', 'visible' ),
174
- 'compare' => 'IN'
175
- ),
176
- );
177
- }else{
178
- $product_visibility_term_ids = wc_get_product_visibility_term_ids();
179
- $args['tax_query'][] = array(
180
- 'taxonomy' => 'product_visibility',
181
- 'field' => 'term_taxonomy_id',
182
- 'terms' => $product_visibility_term_ids['exclude-from-search'],
183
- 'operator' => 'NOT IN',
184
- );
185
- }
186
-
187
-
188
- $products = get_posts( $args );
189
-
190
- if ( ! empty( $products ) ) {
191
- foreach ( $products as $post ) {
192
- $product = wc_get_product( $post );
193
-
194
- $suggestions[] = apply_filters( 'yith_wcas_suggestion', array(
195
- 'id' => $product->get_id(),
196
- 'value' => strip_tags( $product->get_title() ),
197
- 'url' => $product->get_permalink()
198
- ), $product );
199
- }
200
- } else {
201
- $suggestions[] = array(
202
- 'id' => - 1,
203
- 'value' => __( 'No results', 'yith-woocommerce-ajax-search' ),
204
- 'url' => '',
205
- );
206
- }
207
- wp_reset_postdata();
208
-
209
- if ( $transient_enabled == 'yes' ) {
210
- set_transient( $transient_name, $suggestions, $transient_duration * HOUR_IN_SECONDS );
211
- }
212
- }
213
-
214
- $time_end = getmicrotime();
215
- $time = $time_end - $time_start;
216
- $suggestions = array(
217
- 'suggestions' => $suggestions,
218
- 'time' => $time
219
- );
220
- echo json_encode( $suggestions );
221
- die();
222
-
223
- }
224
-
225
-
226
- }
227
- }
1
+ <?php
2
+ /**
3
+ * Main class
4
+ *
5
+ * @author YITH
6
+ * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
+ */
9
+
10
+ if ( ! defined( 'YITH_WCAS' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+ if ( ! class_exists( 'YITH_WCAS' ) ) {
15
+ /**
16
+ * YITH WooCommerce Ajax Search
17
+ *
18
+ * @since 1.0.0
19
+ */
20
+ class YITH_WCAS {
21
+
22
+ /**
23
+ * Plugin object
24
+ *
25
+ * @var string
26
+ * @since 1.0.0
27
+ */
28
+ public $obj = null;
29
+
30
+ /**
31
+ * Constructor
32
+ *
33
+ * @return mixed|YITH_WCAS_Admin|YITH_WCAS_Frontend
34
+ * @since 1.0.0
35
+ */
36
+ public function __construct() {
37
+
38
+ $this->obj = false;
39
+
40
+ // Load Plugin Framework.
41
+ if ( ! isset( $_REQUEST['action'] ) || 'yith_ajax_search_products' !== $_REQUEST['action'] ) {
42
+ add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
43
+
44
+ if ( is_admin() ) {
45
+ $this->obj = new YITH_WCAS_Admin();
46
+
47
+ } else {
48
+ $this->obj = new YITH_WCAS_Frontend();
49
+ }
50
+ } else {
51
+ if ( class_exists( 'YITH_JetPack' ) ) {
52
+ include_once YJP_DIR . 'plugin-fw/yit-woocommerce-compatibility.php';
53
+ } else {
54
+ include_once YITH_WCAS_DIR . 'plugin-fw/yit-woocommerce-compatibility.php';
55
+ }
56
+ }
57
+
58
+ // actions.
59
+ add_action( 'widgets_init', array( $this, 'registerWidgets' ) );
60
+
61
+ add_action( 'wp_ajax_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
62
+ add_action( 'wp_ajax_nopriv_yith_ajax_search_products', array( $this, 'ajax_search_products' ) );
63
+
64
+ // register shortcode.
65
+ add_shortcode( 'yith_woocommerce_ajax_search', array( $this, 'add_woo_ajax_search_shortcode' ) );
66
+
67
+ return $this->obj;
68
+ }
69
+
70
+
71
+ /**
72
+ * Load Plugin Framework
73
+ *
74
+ * @since 1.0
75
+ * @access public
76
+ * @return void
77
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
78
+ */
79
+ public function plugin_fw_loader() {
80
+ if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
81
+ global $plugin_fw_data;
82
+ if ( ! empty( $plugin_fw_data ) ) {
83
+ $plugin_fw_file = array_shift( $plugin_fw_data );
84
+ require_once $plugin_fw_file;
85
+ }
86
+ }
87
+ }
88
+
89
+
90
+
91
+ /**
92
+ * Load template for [yith_woocommerce_ajax_search] shortcode
93
+ *
94
+ * @access public
95
+ *
96
+ * @param array $args Array of arguments.
97
+ *
98
+ * @return mixed
99
+ * @since 1.0.0
100
+ */
101
+ public function add_woo_ajax_search_shortcode( $args = array() ) {
102
+ $args = shortcode_atts( array(), $args );
103
+ // for WC 3.6.0.
104
+ unset( $args['template'] );
105
+
106
+ ob_start();
107
+ $wc_get_template = function_exists( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
108
+ $wc_get_template( 'yith-woocommerce-ajax-search.php', $args, '', YITH_WCAS_DIR . 'templates/' );
109
+ return ob_get_clean();
110
+ }
111
+
112
+ /**
113
+ * Load and register widgets
114
+ *
115
+ * @access public
116
+ * @since 1.0.0
117
+ */
118
+ public function registerWidgets() {
119
+ register_widget( 'YITH_WCAS_Ajax_Search_Widget' );
120
+ }
121
+
122
+
123
+ /**
124
+ * Perform ajax search products
125
+ */
126
+ public function ajax_search_products() {
127
+ global $woocommerce;
128
+ $time_start = getmicrotime();
129
+ $transient_enabled = get_option( 'yith_wcas_enable_transient', 'no' );
130
+ $transient_duration = get_option( 'yith_wcas_transient_duration', 12 );
131
+
132
+ $search_keyword = sanitize_text_field( wp_unslash( $_REQUEST['query'] ) );
133
+
134
+ $ordering_args = $woocommerce->query->get_catalog_ordering_args( 'title', 'asc' );
135
+ $suggestions = array();
136
+
137
+ $transient_name = 'ywcas_' . $search_keyword;
138
+ $suggestions = get_transient( $transient_name );
139
+ if ( 'no' === $transient_enabled || false === $suggestions ) {
140
+ $args = array(
141
+ 's' => apply_filters( 'yith_wcas_ajax_search_products_search_query', $search_keyword ),
142
+ 'post_type' => 'product',
143
+ 'post_status' => 'publish',
144
+ 'ignore_sticky_posts' => 1,
145
+ 'orderby' => $ordering_args['orderby'],
146
+ 'order' => $ordering_args['order'],
147
+ 'posts_per_page' => apply_filters( 'yith_wcas_ajax_search_products_posts_per_page', get_option( 'yith_wcas_posts_per_page' ) ),
148
+ 'suppress_filters' => false,
149
+ );
150
+
151
+ if ( isset( $_REQUEST['product_cat'] ) ) {
152
+ $args['tax_query'] = array(
153
+ 'relation' => 'AND',
154
+ array(
155
+ 'taxonomy' => 'product_cat',
156
+ 'field' => 'slug',
157
+ 'terms' => sanitize_text_field( wp_unslash( $_REQUEST['product_cat'] ) ),
158
+ ),
159
+ );
160
+ }
161
+
162
+ if ( version_compare( WC()->version, '2.7.0', '<' ) ) {
163
+ $args['meta_query'] = array(
164
+ array(
165
+ 'key' => '_visibility',
166
+ 'value' => array( 'search', 'visible' ),
167
+ 'compare' => 'IN',
168
+ ),
169
+ );
170
+ } else {
171
+ $product_visibility_term_ids = wc_get_product_visibility_term_ids();
172
+ $args['tax_query'][] = array(
173
+ 'taxonomy' => 'product_visibility',
174
+ 'field' => 'term_taxonomy_id',
175
+ 'terms' => $product_visibility_term_ids['exclude-from-search'],
176
+ 'operator' => 'NOT IN',
177
+ );
178
+ }
179
+
180
+ $products = get_posts( $args );
181
+
182
+ if ( ! empty( $products ) ) {
183
+ foreach ( $products as $post ) {
184
+ $product = wc_get_product( $post );
185
+
186
+ $suggestions[] = apply_filters(
187
+ 'yith_wcas_suggestion',
188
+ array(
189
+ 'id' => $product->get_id(),
190
+ 'value' => wp_strip_all_tags( $product->get_title() ),
191
+ 'url' => $product->get_permalink(),
192
+ ),
193
+ $product
194
+ );
195
+ }
196
+ } else {
197
+ $suggestions[] = array(
198
+ 'id' => - 1,
199
+ 'value' => __( 'No results', 'yith-woocommerce-ajax-search' ),
200
+ 'url' => '',
201
+ );
202
+ }
203
+ wp_reset_postdata();
204
+
205
+ if ( 'yes' === $transient_enabled ) {
206
+ set_transient( $transient_name, $suggestions, $transient_duration * HOUR_IN_SECONDS );
207
+ }
208
+ }
209
+
210
+ $time_end = getmicrotime();
211
+ $time = $time_end - $time_start;
212
+ $suggestions = array(
213
+ 'suggestions' => $suggestions,
214
+ 'time' => $time,
215
+ );
216
+ echo wp_json_encode( $suggestions );
217
+ die();
218
+
219
+ }
220
+
221
+
222
+ }
223
+ }
functions.yith-wcas.php CHANGED
@@ -1,17 +1,23 @@
1
- <?php
2
- /**
3
- * Functions
4
- *
5
- * @author YITH
6
- * @package YITH WooCommerce Ajax Search
7
- * @version 1.1.1
8
- */
9
-
10
- if ( ! defined( 'YITH_WCAS' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
- function getmicrotime() {
14
- list( $usec, $sec ) = explode( " ", microtime() );
15
-
16
- return ( (float) $usec + (float) $sec );
17
- }
1
+ <?php
2
+ /**
3
+ * Functions
4
+ *
5
+ * @author YITH
6
+ * @package YITH WooCommerce Ajax Search
7
+ * @version 1.1.1
8
+ */
9
+
10
+ if ( ! defined( 'YITH_WCAS' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+ /**
15
+ * Get microtime.
16
+ *
17
+ * @return float
18
+ */
19
+ function getmicrotime() {
20
+ list( $usec, $sec ) = explode( ' ', microtime() );
21
+
22
+ return ( (float) $usec + (float) $sec );
23
+ }
init.php CHANGED
@@ -1,135 +1,143 @@
1
- <?php
2
- /**
3
- * Plugin Name: YITH WooCommerce Ajax Search
4
- * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
5
- * Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.7.4
7
- * Author: YITH
8
- * Author URI: https://yithemes.com/
9
- * Text Domain: yith-woocommerce-ajax-search
10
- * Domain Path: /languages/
11
- * WC requires at least: 3.0.0
12
- * WC tested up to: 3.9.0
13
- */
14
-
15
-
16
- /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License, version 2, as
20
- published by the Free Software Foundation.
21
-
22
- This program is distributed in the hope that it will be useful,
23
- but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- GNU General Public License for more details.
26
-
27
- You should have received a copy of the GNU General Public License
28
- along with this program; if not, write to the Free Software
29
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
- */
31
- if ( !defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
32
-
33
- if ( ! defined( 'YITH_WCAS_DIR' ) ) {
34
- define( 'YITH_WCAS_DIR', plugin_dir_path( __FILE__ ) );
35
- }
36
-
37
- /* Plugin Framework Version Check */
38
- if( ! function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YITH_WCAS_DIR . 'plugin-fw/init.php' ) ) {
39
- require_once( YITH_WCAS_DIR . 'plugin-fw/init.php' );
40
- }
41
- yit_maybe_plugin_fw_loader( YITH_WCAS_DIR );
42
-
43
-
44
- if ( defined( 'YITH_WCAS_PREMIUM' ) ) {
45
- function yith_wcas_install_free_admin_notice() {
46
- ?>
47
- <div class="error">
48
- <p><?php _e( 'You can\'t activate the free version of YITH WooCommerce Ajax Search while you are using the premium one.', 'yith-woocommerce-ajax-search' ); ?></p>
49
- </div>
50
- <?php
51
- }
52
-
53
- add_action( 'admin_notices', 'yith_wcas_install_free_admin_notice' );
54
-
55
- deactivate_plugins( plugin_basename( __FILE__ ) );
56
- return;
57
- }
58
-
59
- if ( !function_exists( 'yith_plugin_registration_hook' ) ) {
60
- require_once 'plugin-fw/yit-plugin-registration-hook.php';
61
- }
62
-
63
- register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
64
-
65
-
66
-
67
- if ( defined( 'YITH_WCAS_VERSION' ) ){
68
- return;
69
- }else{
70
- define( 'YITH_WCAS_VERSION', '1.7.4' );
71
- }
72
-
73
- if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
74
- define( 'YITH_WCAS_FREE_INIT', plugin_basename( __FILE__ ) );
75
- }
76
-
77
- if ( ! defined( 'YITH_WCAS' ) ) {
78
- define( 'YITH_WCAS', true );
79
- }
80
-
81
- if ( ! defined( 'YITH_WCAS_FILE' ) ) {
82
- define( 'YITH_WCAS_FILE', __FILE__ );
83
- }
84
-
85
- if ( ! defined( 'YITH_WCAS_URL' ) ) {
86
- define( 'YITH_WCAS_URL', plugin_dir_url( __FILE__ ) );
87
- }
88
-
89
-
90
-
91
- if ( ! defined( 'YITH_WCAS_TEMPLATE_PATH' ) ) {
92
- define( 'YITH_WCAS_TEMPLATE_PATH', YITH_WCAS_DIR . 'templates' );
93
- }
94
-
95
- if ( ! defined( 'YITH_WCAS_ASSETS_URL' ) ) {
96
- define( 'YITH_WCAS_ASSETS_URL', YITH_WCAS_URL . 'assets' );
97
- }
98
-
99
- if ( ! defined( 'YITH_WCAS_ASSETS_IMAGES_URL' ) ) {
100
- define( 'YITH_WCAS_ASSETS_IMAGES_URL', YITH_WCAS_ASSETS_URL . '/images/' );
101
- }
102
-
103
- if ( ! defined( 'YITH_WCAS_SLUG' ) ) {
104
- define( 'YITH_WCAS_SLUG', 'yith-woocommerce-ajax-search' );
105
- }
106
- function yith_ajax_search_constructor() {
107
-
108
- if ( !function_exists( 'WC' ) ) {
109
- function yith_wcas_install_woocommerce_admin_notice() {
110
- ?>
111
- <div class="error">
112
- <p><?php _e( 'YITH WooCommerce Ajax Search is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-ajax-search' ); ?></p>
113
- </div>
114
- <?php
115
- }
116
-
117
- add_action( 'admin_notices', 'yith_wcas_install_woocommerce_admin_notice' );
118
- return;
119
- }
120
-
121
-
122
- load_plugin_textdomain( 'yith-woocommerce-ajax-search', false, dirname( plugin_basename( __FILE__ ) ). '/languages/' );
123
-
124
- // Load required classes and functions
125
- require_once('functions.yith-wcas.php');
126
- require_once('class.yith-wcas-admin.php');
127
- require_once('class.yith-wcas-frontend.php');
128
- require_once('widgets/class.yith-wcas-ajax-search.php');
129
- require_once('class.yith-wcas.php');
130
-
131
- // Let's start the game!
132
- global $yith_wcas;
133
- $yith_wcas = new YITH_WCAS();
134
- }
135
add_action( 'plugins_loaded', 'yith_ajax_search_constructor' );
1
+ <?php
2
+ /**
3
+ * Plugin Name: YITH WooCommerce Ajax Search
4
+ * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
5
+ * Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.7.5
7
+ * Author: YITH
8
+ * Author URI: https://yithemes.com/
9
+ * Text Domain: yith-woocommerce-ajax-search
10
+ * Domain Path: /languages/
11
+ * WC requires at least: 3.0.0
12
+ * WC tested up to: 4.0.0
13
+ */
14
+
15
+ /*
16
+ Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License, version 2, as
20
+ published by the Free Software Foundation.
21
+
22
+ This program is distributed in the hope that it will be useful,
23
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
24
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
+ GNU General Public License for more details.
26
+
27
+ You should have received a copy of the GNU General Public License
28
+ along with this program; if not, write to the Free Software
29
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
+ */
31
+ if ( ! defined( 'ABSPATH' ) ) {
32
+ exit; } // Exit if accessed directly
33
+
34
+ if ( ! defined( 'YITH_WCAS_DIR' ) ) {
35
+ define( 'YITH_WCAS_DIR', plugin_dir_path( __FILE__ ) );
36
+ }
37
+
38
+ /* Plugin Framework Version Check */
39
+ if ( ! function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YITH_WCAS_DIR . 'plugin-fw/init.php' ) ) {
40
+ require_once YITH_WCAS_DIR . 'plugin-fw/init.php';
41
+ }
42
+ yit_maybe_plugin_fw_loader( YITH_WCAS_DIR );
43
+
44
+
45
+ if ( defined( 'YITH_WCAS_PREMIUM' ) ) {
46
+ /**
47
+ * Trigger a notice if the premium version is active.
48
+ */
49
+ function yith_wcas_install_free_admin_notice() {
50
+ ?>
51
+ <div class="error">
52
+ <p><?php esc_html_e( 'You can\'t activate the free version of YITH WooCommerce Ajax Search while you are using the premium one.', 'yith-woocommerce-ajax-search' ); ?></p>
53
+ </div>
54
+ <?php
55
+ }
56
+
57
+ add_action( 'admin_notices', 'yith_wcas_install_free_admin_notice' );
58
+
59
+ deactivate_plugins( plugin_basename( __FILE__ ) );
60
+ return;
61
+ }
62
+
63
+ if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
64
+ require_once 'plugin-fw/yit-plugin-registration-hook.php';
65
+ }
66
+
67
+ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
68
+
69
+
70
+
71
+ if ( defined( 'YITH_WCAS_VERSION' ) ) {
72
+ return;
73
+ } else {
74
+ define( 'YITH_WCAS_VERSION', '1.7.5' );
75
+ }
76
+
77
+ if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
78
+ define( 'YITH_WCAS_FREE_INIT', plugin_basename( __FILE__ ) );
79
+ }
80
+
81
+ if ( ! defined( 'YITH_WCAS' ) ) {
82
+ define( 'YITH_WCAS', true );
83
+ }
84
+
85
+ if ( ! defined( 'YITH_WCAS_FILE' ) ) {
86
+ define( 'YITH_WCAS_FILE', __FILE__ );
87
+ }
88
+
89
+ if ( ! defined( 'YITH_WCAS_URL' ) ) {
90
+ define( 'YITH_WCAS_URL', plugin_dir_url( __FILE__ ) );
91
+ }
92
+
93
+ if ( ! defined( 'YITH_WCAS_TEMPLATE_PATH' ) ) {
94
+ define( 'YITH_WCAS_TEMPLATE_PATH', YITH_WCAS_DIR . 'templates' );
95
+ }
96
+
97
+ if ( ! defined( 'YITH_WCAS_ASSETS_URL' ) ) {
98
+ define( 'YITH_WCAS_ASSETS_URL', YITH_WCAS_URL . 'assets' );
99
+ }
100
+
101
+ if ( ! defined( 'YITH_WCAS_ASSETS_IMAGES_URL' ) ) {
102
+ define( 'YITH_WCAS_ASSETS_IMAGES_URL', YITH_WCAS_ASSETS_URL . '/images/' );
103
+ }
104
+
105
+ if ( ! defined( 'YITH_WCAS_SLUG' ) ) {
106
+ define( 'YITH_WCAS_SLUG', 'yith-woocommerce-ajax-search' );
107
+ }
108
+
109
+ /**
110
+ * Start plugin.
111
+ */
112
+ function yith_ajax_search_constructor() {
113
+
114
+ if ( ! function_exists( 'WC' ) ) {
115
+ /**
116
+ * Check if WooCommerce is installed.
117
+ */
118
+ function yith_wcas_install_woocommerce_admin_notice() {
119
+ ?>
120
+ <div class="error">
121
+ <p><?php esc_html_e( 'YITH WooCommerce Ajax Search is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-ajax-search' ); ?></p>
122
+ </div>
123
+ <?php
124
+ }
125
+
126
+ add_action( 'admin_notices', 'yith_wcas_install_woocommerce_admin_notice' );
127
+ return;
128
+ }
129
+
130
+ load_plugin_textdomain( 'yith-woocommerce-ajax-search', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
131
+
132
+ // Load required classes and functions.
133
+ require_once 'functions.yith-wcas.php';
134
+ require_once 'class.yith-wcas-admin.php';
135
+ require_once 'class.yith-wcas-frontend.php';
136
+ require_once 'widgets/class.yith-wcas-ajax-search.php';
137
+ require_once 'class.yith-wcas.php';
138
+
139
+ // Let's start the game!
140
+ global $yith_wcas;
141
+ $yith_wcas = new YITH_WCAS();
142
+ }
143
add_action( 'plugins_loaded', 'yith_ajax_search_constructor' );
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -73,7 +73,7 @@
73
}
74
75
.wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
76
- border-color: #7e8993;
77
}
78
79
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
@@ -442,12 +442,12 @@ ul.yit-icons-manager-list li.active {
442
WordPress 5.3 with old panel fixes
443
****************/
444
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
445
- height: auto;
446
- line-height: 1;
447
}
448
449
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow{
450
- height: 100%;
451
}
452
453
/****************
@@ -455,11 +455,11 @@ YITH UI
455
****************/
456
@font-face {
457
font-family : 'yith-icon';
458
- src : url('../fonts/yith-icon.eot?7ik896');
459
- src : url('../fonts/yith-icon.eot?7ik896#iefix') format('embedded-opentype'),
460
- url('../fonts/yith-icon.ttf?7ik896') format('truetype'),
461
- url('../fonts/yith-icon.woff?7ik896') format('woff'),
462
- url('../fonts/yith-icon.svg?7ik896#yith-icon') format('svg');
463
font-weight : normal;
464
font-style : normal;
465
}
@@ -479,164 +479,158 @@ YITH UI
479
-moz-osx-font-smoothing : grayscale;
480
}
481
482
- .yith-icon-reply:before {
483
- content: "\e91a";
484
color: #757575;
485
}
486
.yith-icon-calendar_add:before {
487
- content : "\e913";
488
- color : #757575;
489
}
490
-
491
.yith-icon-calendar_money:before {
492
- content : "\e914";
493
- color : #757575;
494
}
495
-
496
.yith-icon-calendar2:before {
497
- content : "\e915";
498
- color : #757575;
499
}
500
-
501
.yith-icon-people:before {
502
- content : "\e916";
503
- color : #757575;
504
}
505
-
506
.yith-icon-shield_money:before {
507
- content : "\e917";
508
- color : #757575;
509
}
510
-
511
.yith-icon-time_check:before {
512
- content : "\e918";
513
- color : #757575;
514
}
515
-
516
.yith-icon-world_settings:before {
517
- content : "\e919";
518
- color : #757575;
519
}
520
-
521
.yith-icon-arrow_eye_closed:before {
522
- content : "\e912";
523
- color : #757575;
524
}
525
-
526
.yith-icon-arrow_eye:before {
527
- content : "\e911";
528
- color : #757575;
529
}
530
-
531
.yith-icon-reset:before {
532
- content : "\e910";
533
- color : #757575;
534
}
535
-
536
.yith-icon-drag:before {
537
- content : "\e90f";
538
- color : #757575;
539
}
540
-
541
.yith-icon-trash:before {
542
- content : "\e90d";
543
- color : #757575;
544
}
545
-
546
.yith-icon-info:before {
547
- content : "\e90e";
548
- color : #757575;
549
}
550
-
551
.yith-icon-arrow_down:before {
552
- content : "\e900";
553
- color : #757575;
554
}
555
-
556
.yith-icon-arrow_left:before {
557
- content : "\e901";
558
- color : #757575;
559
}
560
-
561
.yith-icon-arrow_right:before {
562
- content : "\e902";
563
- color : #757575;
564
}
565
-
566
.yith-icon-arrow_up:before {
567
- content : "\e903";
568
- color : #757575;
569
}
570
-
571
.yith-icon-calendar:before {
572
- content : "\e904";
573
- color : #757575;
574
}
575
-
576
.yith-icon-check:before {
577
- content : "\e905";
578
- color : #757575;
579
}
580
-
581
.yith-icon-close:before {
582
- content : "\e906";
583
- color : #757575;
584
}
585
-
586
.yith-icon-edit:before {
587
- content : "\e907";
588
- color : #757575;
589
}
590
-
591
.yith-icon-magnifier:before {
592
- content : "\e908";
593
- color : #757575;
594
}
595
-
596
.yith-icon-pencil:before {
597
- content : "\e909";
598
- color : #757575;
599
}
600
-
601
.yith-icon-plus:before {
602
- content : "\e90a";
603
- color : #757575;
604
}
605
-
606
.yith-icon-update:before {
607
- content : "\e90b";
608
- color : #757575;
609
}
610
-
611
.yith-icon-upload:before {
612
- content : "\e90c";
613
- color : #757575;
614
}
615
616
.yith-plugin-fw-banner {
617
width : 100%;
618
- height : 75px;
619
background : url('../images/banner-premium.png');
620
- }
621
-
622
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
623
- height : 290px;
624
- background : url('../images/banner-free.png') no-repeat;
625
- }
626
-
627
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free h1 {
628
- max-width : auto;
629
- text-align : left;
630
- padding-left : 100px;
631
- padding-top : 15px;
632
- padding-bottom : 8px;
633
}
634
635
.yith-plugin-fw-banner h1 {
636
text-transform : uppercase;
637
color : #0c5777;
638
font-size : 15px;
639
- padding-left : 150px;
640
font-weight : 700;
641
text-align : left;
642
display : inline-block;
@@ -659,16 +653,19 @@ YITH UI
659
box-shadow : none;
660
}
661
662
- .yith-banners ul {
663
- list-style : none;
664
- margin-left : 10px;
665
}
666
667
- .yith-banners ul li {
668
- display : inline-block;
669
- margin-left : 10px;
670
}
671
672
.yith-plugin-ui a {
673
outline : none;
674
box-shadow : none;
@@ -803,7 +800,7 @@ YITH UI
803
background : #f1f1f1;
804
font-size : 14px;
805
font-weight : 700;
806
- width : 40%;
807
display : block;
808
padding : 15px;
809
margin-bottom : 0;
@@ -866,11 +863,11 @@ YITH UI
866
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
867
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
868
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
869
- border: 0;
870
- height: 30px;
871
- max-width: 121px;
872
- font-size: 11px;
873
- padding: 0;
874
}
875
876
.yith-plugin-ui .search-box input[name="s"] {
@@ -1123,9 +1120,19 @@ YITH UI
1123
outline : none;
1124
}
1125
1126
- .yith-plugin-ui .select2-selection--single {
1127
- margin : 0;
1128
- border : 0;
1129
}
1130
1131
/* old panel*/
@@ -1398,7 +1405,7 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1398
}
1399
1400
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
1401
- content : 'OFF';
1402
width : 14px;
1403
height : 14px;
1404
font-size : 13px;
@@ -1424,7 +1431,7 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1424
1425
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1426
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
1427
- content : 'ON';
1428
color : #98aa36;
1429
width : 14px;
1430
height : 14px;
@@ -1745,6 +1752,11 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1745
top : 37px;
1746
border-radius : 50%;
1747
box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
1748
}
1749
1750
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
@@ -2103,6 +2115,14 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2103
min-width: auto !important;
2104
}
2105
2106
@media screen and (max-width : 1440px) {
2107
.yith-plugin-ui .yith-add-box,
2108
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
@@ -2138,25 +2158,13 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2138
}
2139
2140
@media screen and (max-width : 782px) {
2141
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
2142
- height : auto;
2143
- background-color : #a9c7d3;
2144
- }
2145
-
2146
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free ul {
2147
- width : 90%;
2148
- text-align : center;
2149
- }
2150
-
2151
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free li img {
2152
- width : 90%;
2153
- margin : 0 auto;
2154
- }
2155
-
2156
.yith-plugin-fw-banner h1 {
2157
line-height : 1.2em;
2158
}
2159
-
2160
.yith-plugin-ui .yith-add-box,
2161
.yith-plugin-ui .yith-toggle-row {
2162
width : 100%;
73
}
74
75
.wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
76
+ border-color: #7e8993;
77
}
78
79
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
442
WordPress 5.3 with old panel fixes
443
****************/
444
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
445
+ height: auto;
446
+ line-height: 1;
447
}
448
449
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow{
450
+ height: 100%;
451
}
452
453
/****************
455
****************/
456
@font-face {
457
font-family : 'yith-icon';
458
+ src : url('../fonts/yith-icon.eot?g6bfgy');
459
+ src : url('../fonts/yith-icon.eot?g6bfgy#iefix') format('embedded-opentype'),
460
+ url('../fonts/yith-icon.ttf?g6bfgy') format('truetype'),
461
+ url('../fonts/yith-icon.woff?g6bfgy') format('woff'),
462
+ url('../fonts/yith-icon.svg?g6bfgy#yith-icon') format('svg');
463
font-weight : normal;
464
font-style : normal;
465
}
479
-moz-osx-font-smoothing : grayscale;
480
}
481
482
+ .yith-icon-paypal-svgrepo-com:before {
483
+ content: "\e91b";
484
+ }
485
+ .yith-icon-check-circle:before {
486
+ content: "\e921";
487
+ color: #757575;
488
+ }
489
+ .yith-icon-info-squared:before {
490
+ content: "\e922";
491
color: #757575;
492
}
493
+ .yith-icon-warning-triangle:before {
494
+ content: "\e923";
495
+ color: #757575;
496
+ }
497
+ .yith-icon-bank:before {
498
+ content: "\e91c";
499
+ }
500
+ .yith-icon-accounting:before {
501
+ content: "\e91d";
502
+ }
503
+ .yith-icon-bank-check:before {
504
+ content: "\e91e";
505
+ }
506
+ .yith-icon-cash:before {
507
+ content: "\e91f";
508
+ }
509
+ .yith-icon-credit-card:before {
510
+ content: "\e920";
511
+ }
512
.yith-icon-calendar_add:before {
513
+ content: "\e913";
514
+ color: #757575;
515
}
516
.yith-icon-calendar_money:before {
517
+ content: "\e914";
518
+ color: #757575;
519
}
520
.yith-icon-calendar2:before {
521
+ content: "\e915";
522
+ color: #757575;
523
}
524
.yith-icon-people:before {
525
+ content: "\e916";
526
+ color: #757575;
527
}
528
.yith-icon-shield_money:before {
529
+ content: "\e917";
530
+ color: #757575;
531
}
532
.yith-icon-time_check:before {
533
+ content: "\e918";
534
+ color: #757575;
535
}
536
.yith-icon-world_settings:before {
537
+ content: "\e919";
538
+ color: #757575;
539
}
540
.yith-icon-arrow_eye_closed:before {
541
+ content: "\e912";
542
+ color: #757575;
543
}
544
.yith-icon-arrow_eye:before {
545
+ content: "\e911";
546
+ color: #757575;
547
}
548
.yith-icon-reset:before {
549
+ content: "\e910";
550
+ color: #757575;
551
}
552
.yith-icon-drag:before {
553
+ content: "\e90f";
554
+ color: #757575;
555
}
556
.yith-icon-trash:before {
557
+ content: "\e90d";
558
+ color: #757575;
559
}
560
.yith-icon-info:before {
561
+ content: "\e90e";
562
+ color: #757575;
563
}
564
.yith-icon-arrow_down:before {
565
+ content: "\e900";
566
+ color: #757575;
567
}
568
.yith-icon-arrow_left:before {
569
+ content: "\e901";
570
+ color: #757575;
571
}
572
.yith-icon-arrow_right:before {
573
+ content: "\e902";
574
+ color: #757575;
575
}
576
.yith-icon-arrow_up:before {
577
+ content: "\e903";
578
+ color: #757575;
579
}
580
.yith-icon-calendar:before {
581
+ content: "\e904";
582
+ color: #757575;
583
}
584
.yith-icon-check:before {
585
+ content: "\e905";
586
+ color: #757575;
587
}
588
.yith-icon-close:before {
589
+ content: "\e906";
590
+ color: #757575;
591
}
592
.yith-icon-edit:before {
593
+ content: "\e907";
594
+ color: #757575;
595
}
596
.yith-icon-magnifier:before {
597
+ content: "\e908";
598
+ color: #757575;
599
}
600
.yith-icon-pencil:before {
601
+ content: "\e909";
602
+ color: #757575;
603
}
604
.yith-icon-plus:before {
605
+ content: "\e90a";
606
+ color: #757575;
607
}
608
.yith-icon-update:before {
609
+ content: "\e90b";
610
+ color: #757575;
611
}
612
.yith-icon-upload:before {
613
+ content: "\e90c";
614
+ color: #757575;
615
+ }
616
+ .yith-icon-reply:before {
617
+ content: "\e91a";
618
}
619
620
.yith-plugin-fw-banner {
621
width : 100%;
622
+ height: 45px;
623
background : url('../images/banner-premium.png');
624
+ display: flex;
625
+ align-items: center;
626
+ padding-right: -23px;
627
}
628
629
.yith-plugin-fw-banner h1 {
630
text-transform : uppercase;
631
color : #0c5777;
632
font-size : 15px;
633
+ padding: 0 0 0 110px;
634
font-weight : 700;
635
text-align : left;
636
display : inline-block;
653
box-shadow : none;
654
}
655
656
+ .yith-plugin-fw-rate{
657
+ margin: 20px 0;
658
}
659
660
+ .yith-plugin-fw-rate .dashicons-star-filled{
661
+ font-size: 12px;
662
+ margin: 4px -4px;
663
+ color: #0c5777;
664
}
665
666
+ .yith-plugin-fw-rate a{
667
+ text-decoration: none;
668
+ }
669
.yith-plugin-ui a {
670
outline : none;
671
box-shadow : none;
800
background : #f1f1f1;
801
font-size : 14px;
802
font-weight : 700;
803
+ width : 50%;
804
display : block;
805
padding : 15px;
806
margin-bottom : 0;
863
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
864
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
865
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
866
+ border: 0;
867
+ height: 30px;
868
+ max-width: 121px;
869
+ font-size: 11px;
870
+ padding: 0;
871
}
872
873
.yith-plugin-ui .search-box input[name="s"] {
1120
outline : none;
1121
}
1122
1123
+ .yith-plugin-ui .select2-container .select2-selection--single,
1124
+ .yith-plugin-ui .select2-container .select2-selection--multiple,
1125
+ .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
1126
+ .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
1127
+ .yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
1128
+ .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple{
1129
+ margin : 0;
1130
+ border : 0;
1131
+ box-shadow : none;
1132
+ }
1133
+
1134
+ .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow{
1135
+ background: none;
1136
}
1137
1138
/* old panel*/
1405
}
1406
1407
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
1408
+ content : attr(data-text-off);
1409
width : 14px;
1410
height : 14px;
1411
font-size : 13px;
1431
1432
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1433
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
1434
+ content : attr(data-text-on);
1435
color : #98aa36;
1436
width : 14px;
1437
height : 14px;
1752
top : 37px;
1753
border-radius : 50%;
1754
box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
1755
+ cursor : grab;
1756
+ }
1757
+
1758
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after{
1759
+ cursor : grabbing;
1760
}
1761
1762
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
2115
min-width: auto !important;
2116
}
2117
2118
+ /** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
2119
+ .branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow{
2120
+ background:none;
2121
+ }
2122
+ .branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single{
2123
+ box-shadow: none;
2124
+ }
2125
+
2126
@media screen and (max-width : 1440px) {
2127
.yith-plugin-ui .yith-add-box,
2128
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
2158
}
2159
2160
@media screen and (max-width : 782px) {
2161
.yith-plugin-fw-banner h1 {
2162
line-height : 1.2em;
2163
}
2164
+ .yith-plugin-fw-banner h1{
2165
+ font-size: 12px;
2166
+ padding-right: 10px;
2167
+ }
2168
.yith-plugin-ui .yith-add-box,
2169
.yith-plugin-ui .yith-toggle-row {
2170
width : 100%;
plugin-fw/assets/fonts/yith-icon.eot CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.svg CHANGED
@@ -34,4 +34,13 @@
34
<glyph unicode="&#xe918;" glyph-name="time_check" d="M86.528 448.341c-0.341-235.008 189.952-425.643 424.96-425.984s425.643 189.952 425.984 424.96c0.171 83.968-24.576 166.059-71.168 236.032l-60.075-63.488c22.528-39.765 37.035-83.627 42.325-129.195h-80.384v-84.651h80.384c-19.627-154.795-141.483-276.651-296.277-296.277v84.651h-84.651v-84.651c-154.795 19.456-276.821 141.483-296.277 296.277h84.651v84.651h-84.651c18.432 155.307 140.971 277.845 296.277 296.277v-82.603h84.651v81.749c46.251-5.803 90.795-21.163 130.731-44.885l61.44 61.44c-68.779 46.080-149.675 70.827-232.448 71.168-234.837-0.341-425.301-190.635-425.472-425.472zM414.549 605.355l-59.563-59.733 157.013-157.013 410.624 410.965-59.733 59.733-350.891-350.891z" />
35
<glyph unicode="&#xe919;" glyph-name="world_settings" d="M833.707 597.333l48.981 81.92-139.435 139.435-81.92-48.981c-8.875 4.267-18.091 7.851-27.648 11.435l-23.040 92.672h-98.645c-235.179-0.171-425.643-190.635-425.643-425.813s190.464-425.643 425.643-425.643h98.645l23.040 92.672c9.557 3.584 18.773 7.168 27.648 11.435l81.92-48.981 139.435 139.435-48.981 81.92c3.925 8.875 7.851 18.091 11.435 27.648l92.672 23.040v197.12l-92.672 23.040c-3.584 9.557-7.168 20.139-11.435 27.648zM319.659 448c0.171 35.669 3.243 71.339 9.216 106.496h147.627v-212.821h-147.627c-5.973 34.987-9.045 70.656-9.216 106.325zM476.501 795.989v-170.667h-129.877c28.16 86.699 75.264 150.869 129.877 170.667zM476.501 270.677v-171.008c-54.613 19.797-101.888 84.139-129.877 171.008h129.877zM547.499 547.669c55.125-20.309 83.456-81.579 63.147-136.704-10.752-29.184-33.792-52.224-63.147-63.147v199.851zM323.925 748.203c-22.869-38.4-40.277-79.701-51.712-122.709h-67.072c29.013 49.835 69.803 91.989 118.784 122.709zM173.568 554.496h83.797c-11.435-70.485-11.435-142.336 0-212.821h-83.797c-21.845 69.12-21.845 143.531 0 212.821zM205.141 270.677h67.072c11.435-43.179 29.013-84.651 51.712-123.051-48.981 30.72-89.771 73.045-118.784 123.051zM866.816 404.651l-77.312-19.456-5.632-19.115c-5.632-18.091-12.8-35.669-21.675-52.565l-9.557-17.749 40.789-68.096-61.099-61.44-68.437 41.301-17.749-9.557c-16.725-8.875-34.133-16.043-52.224-21.675l-19.456-5.632-19.115-77.312h-7.851v180.907c96.085 19.456 158.037 113.152 138.581 209.067-14.165 69.803-68.779 124.416-138.581 138.581v180.907h7.851l19.115-77.312 19.456-5.632c18.091-5.973 35.669-13.824 52.224-23.381l17.749-9.557 68.437 40.789 61.099-61.099-40.96-66.731 9.557-17.749c8.875-16.555 16.213-34.133 21.675-52.224l5.632-19.456 77.312-19.115 0.171-86.699z" />
36
<glyph unicode="&#xe91a;" glyph-name="reply" d="M426 554.667q208-30 321-159t149-311q-154 218-470 218v-174l-298 298 298 298v-170z" />
37
</font></defs></svg>
34
<glyph unicode="&#xe918;" glyph-name="time_check" d="M86.528 448.341c-0.341-235.008 189.952-425.643 424.96-425.984s425.643 189.952 425.984 424.96c0.171 83.968-24.576 166.059-71.168 236.032l-60.075-63.488c22.528-39.765 37.035-83.627 42.325-129.195h-80.384v-84.651h80.384c-19.627-154.795-141.483-276.651-296.277-296.277v84.651h-84.651v-84.651c-154.795 19.456-276.821 141.483-296.277 296.277h84.651v84.651h-84.651c18.432 155.307 140.971 277.845 296.277 296.277v-82.603h84.651v81.749c46.251-5.803 90.795-21.163 130.731-44.885l61.44 61.44c-68.779 46.080-149.675 70.827-232.448 71.168-234.837-0.341-425.301-190.635-425.472-425.472zM414.549 605.355l-59.563-59.733 157.013-157.013 410.624 410.965-59.733 59.733-350.891-350.891z" />
35
<glyph unicode="&#xe919;" glyph-name="world_settings" d="M833.707 597.333l48.981 81.92-139.435 139.435-81.92-48.981c-8.875 4.267-18.091 7.851-27.648 11.435l-23.040 92.672h-98.645c-235.179-0.171-425.643-190.635-425.643-425.813s190.464-425.643 425.643-425.643h98.645l23.040 92.672c9.557 3.584 18.773 7.168 27.648 11.435l81.92-48.981 139.435 139.435-48.981 81.92c3.925 8.875 7.851 18.091 11.435 27.648l92.672 23.040v197.12l-92.672 23.040c-3.584 9.557-7.168 20.139-11.435 27.648zM319.659 448c0.171 35.669 3.243 71.339 9.216 106.496h147.627v-212.821h-147.627c-5.973 34.987-9.045 70.656-9.216 106.325zM476.501 795.989v-170.667h-129.877c28.16 86.699 75.264 150.869 129.877 170.667zM476.501 270.677v-171.008c-54.613 19.797-101.888 84.139-129.877 171.008h129.877zM547.499 547.669c55.125-20.309 83.456-81.579 63.147-136.704-10.752-29.184-33.792-52.224-63.147-63.147v199.851zM323.925 748.203c-22.869-38.4-40.277-79.701-51.712-122.709h-67.072c29.013 49.835 69.803 91.989 118.784 122.709zM173.568 554.496h83.797c-11.435-70.485-11.435-142.336 0-212.821h-83.797c-21.845 69.12-21.845 143.531 0 212.821zM205.141 270.677h67.072c11.435-43.179 29.013-84.651 51.712-123.051-48.981 30.72-89.771 73.045-118.784 123.051zM866.816 404.651l-77.312-19.456-5.632-19.115c-5.632-18.091-12.8-35.669-21.675-52.565l-9.557-17.749 40.789-68.096-61.099-61.44-68.437 41.301-17.749-9.557c-16.725-8.875-34.133-16.043-52.224-21.675l-19.456-5.632-19.115-77.312h-7.851v180.907c96.085 19.456 158.037 113.152 138.581 209.067-14.165 69.803-68.779 124.416-138.581 138.581v180.907h7.851l19.115-77.312 19.456-5.632c18.091-5.973 35.669-13.824 52.224-23.381l17.749-9.557 68.437 40.789 61.099-61.099-40.96-66.731 9.557-17.749c8.875-16.555 16.213-34.133 21.675-52.224l5.632-19.456 77.312-19.115 0.171-86.699z" />
36
<glyph unicode="&#xe91a;" glyph-name="reply" d="M426 554.667q208-30 321-159t149-311q-154 218-470 218v-174l-298 298 298 298v-170z" />
37
+ <glyph unicode="&#xe91b;" glyph-name="paypal-svgrepo-com" d="M948.695 781.407c41.592-76.275 27.867-166.22 11.486-219.376-88.641-289.544-488.607-273.795-546.47-273.795-57.795 0-71.254-53.893-71.254-53.893l-43.213-188.526c-11.779-66.175-71.793-62.877-71.793-62.877s-78.009 0-130.188 0c-3.273 0-6.328 0.225-9.134 0.631-0.645-12.117 1.079-47.541 44.401-47.541 52.139 0 130.147 0 130.147 0s60.013-3.366 71.834 62.806l43.165 188.519c0 0 13.507 53.897 71.301 53.897 57.767 0 457.829-15.746 546.514 273.808 19.787 64.717 35.874 183.635-46.797 266.347zM259.046 86.911l43.206 188.533c0 0 13.421 53.801 71.301 53.801 57.747 0 457.781-15.664 546.429 273.819 32.437 105.838 54.958 356.92-348.956 356.92h-291.749c0 0-60.641 2.816-75.606-61.659l-190.628-822.715c0 0-8.185-51.555 43.974-51.555 52.207 0 130.233 0 130.233 0s60.013-3.393 71.796 62.857zM369 565.482l38.741 167.179c0 0 12.339 45.462 52.207 52.193 39.827 6.755 107.667-1.201 125.12-4.495 113.299-21.279 89.201-128.478 89.201-128.478-22.433-165.476-280.007-142.514-280.007-142.514-40.383 14.602-25.262 56.115-25.262 56.115z" />
38
+ <glyph unicode="&#xe91c;" glyph-name="bank" d="M511.488 599.723c-8.875 0-16.213 7.168-16.213 16.213 0 4.608-3.755 8.363-8.363 8.363s-8.363-3.755-8.363-8.363c0-15.189 10.411-27.989 24.576-31.744v-6.315c0-4.608 3.755-8.363 8.363-8.363s8.363 3.755 8.363 8.363v6.315c14.165 3.755 24.576 16.384 24.576 31.744 0 18.091-14.848 32.939-32.939 32.939-8.875 0-16.213 7.168-16.213 16.213 0 8.875 7.168 16.213 16.213 16.213 8.533 0 15.531-6.656 16.213-15.019 0.341-4.608 4.437-8.021 8.875-7.851 4.608 0.341 8.192 4.267 7.851 8.875-1.024 14.336-11.093 25.941-24.576 29.525v6.315c0 4.608-3.755 8.363-8.363 8.363s-8.363-3.755-8.363-8.363v-6.315c-13.995-3.755-24.576-16.555-24.576-31.744 0-18.091 14.848-32.939 32.939-32.939 8.875 0 16.213-7.168 16.213-16.213s-7.339-16.213-16.213-16.213zM862.72 508.587c0 0.512-0.171 1.195-0.341 1.707s-0.171 1.024-0.341 1.365c-0.171 0.512-0.512 0.853-0.853 1.195-0.341 0.512-0.683 1.024-1.024 1.365-0.171 0.171-0.171 0.171-0.171 0.341l-342.699 283.648c-3.072 2.56-7.68 2.56-10.752 0l-342.187-283.477c-0.171-0.171-0.171-0.171-0.171-0.341-0.512-0.341-0.683-0.853-1.024-1.365-0.341-0.341-0.683-0.853-0.853-1.195-0.171-0.512-0.341-1.024-0.341-1.365-0.171-0.512-0.341-1.195-0.341-1.707 0-0.171 0-0.171 0-0.341v-66.56c0-4.608 3.755-8.363 8.363-8.363h85.504v-258.048h-85.845c-4.608 0-8.363-3.755-8.363-8.363v-55.467c0-1.365 0.341-2.56 0.853-3.584-0.512-1.024-0.853-2.219-0.853-3.584 0-4.608 3.755-8.363 8.363-8.363h678.571c4.608 0 8.363 3.755 8.363 8.363v62.635c0 4.608-3.755 8.363-8.363 8.363h-79.872v257.877h86.016c4.608 0 8.363 3.755 8.363 8.363v66.56c0 0.171 0 0.171 0 0.341zM178.005 450.048v49.835h667.989v-49.835h-667.989zM839.851 158.549v-45.909h-661.845v45.909h661.845zM482.816 175.275v258.048h62.123v-258.048h-62.123zM512 780.971l319.147-264.363h-638.293l319.147 264.363zM271.872 433.323h194.048v-258.048h-115.029v228.352c0 4.608-3.755 8.363-8.363 8.363s-8.363-3.755-8.363-8.363v-228.352h-62.123v258.048zM751.616 175.275h-189.952v258.048h110.933v-227.499c0-4.608 3.755-8.363 8.363-8.363s8.363 3.755 8.363 8.363v227.499h62.123v-258.048z" />
39
+ <glyph unicode="&#xe91d;" glyph-name="accounting" d="M862.72 432.128c0 0.512-0.171 1.024-0.341 1.536s-0.171 0.853-0.512 1.365c-0.171 0.341-0.512 0.853-0.853 1.195s-0.683 0.853-1.024 1.195c-0.171 0.171-0.171 0.171-0.341 0.341l-30.891 23.893c-2.56 2.048-6.315 2.219-9.045 0.341l-31.061-21.163-33.792 21.163c0 0 0 0 0 0h-0.171c-0.171 0.171-0.512 0.171-0.853 0.341-0.683 0.341-1.195 0.683-2.048 0.683-0.512 0-1.024 0-1.365 0-0.512 0-1.024 0-1.536 0-0.683-0.171-1.365-0.512-1.877-0.853-0.171-0.171-0.512-0.171-0.683-0.341v0c0 0 0 0 0 0l-5.973-4.096-29.184-19.797c-3.413-2.389-4.437-7.168-2.048-10.581 1.536-2.219 3.925-3.413 6.315-3.413 1.536 0 2.901 0.512 4.267 1.365l31.232 21.163 33.963-21.333c2.56-1.707 5.803-1.536 8.363 0.171l30.549 20.821 23.552-18.261v-152.747c0-43.861-35.669-79.701-79.701-79.701-43.861 0-79.701 35.669-79.701 79.701v407.723c0 47.957-35.84 87.723-82.261 94.037-1.024 0.512-2.219 1.024-3.584 1.024h-297.813c-52.395 0-94.891-42.667-94.891-94.891v-27.819h-13.995c-18.773 0-33.963-15.189-33.963-33.963v-468.821c0-18.773 15.189-33.963 33.963-33.963h341.504c18.773 0 33.963 15.189 33.963 33.963v468.651c0 18.773-15.189 33.963-33.963 33.963h-13.995v27.819c0 42.325 33.28 76.971 75.093 79.36 41.813-2.389 75.093-37.035 75.093-79.36v-407.723c0-33.28 17.408-62.635 43.52-79.701h-114.517c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h166.059c52.395 0 94.891 42.667 94.891 94.891v156.501c-0.341 0.341-0.341 0.512-0.341 0.683zM507.563 682.837v-81.749c0-4.267 3.413-7.68 7.68-7.68s7.68 3.413 7.68 7.68v38.571h13.995c10.411 0 18.773-8.363 18.773-18.773v-468.821c0-10.24-8.363-18.773-18.773-18.773h-341.675c-10.24 0-18.773 8.363-18.773 18.773v468.992c0 10.24 8.363 18.773 18.773 18.773h13.995v-38.571c0-4.267 3.413-7.68 7.68-7.68h248.832c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68h-241.152v74.069c0 43.861 35.669 79.701 79.701 79.701h246.784c-26.283-17.237-43.52-46.421-43.52-79.872zM209.237 558.251v-85.333c0-4.267 3.413-7.68 7.68-7.68h298.155c4.267 0 7.68 3.413 7.68 7.68v85.333c0 4.267-3.413 7.68-7.68 7.68h-298.155c-4.096 0-7.68-3.413-7.68-7.68zM224.597 550.571h282.965v-70.144h-282.965v70.144zM290.304 416.597h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68zM402.773 416.597h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68zM515.243 416.597h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68-0.171 4.267-3.584 7.68-7.68 7.68zM290.304 334.507h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68zM402.773 334.507h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68zM515.243 334.507h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.584 7.68-7.68 7.68zM290.304 252.245h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68zM402.773 252.245h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68s-3.413 7.68-7.68 7.68zM515.243 252.245h-73.387c-4.267 0-7.68-3.413-7.68-7.68s3.413-7.68 7.68-7.68h73.387c4.267 0 7.68 3.413 7.68 7.68-0.171 4.267-3.584 7.68-7.68 7.68z" />
40
+ <glyph unicode="&#xe91e;" glyph-name="bank-check" d="M862.72 645.803c-0.171 1.877-1.195 3.755-2.731 4.949l-96.768 75.776c-3.243 2.56-7.851 1.877-10.411-1.195l-274.091-349.184c-0.853-1.024-1.365-2.389-1.536-3.584l-14.677-118.955c-0.341-2.56 0.683-5.12 2.731-6.656 1.365-1.024 2.901-1.536 4.608-1.536 0.853 0 1.707 0.171 2.731 0.512l111.445 43.008c1.195 0.512 2.389 1.195 3.072 2.389l153.259 195.243v-303.957h-564.395l0.512 337.408 347.989-1.536c0 0 0 0 0 0 4.096 0 7.339 3.243 7.339 7.339s-3.243 7.339-7.339 7.339l-355.328 1.536c-2.219-0.341-3.755-0.683-5.291-2.219-1.365-1.365-2.219-3.243-2.219-5.291l-0.512-351.915c0-3.584 2.56-6.315 5.973-6.997 0.853-0.341 1.877-0.683 2.901-0.683h577.707c4.096 0 7.339 3.243 7.339 7.339v330.24l106.155 135.168c1.195 1.536 1.707 3.584 1.536 5.461zM587.776 315.904l-56.491 44.203c-3.243 2.56-7.851 1.877-10.411-1.195-2.56-3.243-1.877-7.851 1.195-10.411l56.491-44.203-1.877-2.389-98.133-37.888 12.971 104.619 222.208 283.136 61.099-47.957c1.365-1.024 2.901-1.536 4.608-1.536 2.219 0 4.267 1.024 5.803 2.901 2.56 3.243 1.877 7.851-1.195 10.411l-61.099 47.787 37.035 47.104 85.163-66.731-257.365-327.851zM466.261 443.051c0 4.096-3.243 7.339-7.339 7.339h-206.507c-4.096 0-7.339-3.243-7.339-7.339s3.243-7.339 7.339-7.339h206.507c3.925 0 7.339 3.243 7.339 7.339zM395.605 351.403c0 4.096-3.243 7.339-7.339 7.339h-136.021c-4.096 0-7.339-3.243-7.339-7.339s3.243-7.339 7.339-7.339h136.021c4.096 0 7.339 3.243 7.339 7.339zM252.245 267.264c-4.096 0-7.339-3.243-7.339-7.339s3.243-7.339 7.339-7.339h81.92c4.096 0 7.339 3.243 7.339 7.339s-3.243 7.339-7.339 7.339h-81.92z" />
41
+ <glyph unicode="&#xe91f;" glyph-name="cash" d="M387.072 268.629c1.024-0.853 2.389-1.195 3.755-1.195 0.853 0 1.707 0.171 2.56 0.512l138.752 59.733c3.243 1.365 4.779 5.291 3.413 8.533s-5.291 4.779-8.533 3.413l-135.339-58.368-218.795 151.552c-2.901 2.048-6.997 1.365-9.045-1.707-2.048-2.901-1.365-6.997 1.707-9.045l221.525-153.429zM852.48 474.453l-131.584-55.125c-3.243-1.365-4.949-5.12-3.413-8.533 1.024-2.56 3.413-3.925 5.973-3.925 0.853 0 1.707 0.171 2.56 0.512l131.584 55.125c3.243 1.365 4.949 5.12 3.413 8.533-1.365 3.243-5.291 4.779-8.533 3.413zM851.285 425.643l-153.771-64.341 2.219 83.285 0.683 0.341c0.341 0.171 0.512 0.171 0.853 0.341l157.696 66.048c2.219 0.853 3.755 2.901 3.925 5.291s-0.853 4.608-2.731 5.973l-221.696 153.6c-1.877 1.195-4.096 1.536-6.144 0.683l-464.213-194.389c-0.171 0-0.341-0.171-0.512-0.341-0.341-0.171-0.683-0.512-1.024-0.683-0.341-0.341-0.683-0.512-1.024-0.853-0.171-0.171-0.341-0.171-0.341-0.341-0.171-0.171-0.171-0.341-0.341-0.683s-0.341-0.853-0.512-1.195c-0.171-0.341-0.171-0.853-0.171-1.195s0-0.853 0-1.195c0-0.512 0.171-0.853 0.341-1.365 0-0.171 0-0.512 0.171-0.683 0-0.171 0.171-0.341 0.341-0.512 0.171-0.341 0.512-0.683 0.683-1.024 0.341-0.341 0.512-0.683 0.853-1.024 0.171-0.171 0.171-0.341 0.341-0.341l221.696-153.6c0 0 0 0 0 0 0.341-0.341 0.853-0.512 1.195-0.683 0.171 0 0.341-0.171 0.512-0.171 0.512-0.171 1.024-0.171 1.365-0.171 0.171 0 0.341 0 0.341 0v0c0 0 0 0 0 0 0.853 0 1.707 0.171 2.56 0.512l158.379 66.389-2.219-83.285-160.427-67.243-218.795 151.723c-2.901 2.048-6.997 1.365-9.045-1.707-2.048-2.901-1.365-6.997 1.707-9.045l221.696-153.6c1.195-0.853 2.389-1.195 3.755-1.195 0.853 0 1.707 0.171 2.56 0.512l464.213 194.389c3.243 1.365 4.949 5.12 3.413 8.533-1.536 3.072-5.291 4.608-8.533 3.243zM633.685 663.381l209.067-144.896-144.213-60.416-209.067 144.896 144.213 60.416zM392.704 330.069l-209.067 144.896 155.819 65.195 209.067-144.896-155.819-65.195zM566.101 395.264c0 0.171-0.171 0.341-0.171 0.683 0 0.512-0.171 0.853-0.171 1.365-0.171 0.341-0.171 0.853-0.512 1.195-0.171 0.341-0.341 0.683-0.683 1.024s-0.512 0.683-0.853 1.024c-0.171 0.171-0.341 0.341-0.512 0.512l-209.749 145.408 121.515 50.859 211.456-146.603-2.389-94.891-120.32-50.347 2.389 89.771zM391.168 437.76c-1.877 4.779-7.339 7.168-12.117 5.291s-7.168-7.339-5.291-12.117c1.877-4.779 7.339-7.168 12.117-5.291s7.168 7.339 5.291 12.117zM674.133 551.083c4.779 1.877 7.168 7.339 5.291 12.117s-7.339 7.168-12.117 5.291c-4.779-1.877-7.168-7.339-5.291-12.117 1.877-4.949 7.339-7.168 12.117-5.291z" />
42
+ <glyph unicode="&#xe920;" glyph-name="credit-card" d="M813.909 620.544h-645.12c-4.096 0-7.509-3.413-7.509-7.509v-376.832c0-4.096 3.413-7.509 7.509-7.509h645.12c4.096 0 7.509 3.413 7.509 7.509v376.832c0 4.096-3.243 7.509-7.509 7.509zM806.4 243.712h-630.101v361.813h630.101v-361.813zM717.141 378.197c-10.24 0-19.627-3.243-27.477-8.533-8.021 5.461-17.408 8.533-27.307 8.533-26.795 0-48.811-21.845-48.811-48.811s21.845-48.811 48.811-48.811c9.899 0 19.285 3.072 27.307 8.533 7.851-5.461 17.237-8.533 27.477-8.533 26.795 0 48.811 21.845 48.811 48.811s-22.016 48.811-48.811 48.811zM628.736 329.557c0 18.603 15.019 33.621 33.621 33.621 5.803 0 11.264-1.536 16.213-4.267-6.315-8.192-10.069-18.261-10.069-29.355s3.925-21.163 10.069-29.355c-4.949-2.731-10.411-4.267-16.213-4.267-18.603 0-33.621 15.019-33.621 33.621zM717.141 295.936c-18.603 0-33.621 15.019-33.621 33.621s15.019 33.621 33.621 33.621c18.603 0 33.621-15.019 33.621-33.621s-15.019-33.621-33.621-33.621zM224.427 472.064h117.589c4.096 0 7.509 3.413 7.509 7.509v80.555c0 4.096-3.413 7.509-7.509 7.509h-117.589c-4.096 0-7.509-3.413-7.509-7.509v-80.555c0-4.096 3.243-7.509 7.509-7.509zM231.936 552.619h102.571v-65.365h-102.571v65.365zM224.427 417.109h533.845c4.096 0 7.509 3.413 7.509 7.509s-3.413 7.509-7.509 7.509h-533.845c-4.096 0-7.509-3.413-7.509-7.509s3.243-7.509 7.509-7.509zM855.211 667.307h-628.736c-4.096 0-7.509-3.413-7.509-7.509s3.413-7.509 7.509-7.509h621.227v-359.765c0-4.096 3.413-7.509 7.509-7.509s7.509 3.413 7.509 7.509v367.275c0 4.096-3.413 7.509-7.509 7.509z" />
43
+ <glyph unicode="&#xe921;" glyph-name="check-circle" d="M483.499 298.667c-7.509 0-14.848 3.072-20.139 8.363l-99.499 99.669c-11.093 11.093-11.093 29.184 0 40.277s29.184 11.093 40.277 0l77.141-77.141 179.2 224.085c9.728 12.288 27.648 14.336 39.936 4.437 12.288-9.728 14.336-27.648 4.437-39.936l-199.168-249.173c-5.12-6.315-12.629-10.24-20.651-10.581-0.512 0-1.024 0-1.536 0zM512 35.499c-227.499 0-412.501 185.003-412.501 412.501s185.003 412.501 412.501 412.501 412.501-185.003 412.501-412.501-185.003-412.501-412.501-412.501zM512 803.499c-196.096 0-355.499-159.403-355.499-355.499s159.403-355.499 355.499-355.499 355.499 159.573 355.499 355.499-159.403 355.499-355.499 355.499z" />
44
+ <glyph unicode="&#xe922;" glyph-name="info-squared" d="M853.333 35.499h-682.667c-39.253 0-71.168 31.915-71.168 71.168v682.667c0 39.253 31.915 71.168 71.168 71.168h682.667c39.253 0 71.168-31.915 71.168-71.168v-682.667c0-39.253-31.915-71.168-71.168-71.168zM170.667 803.499c-7.851 0-14.165-6.315-14.165-14.165v-682.667c0-7.851 6.315-14.165 14.165-14.165h682.667c7.851 0 14.165 6.315 14.165 14.165v682.667c0 7.851-6.315 14.165-14.165 14.165h-682.667zM504.832 561.835c-19.627 0-35.499 15.872-35.499 35.499s15.872 35.499 35.499 35.499 35.499-15.872 35.499-35.499-15.872-35.499-35.499-35.499zM568.832 291.499h-28.501v199.168c0 15.701-12.8 28.501-28.501 28.501h-28.501c-15.701 0-28.501-12.8-28.501-28.501s12.8-28.501 28.501-28.501v-170.667h-28.501c-15.701 0-28.501-12.8-28.501-28.501s12.8-28.501 28.501-28.501h113.835c15.701 0 28.501 12.8 28.501 28.501s-12.629 28.501-28.331 28.501z" />
45
+ <glyph unicode="&#xe923;" glyph-name="warning-triangle" d="M504.832 789.333l384-682.667h-768l384 682.667zM504.832 846.165v0c-20.48 0-39.424-11.093-49.664-29.013l-384-682.667c-9.899-17.579-9.728-39.083 0.512-56.661 10.24-17.408 28.843-28.16 49.152-28.16h768c20.139 0 38.912 10.752 49.152 28.16s10.411 39.083 0.512 56.661l-384 682.667c-10.069 17.92-29.013 29.013-49.664 29.013v0zM504.832 276.48c23.552 0 42.667-19.115 42.667-42.667s-19.115-42.667-42.667-42.667-42.667 19.115-42.667 42.667 19.115 42.667 42.667 42.667zM497.835 334.165c-15.701 0-28.501 12.8-28.501 28.501v227.499c0 15.701 12.8 28.501 28.501 28.501s28.501-12.8 28.501-28.501v-227.499c-0.171-15.701-12.8-28.501-28.501-28.501z" />
46
</font></defs></svg>
plugin-fw/assets/fonts/yith-icon.ttf CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.woff CHANGED
Binary file
plugin-fw/assets/images/banner-free.png DELETED
Binary file
plugin-fw/assets/images/banner-premium.png CHANGED
Binary file
plugin-fw/assets/images/rate_banner.png DELETED
Binary file
plugin-fw/assets/images/upgrade_banner.png DELETED
Binary file
plugin-fw/assets/js/metabox.js CHANGED
@@ -129,7 +129,14 @@
129
$current_field.hide();
130
break;
131
default:
132
- $current_container.hide();
133
}
134
135
} else {
@@ -143,6 +150,7 @@
143
break;
144
default:
145
$current_container.show();
146
}
147
}
148
}
129
$current_field.hide();
130
break;
131
default:
132
+ if( ! $current_container.hasClass('fade-in')){
133
+ $current_container.hide();
134
+ $current_container.css({'opacity':'0'});
135
+ }else{
136
+ $current_container.fadeTo("slow" , 0, function(){
137
+ $(this).hide().removeClass('fade-in');
138
+ });
139
+ }
140
}
141
142
} else {
150
break;
151
default:
152
$current_container.show();
153
+ $current_container.fadeTo("slow" , 1).addClass('fade-in');
154
}
155
}
156
}
plugin-fw/assets/js/metabox.min.js CHANGED
@@ -1,7 +1 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,c){a instanceof String&&(a=String(a));for(var b=a.length,d=0;d<b;d++){var f=a[d];if(e.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,c){a!=Array.prototype&&a!=Object.prototype&&(a[e]=c.value)};
2
- $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,c,b){if(e){c=$jscomp.global;a=a.split(".");for(b=0;b<a.length-1;b++){var d=a[b];d in c||(c[d]={});c=c[d]}a=a[a.length-1];b=c[a];e=e(b);e!=b&&null!=e&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:e})}};
3
- $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
- (function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
5
- c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
6
- a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
7
- "pointer-events":"none"})}).click();a(document.body).on("yith-plugin-fw-metabox-init-deps",function(){a(document.body).trigger("yith-plugin-fw-init-radio");a(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change();b.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")})(jQuery);
1
+ !function(h){h(".metaboxes-tab").each(function(){h(".tabs-panel",this).hide();var t=wpCookies.get("active_metabox_tab");t=null==t?h("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+t,h(t).show(),h(".metaboxes-tabs a",this).click(function(t){if(!h(this).parent().hasClass("tabs")){var e=h(this).attr("href");return h(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),h(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),h(e).show(),!1}t.preventDefault()})});var t=h("#_active_page_options-container").parent().html();function n(t,e,a,i){var s=!0;if("string"==typeof e){":radio"==e.substr(0,6)&&(e+=":checked");var n=h(e).val();if("checkbox"==h(e).attr("type"))n=h(e).is(":checked")?"yes":"no";a=a.split(",");for(var o=0;o<a.length;o++){if(n==a[o]){s=!0;break}s=!1}}var d,r=h(t),c=h(t+"-container").parent(),l=i.split("-");for(d in l){var p=l[d];if(s)switch(p){case"disable":c.removeClass("yith-disabled"),r.attr("disabled",!1);break;case"hideme":r.show();break;default:c.show(),c.fadeTo("slow",1).addClass("fade-in")}else switch(p){case"disable":c.addClass("yith-disabled"),r.attr("disabled",!0);break;case"hideme":r.hide();break;default:c.hasClass("fade-in")?c.fadeTo("slow",0,function(){h(this).hide().removeClass("fade-in")}):(c.hide(),c.css({opacity:"0"}))}}}h("#_active_page_options-container").parent().remove(),h(t).insertAfter("#yit-post-setting .handlediv"),h(t).insertAfter("#yit-page-setting .handlediv"),h("#_active_page_options-container").on("click",function(){h("#_active_page_options").is(":checked")?h("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):h("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,"pointer-events":"none"})}).click(),h(document.body).on("yith-plugin-fw-metabox-init-deps",function(){h(document.body).trigger("yith-plugin-fw-init-radio"),h(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var t=h(this),e="#"+t.data("dep-target"),a="#"+t.data("dep-id"),i=t.data("dep-value"),s=t.data("dep-type");n(e,a,i.toString(),s),h(a).on("change",function(){n(e,a,i.toString(),s)}).change(),t.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")}(jQuery);
plugin-fw/assets/js/yit-plugin-panel.js CHANGED
@@ -27,7 +27,6 @@ jQuery( function ( $ ) {
27
//Handle dependencies.
28
function dependencies_handler( id, deps, values, type ) {
29
var result = true;
30
-
31
//Single dependency
32
if ( typeof( deps ) == 'string' ) {
33
if ( deps.substr( 0, 6 ) == ':radio' ) {
@@ -81,7 +80,15 @@ jQuery( function ( $ ) {
81
$current_field.hide();
82
break;
83
default:
84
- $current_container.hide();
85
}
86
87
} else {
@@ -95,6 +102,7 @@ jQuery( function ( $ ) {
95
break;
96
default:
97
$current_container.show();
98
}
99
}
100
}
@@ -149,4 +157,13 @@ jQuery( function ( $ ) {
149
// prevents the WC message for changes when leaving the panel page
150
$( '.yith-plugin-fw-panel .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' );
151
152
} );
27
//Handle dependencies.
28
function dependencies_handler( id, deps, values, type ) {
29
var result = true;
30
//Single dependency
31
if ( typeof( deps ) == 'string' ) {
32
if ( deps.substr( 0, 6 ) == ':radio' ) {
80
$current_field.hide();
81
break;
82
default:
83
+ if( ! $current_container.hasClass('fade-in')){
84
+ $current_container.hide();
85
+ $current_container.css({'opacity':'0'});
86
+ }else{
87
+ $current_container.fadeTo("slow" , 0, function(){
88
+ $(this).hide().removeClass('fade-in');
89
+ });
90
+ }
91
+
92
}
93
94
} else {
102
break;
103
default:
104
$current_container.show();
105
+ $current_container.fadeTo("slow" , 1).addClass('fade-in');
106
}
107
}
108
}
157
// prevents the WC message for changes when leaving the panel page
158
$( '.yith-plugin-fw-panel .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' );
159
160
+ var wrap = $( '.wrap.yith-plugin-ui' ).first(),
161
+ notices = $( 'div.updated, div.error, div.notice' );
162
+
163
+ // prevent moving notices into the wrapper
164
+ notices.addClass( 'inline' );
165
+ if ( wrap.length ) {
166
+ wrap.prepend( notices );
167
+ }
168
+
169
} );
plugin-fw/assets/js/yit-plugin-panel.min.js CHANGED
@@ -1,7 +1,8 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,b){a instanceof String&&(a=String(a));for(var c=a.length,d=0;d<c;d++){var g=a[d];if(e.call(b,g,d,a))return{i:d,v:g}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,b){a!=Array.prototype&&a!=Object.prototype&&(a[e]=b.value)};
2
- $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,b,c){if(e){b=$jscomp.global;a=a.split(".");for(c=0;c<a.length-1;c++){var d=a[c];d in b||(b[d]={});b=b[d]}a=a[a.length-1];c=b[a];e=e(c);e!=c&&null!=e&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:e})}};
3
- $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
4
- jQuery(function(a){function e(b,c,d,e){var f=!0;if("string"==typeof c){":radio"==c.substr(0,6)&&(c+=":checked");var h=a(c).val();"checkbox"==a(c).attr("type")&&(h=a(c).is(":checked")?"yes":"no");d=d.split(",");for(c=0;c<d.length;c++)if(h!=d[c])f=!1;else{f=!0;break}}d=a(b);b=a(b+"-container").closest("tr");1>b.length&&(b=d.closest(".yith-plugin-fw-panel-wc-row"));e=e.split("-");for(var g in e)if(h=e[g],f)switch(h){case "disable":b.removeClass("yith-disabled");d.attr("disabled",!1);break;case "hideme":d.show();
5
- break;default:b.show()}else switch(h){case "disable":b.addClass("yith-disabled");d.attr("disabled",!0);break;case "hideme":d.hide();break;default:b.hide()}}a("[data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),d="#"+b.data("dep-id"),g=b.data("dep-value"),f=b.data("dep-type");e(c,d,g.toString(),f);a(d).on("change",function(){e(c,d,g.toString(),f)}).change()});a(".rm_connectedlist").each(function(){var b=a(this).find("ul"),c=a(this).find(":hidden");b.sortable({connectWith:b,
6
- update:function(d,e){var f={};b.each(function(){var b={};a(this).children().each(function(){b[a(this).data("option")]=a(this).text()});f[a(this).data("list")]=b});c.val(JSON.stringify(f).replace(/[\\"']/g,"\\amp;").replace(/\u0000/g,"\\0"))}}).disableSelection()});a(document).ready(function(){a(".google-analytic-generate").click(function(){var b=a("#"+a(this).data("textarea")).data("codemirrorInstance"),c=a("#"+a(this).data("input")).val(),d=a(this).data("basename");b.replaceRange("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\nm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n"+
7
- ("ga('create', '"+c+"', '"+d+"');\n")+"ga('send', 'pageview');\n",b.getCursor("start"),b.getCursor("end"))})});a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper")});
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,c){a instanceof String&&(a=String(a));for(var d=a.length,b=0;b<d;b++){var f=a[b];if(e.call(c,f,b,a))return{i:b,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,c){a!=Array.prototype&&a!=Object.prototype&&(a[e]=c.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,c,d){if(e){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var b=a[d];b in c||(c[b]={});c=c[b]}a=a[a.length-1];d=c[a];e=e(d);e!=d&&null!=e&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:e})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
+ jQuery(function(a){function e(b,f,g,c){var e=!0;if("string"==typeof f){":radio"==f.substr(0,6)&&(f+=":checked");var d=a(f).val();"checkbox"==a(f).attr("type")&&(d=a(f).is(":checked")?"yes":"no");g=g.split(",");for(f=0;f<g.length;f++)if(d!=g[f])e=!1;else{e=!0;break}}g=a(b);b=a(b+"-container").closest("tr");1>b.length&&(b=g.closest(".yith-plugin-fw-panel-wc-row"));c=c.split("-");for(var h in c)if(d=c[h],e)switch(d){case "disable":b.removeClass("yith-disabled");g.attr("disabled",!1);break;case "hideme":g.show();
5
+ break;default:b.show(),b.fadeTo("slow",1).addClass("fade-in")}else switch(d){case "disable":b.addClass("yith-disabled");g.attr("disabled",!0);break;case "hideme":g.hide();break;default:b.hasClass("fade-in")?b.fadeTo("slow",0,function(){a(this).hide().removeClass("fade-in")}):(b.hide(),b.css({opacity:"0"}))}}a("[data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),d="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,d,h.toString(),k);a(d).on("change",function(){e(c,
6
+ d,h.toString(),k)}).change()});a(".rm_connectedlist").each(function(){var b=a(this).find("ul"),c=a(this).find(":hidden");b.sortable({connectWith:b,update:function(d,e){var f={};b.each(function(){var b={};a(this).children().each(function(){b[a(this).data("option")]=a(this).text()});f[a(this).data("list")]=b});c.val(JSON.stringify(f).replace(/[\\"']/g,"\\amp;").replace(/\u0000/g,"\\0"))}}).disableSelection()});a(document).ready(function(){a(".google-analytic-generate").click(function(){var b=a("#"+a(this).data("textarea")).data("codemirrorInstance"),
7
+ c=a("#"+a(this).data("input")).val(),d=a(this).data("basename");b.replaceRange("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\nm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n"+("ga('create', '"+c+"', '"+d+"');\n")+"ga('send', 'pageview');\n",b.getCursor("start"),b.getCursor("end"))})});
8
+ a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");var c=a(".wrap.yith-plugin-ui").first(),d=a("div.updated, div.error, div.notice");d.addClass("inline");c.length&&c.prepend(d)});
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -457,7 +457,13 @@
457
action = 'yith_plugin_fw_save_toggle_element_metabox';
458
post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
- url = yith_framework_fw_fields.ajax_url + '?action=' + action + "&post_ID=" + post_id + '&yit_metaboxes_nonce=' + yit_metaboxes_nonce + "&toggle_id=" + id;
461
} else {
462
url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
463
}
457
action = 'yith_plugin_fw_save_toggle_element_metabox';
458
post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
+ metabox_tab = $( this ).closest( '.tabs-panel' ).attr( 'id' );
461
+ url = yith_framework_fw_fields.ajax_url +
462
+ '?action=' + action +
463
+ "&post_ID=" + post_id +
464
+ '&yit_metaboxes_nonce=' + yit_metaboxes_nonce +
465
+ "&toggle_id=" + id +
466
+ "&metabox_tab=" + metabox_tab;
467
} else {
468
url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
469
}
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -16,14 +16,15 @@ function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).t
16
e.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});
17
a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(b,c){b=jQuery(".ui-sortable-handle");var d=[];for(c=0;c<b.length;c++)d[c]=a(b[c]).data("item_key");0<d.length&&a(this).closest(".toggle-element").saveToggleElement(null,d)}});a(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init");a(document).on("click",
18
".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),e="yith_plugin_fw_save_toggle_element",g=d.serializeToggleElement(),h=d.find(".yith-toggle_wrapper"),k=h.attr("id"),l=a.urlParam("tab");g.append("security",h.data("nonce"));"undefined"!=typeof c&&0<c.length&&
19
- g.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(e="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),url=yith_framework_fw_fields.ajax_url+"?action="+e+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+k):url=yith_framework_fw_fields.admin_url+"?action="+e+"&tab="+l+"&toggle_id="+k;a.ajax({type:"POST",
20
- url:url,data:g,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=b.find("span.title").data("title_format"),e=b.find(".subtitle").data("subtitle_format"),g=/[^%%]+(?=[%%])/g;
21
- if("undefined"!=typeof d)var h=d.match(g);if("undefined"!=typeof e)var k=e.match(g);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=a(c).val(),null!=h&&"undefined"!=typeof h&&-1!==h.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=k&&"undefined"!=typeof k&&-1!==k.indexOf($field_id)&&(e=e.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);
22
- ""!==e&&b.find(".subtitle").html(e);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});
23
- a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),e=b.data("opened_label"),g=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+g);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?b.html(e).removeClass("closed"):b.html(d).addClass("closed")),a(document).trigger("yith_fields_init"),a(document).trigger("yith-add-box-button-toggle",
24
- [b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var e=a(this).parents(".toggle-element"),g=c.find(":input"),h=e.find(".yith-toggle-row").length,k=a('<input type="hidden">');k.val(h);a(document).trigger("yith-toggle-change-counter",[k,c]);h=k.val();d=wp.template("yith-toggle-element-item-"+d);var l=a(d({index:h}));b.addClass("show");
25
- a.each(g,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+h,a(c).is(":checked")&&a(l).find("#"+$field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(l).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),
26
- a(l).find("#"+$field_id).val($field_val))});a(l).formatToggleTitle();var m=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,l,m]);setTimeout(function(){"yes"===m.val()&&(a(e).find(".yith-toggle-elements").append(l),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),a(c).html(""),a(c).prev(".yith-add-box-button").trigger("click"),e.saveToggleElement(),setTimeout(function(){a(e).find(".highlight").removeClass("highlight")},2E3),a(document).trigger("yith_fields_init"))},
27
- 1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var e=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",[b,c,e]);"yes"===e.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");
28
- a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?
29
- (c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(document.body).on("yith-plugin-fw-init-radio",function(){a(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){a(this).val(a(this).attr("value"));a(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio");a(document).on("select2:open",function(b){a(b.target).closest(".yith-plugin-ui").length&&a(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})})(jQuery);
16
e.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});
17
a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(b,c){b=jQuery(".ui-sortable-handle");var d=[];for(c=0;c<b.length;c++)d[c]=a(b[c]).data("item_key");0<d.length&&a(this).closest(".toggle-element").saveToggleElement(null,d)}});a(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init");a(document).on("click",
18
".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),e="yith_plugin_fw_save_toggle_element",g=d.serializeToggleElement(),h=d.find(".yith-toggle_wrapper"),k=h.attr("id"),l=a.urlParam("tab");g.append("security",h.data("nonce"));"undefined"!=typeof c&&0<c.length&&
19
+ g.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(e="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=a(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+e+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+k+"&metabox_tab="+metabox_tab):
20
+ url=yith_framework_fw_fields.admin_url+"?action="+e+"&tab="+l+"&toggle_id="+k;a.ajax({type:"POST",url:url,data:g,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=
21
+ b.find("span.title").data("title_format"),e=b.find(".subtitle").data("subtitle_format"),g=/[^%%]+(?=[%%])/g;if("undefined"!=typeof d)var h=d.match(g);if("undefined"!=typeof e)var k=e.match(g);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=a(c).val(),null!=h&&"undefined"!=typeof h&&-1!==h.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=k&&
22
+ "undefined"!=typeof k&&-1!==k.indexOf($field_id)&&(e=e.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);""!==e&&b.find(".subtitle").html(e);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||
23
+ b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),e=b.data("opened_label"),g=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+g);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?
24
+ b.html(e).removeClass("closed"):b.html(d).addClass("closed")),a(document).trigger("yith_fields_init"),a(document).trigger("yith-add-box-button-toggle",[b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var e=a(this).parents(".toggle-element"),g=c.find(":input"),h=e.find(".yith-toggle-row").length,k=a('<input type="hidden">');k.val(h);
25
+ a(document).trigger("yith-toggle-change-counter",[k,c]);h=k.val();d=wp.template("yith-toggle-element-item-"+d);var l=a(d({index:h}));b.addClass("show");a.each(g,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+h,a(c).is(":checked")&&a(l).find("#"+
26
+ $field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(l).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),a(l).find("#"+$field_id).val($field_val))});a(l).formatToggleTitle();var m=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,l,m]);setTimeout(function(){"yes"===m.val()&&(a(e).find(".yith-toggle-elements").append(l),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),a(c).html(""),
27
+ a(c).prev(".yith-add-box-button").trigger("click"),e.saveToggleElement(),setTimeout(function(){a(e).find(".highlight").removeClass("highlight")},2E3),a(document).trigger("yith_fields_init"))},1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var e=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",
28
+ [b,c,e]);"yes"===e.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});
29
+ a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?(c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(document.body).on("yith-plugin-fw-init-radio",function(){a(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){a(this).val(a(this).attr("value"));a(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio");
30
+ a(document).on("select2:open",function(b){a(b.target).closest(".yith-plugin-ui").length&&a(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})})(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
- * Version: 3.4.2
5
* Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
8
*
9
* @author Your Inspiration Themes
10
- * @version 3.4.0
11
*/
12
/**
13
* This file belongs to the YIT Plugin Framework.
1
<?php
2
/**
3
* Framework Name: YIT Plugin Framework
4
+ * Version: 3.4.13
5
* Author: YITHEMES
6
* Text Domain: yith-plugin-fw
7
* Domain Path: /languages/
8
*
9
* @author Your Inspiration Themes
10
+ * @version 3.4.13
11
*/
12
/**
13
* This file belongs to the YIT Plugin Framework.
plugin-fw/languages/yith-plugin-fw-el.mo ADDED
Binary file
plugin-fw/languages/yith-plugin-fw-el.po ADDED
<
@@ -0,0 +1,811 @@