PluginProbe
Ever Compare – Products Compare Plugin for WooCommerce / trunk
Ever Compare – Products Compare Plugin for WooCommerce vtrunk
1.3.7 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 trunk 1.0.0 1.0.1 1.0.2 All 31 releases
← All changes | includes/classes/Admin/Admin_Fields.php +572 -9 1.0.2trunk View file →
@@ -1,6 +1,8 @@
1 1 <?php
2 2 namespace EverCompare\Admin;
3 +
4 +defined( 'ABSPATH' ) || exit;
3 5 /**
4 6 * Admin Page Fields handlers class
5 7 */
6 8 class Admin_Fields {
@@ -43,10 +45,15 @@
43 45 public function get_settings_sections() {
44 46 $sections = array(
45 47
46 48 array(
49 + 'id' => 'ever_compare_settings_general',
50 + 'title' => esc_html__( 'General Settings', 'ever-compare' ),
51 + ),
52 +
53 + array(
47 54 'id' => 'ever_compare_settings_tabs',
48 - 'title' => esc_html__( 'Button Settings', 'ever-compare' )
55 + 'title' => esc_html__( 'Button Settings', 'ever-compare' ),
49 56 ),
50 57
51 58 array(
52 59 'id' => 'ever_compare_table_settings_tabs',
@@ -51,8 +58,12 @@
51 58 array(
52 59 'id' => 'ever_compare_table_settings_tabs',
53 60 'title' => esc_html__( 'Table Settings', 'ever-compare' )
54 61 ),
62 + array(
63 + 'id' => 'ever_compare_style_tabs',
64 + 'title' => esc_html__( 'Style Settings', 'ever-compare' ),
65 + )
55 66
56 67 );
57 68 return $sections;
58 69 }
@@ -61,34 +72,177 @@
61 72 protected function fields_settings() {
62 73
63 74 $settings_fields = array(
64 75
76 + 'ever_compare_settings_general' => array(
77 +
78 + array(
79 + 'name' => 'enable_success_notification',
80 + 'label' => __( 'Show successful notification', 'ever-compare' ),
81 + 'type' => 'checkbox',
82 + 'default' => 'off',
83 + 'desc' => esc_html__( 'Enable this option to display a notification when a client adds or removes a product from the compare.', 'ever-compare' ),
84 + ),
85 +
86 + array(
87 + 'name' => 'success_added_notification_text',
88 + 'label' => __( '"Product added to compare" Text', 'ever-compare' ),
89 + 'type' => 'text',
90 + 'default' => __( '{product_name} added to compare.', 'ever-compare'),
91 + 'desc' => esc_html__( 'You can use the placeholder {product_name} to get the current product name.', 'ever-compare' ),
92 + 'class' => 'depend_enable_success_notification'
93 + ),
94 + array(
95 + 'name' => 'success_removed_notification_text',
96 + 'label' => __( '"Product removed from compare" Text', 'ever-compare' ),
97 + 'type' => 'text',
98 + 'default' => __( '{product_name} removed from compare.', 'ever-compare'),
99 + 'desc' => esc_html__( 'You can use the placeholder {product_name} to get the current product name.', 'ever-compare' ),
100 + 'class' => 'depend_enable_success_notification'
101 + ),
102 + array(
103 + 'name' => 'removed_notification_after',
104 + 'label' => __( 'Remove Notification automatically after (seconds)', 'ever-compare' ),
105 + 'type' => 'number',
106 + 'default' => 4,
107 + 'min' => -1,
108 + 'desc' => esc_html__( 'If you wish to always display the notification, please input the value "-1".', 'ever-compare' ),
109 + 'class' => 'depend_enable_success_notification'
110 + ),
111 + ),
112 +
65 113 'ever_compare_settings_tabs' => array(
66 114
67 115 array(
68 116 'name' => 'btn_show_shoppage',
69 - 'label' => __( 'Show compare button in product list', 'ever-compare' ),
117 + 'label' => __( 'Show button in product list page', 'ever-compare' ),
118 + 'desc' => __( 'Show compare button in product list page.', 'ever-compare' ),
70 119 'type' => 'checkbox',
71 - 'default' => 'on',
120 + 'default' => 'off',
72 121 ),
73 122
74 123 array(
75 124 'name' => 'btn_show_productpage',
76 - 'label' => __( 'Show compare button on single product page', 'ever-compare' ),
125 + 'label' => __( 'Show button in single product page', 'ever-compare' ),
126 + 'desc' => __( 'Show compare button in single product page.', 'ever-compare' ),
77 127 'type' => 'checkbox',
78 128 'default' => 'on',
79 129 ),
80 130
81 131 array(
132 + 'name' => 'remove_on_click',
133 + 'label' => __( 'Remove product from compare on second click', 'ever-compare' ),
134 + 'type' => 'checkbox',
135 + 'default' => 'off',
136 + 'desc' => __( 'Remove the product from the compare if it has already been added.', 'ever-compare' ),
137 + ),
138 +
139 + array(
140 + 'name' => 'shop_btn_position',
141 + 'label' => __( 'Shop page button position', 'ever-compare' ),
142 + 'desc' => __( 'You can manage compare button position in product list page.', 'ever-compare' ),
143 + 'type' => 'select',
144 + 'default' => 'after_cart_btn',
145 + 'options' => [
146 + 'before_cart_btn' => __( 'Before Add To Cart', 'ever-compare' ),
147 + 'after_cart_btn' => __( 'After Add To Cart', 'ever-compare' ),
148 + 'top_thumbnail' => __( 'Top On Image', 'ever-compare' ),
149 + 'use_shortcode' => __( 'Use Shortcode', 'ever-compare' ),
150 + 'custom_position' => __( 'Custom Position', 'ever-compare' ),
151 + ],
152 + ),
153 +
154 + array(
155 + 'name' => 'shop_use_shortcode_message',
156 + 'headding'=> wp_kses_post('<code>[evercompare_button]</code> Use this shortcode into your theme/child theme to place the compare button.'),
157 + 'type' => 'title',
158 + 'size' => 'margin_0 regular',
159 + 'class' => 'depend_shop_btn_position_use_shortcode element_section_title_area message-info',
160 + ),
161 +
162 + array(
163 + 'name' => 'shop_custom_hook_message',
164 + 'headding'=> esc_html__( 'Some themes remove the above positions. In that case, custom position is useful. Here you can place the custom/default hook name & priority to inject & adjust the compare button for the product loop.', 'ever-compare' ),
165 + 'type' => 'title',
166 + 'size' => 'margin_0 regular',
167 + 'class' => 'depend_shop_btn_position_custom_hook element_section_title_area message-info',
168 + ),
169 +
170 + array(
171 + 'name' => 'shop_custom_hook_name',
172 + 'label' => __( 'Hook name', 'ever-compare' ),
173 + 'desc' => __( 'e.g: woocommerce_after_shop_loop_item_title', 'ever-compare' ),
174 + 'type' => 'text',
175 + 'class' => 'depend_shop_btn_position_custom_hook'
176 + ),
177 +
178 + array(
179 + 'name' => 'shop_custom_hook_priority',
180 + 'label' => __( 'Hook priority', 'ever-compare' ),
181 + 'desc' => __( 'Default: 10', 'ever-compare' ),
182 + 'type' => 'text',
183 + 'class' => 'depend_shop_btn_position_custom_hook'
184 + ),
185 +
186 + array(
187 + 'name' => 'product_btn_position',
188 + 'label' => __( 'Product page button position', 'ever-compare' ),
189 + 'desc' => __( 'You can manage compare button position in single product page.', 'ever-compare' ),
190 + 'type' => 'select',
191 + 'default' => 'after_cart_btn',
192 + 'options' => [
193 + 'before_cart_btn' => __( 'Before Add To Cart', 'ever-compare' ),
194 + 'after_cart_btn' => __( 'After Add To Cart', 'ever-compare' ),
195 + 'after_thumbnail' => __( 'After Image', 'ever-compare' ),
196 + 'after_summary' => __( 'After Summary', 'ever-compare' ),
197 + 'use_shortcode' => __( 'Use Shortcode', 'ever-compare' ),
198 + 'custom_position' => __( 'Custom Position', 'ever-compare' ),
199 + ],
200 + ),
201 +
202 + array(
203 + 'name' => 'product_use_shortcode_message',
204 + 'headding'=> wp_kses_post('<code>[evercompare_button]</code> Use this shortcode into your theme/child theme to place the compare button.'),
205 + 'type' => 'title',
206 + 'size' => 'margin_0 regular',
207 + 'class' => 'depend_product_btn_position_use_shortcode element_section_title_area message-info',
208 + ),
209 +
210 + array(
211 + 'name' => 'product_custom_hook_message',
212 + 'headding'=> esc_html__( 'Some themes remove the above positions. In that case, custom position is useful. Here you can place the custom/default hook name & priority to inject & adjust the compare button for the single product page.', 'ever-compare' ),
213 + 'type' => 'title',
214 + 'size' => 'margin_0 regular',
215 + 'class' => 'depend_product_btn_position_custom_hook element_section_title_area message-info',
216 + ),
217 +
218 + array(
219 + 'name' => 'product_custom_hook_name',
220 + 'label' => __( 'Hook name', 'ever-compare' ),
221 + 'desc' => __( 'e.g: woocommerce_after_single_product_summary', 'ever-compare' ),
222 + 'type' => 'text',
223 + 'class' => 'depend_product_btn_position_custom_hook'
224 + ),
225 +
226 + array(
227 + 'name' => 'product_custom_hook_priority',
228 + 'label' => __( 'Hook priority', 'ever-compare' ),
229 + 'desc' => __( 'Default: 10', 'ever-compare' ),
230 + 'type' => 'text',
231 + 'class' => 'depend_product_btn_position_custom_hook'
232 + ),
233 +
234 + array(
82 235 'name' => 'open_popup',
83 236 'label' => __( 'Open popup', 'ever-compare' ),
84 237 'type' => 'checkbox',
85 238 'default' => 'on',
239 + 'desc' => __( 'You can manage the popup window from here.', 'ever-compare' ),
86 240 ),
87 241
88 242 array(
89 243 'name' => 'button_text',
90 - 'label' => __( 'Button', 'ever-compare' ),
244 + 'label' => __( 'Button text', 'ever-compare' ),
91 245 'desc' => __( 'Enter your compare button text.', 'ever-compare' ),
92 246 'type' => 'text',
93 247 'default' => __( 'Compare', 'ever-compare' ),
94 248 'placeholder' => __( 'Compare', 'ever-compare' ),
@@ -95,9 +249,9 @@
95 249 ),
96 250
97 251 array(
98 252 'name' => 'added_button_text',
99 - 'label' => __( 'Added Button Text', 'ever-compare' ),
253 + 'label' => __( 'Added button text', 'ever-compare' ),
100 254 'desc' => __( 'Enter your compare added button text.', 'ever-compare' ),
101 255 'type' => 'text',
102 256 'default' => __( 'Added', 'ever-compare' ),
103 257 'placeholder' => __( 'Added', 'ever-compare' ),
@@ -102,8 +256,67 @@
102 256 'default' => __( 'Added', 'ever-compare' ),
103 257 'placeholder' => __( 'Added', 'ever-compare' ),
104 258 ),
105 259
260 + array(
261 + 'name' => 'remove_button_text',
262 + 'label' => __( 'Remove button text', 'ever-compare' ),
263 + 'desc' => __( 'Enter the compare remove button text.', 'ever-compare' ),
264 + 'type' => 'text',
265 + 'default' => __( 'Remove', 'ever-compare' ),
266 + 'placeholder' => __( 'Remove', 'ever-compare' ),
267 + 'class' => 'depend_remove_on_click',
268 + ),
269 +
270 + array(
271 + 'name' => 'button_icon_type',
272 + 'label' => esc_html__( 'Button icon type', 'ever-compare' ),
273 + 'desc' => esc_html__( 'Choose an icon type for the compare button from here.', 'ever-compare' ),
274 + 'type' => 'select',
275 + 'default' => 'default',
276 + 'options' => [
277 + 'none' => esc_html__( 'None', 'ever-compare' ),
278 + 'default' => esc_html__( 'Default', 'ever-compare' ),
279 + 'custom' => esc_html__( 'Custom', 'ever-compare' ),
280 + ]
281 + ),
282 +
283 + array(
284 + 'name' => 'button_custom_icon',
285 + 'label' => esc_html__( 'Button custom icon', 'ever-compare' ),
286 + 'type' => 'image_upload',
287 + 'options' => [
288 + 'button_label' => esc_html__( 'Upload', 'ever-compare' ),
289 + 'button_remove_label' => esc_html__( 'Remove', 'ever-compare' ),
290 + ],
291 + 'desc' => esc_html__( 'Upload you custom icon from here.', 'ever-compare' ),
292 + 'class' => 'depend_button_icon_type_custom',
293 + ),
294 +
295 + array(
296 + 'name' => 'added_button_icon_type',
297 + 'label' => __( 'Added button icon type', 'ever-compare' ),
298 + 'desc' => __( 'Choose an icon for the compare button from here.', 'ever-compare' ),
299 + 'type' => 'select',
300 + 'default' => 'default',
301 + 'options' => [
302 + 'none' => esc_html__( 'None', 'ever-compare' ),
303 + 'default' => esc_html__( 'Default', 'ever-compare' ),
304 + 'custom' => esc_html__( 'Custom', 'ever-compare' ),
305 + ]
306 + ),
307 +
308 + array(
309 + 'name' => 'added_button_custom_icon',
310 + 'label' => __( 'Added button custom icon', 'ever-compare' ),
311 + 'type' => 'image_upload',
312 + 'options' => [
313 + 'button_label' => esc_html__( 'Upload', 'ever-compare' ),
314 + 'button_remove_label' => esc_html__( 'Remove', 'ever-compare' ),
315 + ],
316 + 'class' => 'depend_added_button_icon_type_custom',
317 + ),
318 +
106 319 ),
107 320
108 321 'ever_compare_table_settings_tabs' => array(
109 322
@@ -116,8 +329,57 @@
116 329 'options' => ever_compare_get_post_list()
117 330 ),
118 331
119 332 array(
333 + 'name' => 'enable_shareable_link',
334 + 'label' => __( 'Enable shareable link', 'ever-compare' ),
335 + 'type' => 'checkbox',
336 + 'default' => 'off',
337 + 'desc' => __( 'If you enable this you can easily share your compare page link with specific products.', 'ever-compare' ),
338 + ),
339 +
340 + array(
341 + 'name' => 'linkshare_btn_pos',
342 + 'label' => __( 'Share link button position', 'ever-compare' ),
343 + 'type' => 'select',
344 + 'default' => 'right',
345 + 'options' => [
346 + 'left' => __('Left','ever-compare'),
347 + 'center' => __('Center','ever-compare'),
348 + 'right' => __('Right','ever-compare')
349 + ],
350 + 'class' => 'depend_enable_shareable_link'
351 + ),
352 +
353 + array(
354 + 'name' => 'shareable_link_button_text',
355 + 'label' => __( 'Share link button text', 'ever-compare' ),
356 + 'placeholder' => __( 'Copy shareable link', 'ever-compare' ),
357 + 'type' => 'text',
358 + 'class' => 'depend_enable_shareable_link'
359 + ),
360 +
361 + array(
362 + 'name' => 'shareable_link_after_button_text',
363 + 'label' => __( 'Text to show after link is copied', 'ever-compare' ),
364 + 'placeholder' => __( 'Copied', 'ever-compare' ),
365 + 'type' => 'text',
366 + 'class' => 'depend_enable_shareable_link'
367 + ),
368 +
369 + array(
370 + 'name' => 'limit',
371 + 'label' => esc_html__( 'Limit', 'ever-compare' ),
372 + 'desc' => esc_html__( 'You can manage your maximum compare quantity from here.', 'ever-compare' ),
373 + 'type' => 'number',
374 + 'min' => 1,
375 + 'max' => 1500,
376 + 'step' => 1,
377 + 'default' => 10,
378 + 'sanitize_callback' => 'floatval',
379 + ),
380 +
381 + array(
120 382 'name' => 'show_fields',
121 383 'label' => __('Show fields in table', 'ever-compare'),
122 384 'desc' => __('Choose which fields should be presented on the product compare page with table.', 'ever-compare'),
123 385 'type' => 'multicheckshort',
@@ -123,9 +385,9 @@
123 385 'type' => 'multicheckshort',
124 386 'options' => ever_compare_get_available_attributes(),
125 387 'default' => [
126 388 'title' => esc_html__( 'title', 'ever-compare' ),
127 - 'ratting' => esc_html__( 'ratting', 'ever-compare' ),
389 + 'ratting' => esc_html__( 'Rating', 'ever-compare' ),
128 390 'price' => esc_html__( 'price', 'ever-compare' ),
129 391 'add_to_cart' => esc_html__( 'add_to_cart', 'ever-compare' ),
130 392 'description' => esc_html__( 'description', 'ever-compare' ),
131 393 'availability' => esc_html__( 'availability', 'ever-compare' ),
@@ -135,8 +397,16 @@
135 397 ],
136 398 ),
137 399
138 400 array(
401 + 'name' => 'table_heading_section_title',
402 + 'headding'=> esc_html__( 'Custom heading', 'ever-compare' ),
403 + 'type' => 'title',
404 + 'size' => 'margin_0 regular',
405 + 'class' => 'element_section_title_area',
406 + ),
407 +
408 + array(
139 409 'name' => 'table_heading',
140 410 'label' => __( 'Fields heading text', 'ever-compare' ),
141 411 'desc' => __( 'You can change heading text from here.', 'ever-compare' ),
142 412 'type' => 'multitext',
@@ -143,8 +413,15 @@
143 413 'options' => ever_compare_table_heading()
144 414 ),
145 415
146 416 array(
417 + 'name' => 'reached_max_limit_message',
418 + 'label' => __('Reached maximum limit message', 'ever-compare'),
419 + 'desc' => __('You can manage message for maximum product added in the compare table.', 'ever-compare'),
420 + 'type' => 'textarea'
421 + ),
422 +
423 + array(
147 424 'name' => 'empty_table_text',
148 425 'label' => __('Empty compare page text', 'ever-compare'),
149 426 'desc' => __('Text will be displayed if user don\'t add any products to compare', 'ever-compare'),
150 427 'type' => 'textarea'
@@ -166,9 +443,13 @@
166 443 'type' => 'multitext',
167 444 'options' =>[
168 445 'width' => esc_html__( 'Width', 'ever-compare' ),
169 446 'height' => esc_html__( 'Height', 'ever-compare' ),
170 - ]
447 + ],
448 + 'default' => [
449 + 'width' => 300,
450 + 'height' => 300,
451 + ],
171 452 ),
172 453
173 454 array(
174 455 'name' => 'hard_crop',
@@ -178,8 +459,290 @@
178 459 ),
179 460
180 461 ),
181 462
463 + 'ever_compare_style_tabs' => array(
464 +
465 + array(
466 + 'name' => 'button_style',
467 + 'label' => esc_html__( 'Button style', 'ever-compare' ),
468 + 'desc' => esc_html__( 'Choose a style for the compare button from here.', 'ever-compare' ),
469 + 'type' => 'select',
470 + 'default' => 'theme',
471 + 'options' => [
472 + 'default' => esc_html__( 'Default', 'ever-compare' ),
473 + 'theme' => esc_html__( 'Theme', 'ever-compare' ),
474 + 'custom' => esc_html__( 'Custom', 'ever-compare' ),
475 + ]
476 + ),
477 +
478 + array(
479 + 'name' => 'table_style',
480 + 'label' => esc_html__( 'Table style', 'ever-compare' ),
481 + 'desc' => esc_html__( 'Choose a table style from here.', 'ever-compare' ),
482 + 'type' => 'select',
483 + 'default' => 'default',
484 + 'options' => [
485 + 'default' => esc_html__( 'Default', 'ever-compare' ),
486 + 'custom' => esc_html__( 'Custom', 'ever-compare' ),
487 + ]
488 + ),
489 +
490 + array(
491 + 'name' => 'notification_style',
492 + 'label' => __( 'Notification style', 'ever-compare' ),
493 + 'desc' => __( 'Choose a style for the compare notification here.', 'ever-compare' ),
494 + 'type' => 'select',
495 + 'default' => 'default',
496 + 'options' => [
497 + 'default' => esc_html__( 'Default', 'ever-compare' ),
498 + 'custom' => esc_html__( 'Custom', 'ever-compare' ),
499 + ]
500 + ),
501 +
502 + array(
503 + 'name' => 'button_custom_style_area_title',
504 + 'headding'=> esc_html__( 'Button custom style', 'ever-compare' ),
505 + 'type' => 'title',
506 + 'size' => 'margin_0 regular',
507 + 'class' => 'depend_button_custom_style element_section_title_area',
508 + ),
509 +
510 + array(
511 + 'name' => 'button_color',
512 + 'label' => esc_html__( 'Color', 'ever-compare' ),
513 + 'desc' => wp_kses_post( __( 'Set the color of the button.', 'ever-compare' ) ),
514 + 'type' => 'color',
515 + 'class' => 'depend_button_custom_style',
516 + ),
517 +
518 + array(
519 + 'name' => 'button_hover_color',
520 + 'label' => esc_html__( 'Hover Color', 'ever-compare' ),
521 + 'desc' => wp_kses_post( __( 'Set the hover color of the button.', 'ever-compare' ) ),
522 + 'type' => 'color',
523 + 'class' => 'depend_button_custom_style',
524 + ),
525 +
526 + array(
527 + 'name' => 'background_color',
528 + 'label' => esc_html__( 'Background Color', 'ever-compare' ),
529 + 'desc' => wp_kses_post( __( 'Set the background color of the button.', 'ever-compare' ) ),
530 + 'type' => 'color',
531 + 'class' => 'depend_button_custom_style',
532 + ),
533 +
534 + array(
535 + 'name' => 'hover_background_color',
536 + 'label' => esc_html__( 'Hover Background Color', 'ever-compare' ),
537 + 'desc' => wp_kses_post( __( 'Set the hover background color of the button.', 'ever-compare' ) ),
538 + 'type' => 'color',
539 + 'class' => 'depend_button_custom_style',
540 + ),
541 +
542 + array(
543 + 'name' => 'button_custom_padding',
544 + 'label' => __( 'Padding', 'ever-compare' ),
545 + 'type' => 'dimensions',
546 + 'options' => [
547 + 'top' => esc_html__( 'Top', 'ever-compare' ),
548 + 'right' => esc_html__( 'Right', 'ever-compare' ),
549 + 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
550 + 'left' => esc_html__( 'Left', 'ever-compare' ),
551 + 'unit' => esc_html__( 'Unit', 'ever-compare' ),
552 + ],
553 + 'class' => 'depend_button_custom_style',
554 + ),
555 +
556 + array(
557 + 'name' => 'button_custom_margin',
558 + 'label' => __( 'Margin', 'ever-compare' ),
559 + 'type' => 'dimensions',
560 + 'options' => [
561 + 'top' => esc_html__( 'Top', 'ever-compare' ),
562 + 'right' => esc_html__( 'Right', 'ever-compare' ),
563 + 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
564 + 'left' => esc_html__( 'Left', 'ever-compare' ),
565 + 'unit' => esc_html__( 'Unit', 'ever-compare' ),
566 + ],
567 + 'class' => 'depend_button_custom_style',
568 + ),
569 +
570 + array(
571 + 'name' => 'button_custom_border',
572 + 'label' => __( 'Border width', 'ever-compare' ),
573 + 'type' => 'dimensions',
574 + 'options' => [
575 + 'top' => esc_html__( 'Top', 'ever-compare' ),
576 + 'right' => esc_html__( 'Right', 'ever-compare' ),
577 + 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
578 + 'left' => esc_html__( 'Left', 'ever-compare' ),
579 + 'unit' => esc_html__( 'Unit', 'ever-compare' ),
580 + ],
581 + 'class' => 'depend_button_custom_style',
582 + ),
583 + array(
584 + 'name' => 'button_custom_border_color',
585 + 'label' => esc_html__( 'Border Color', 'ever-compare' ),
586 + 'desc' => wp_kses_post( __( 'Set the border color of the button.', 'ever-compare' ) ),
587 + 'type' => 'color',
588 + 'class' => 'depend_button_custom_style',
589 + ),
590 +
591 + array(
592 + 'name' => 'button_custom_border_radius',
593 + 'label' => __( 'Border Radius', 'ever-compare' ),
594 + 'type' => 'dimensions',
595 + 'options' => [
596 + 'top' => esc_html__( 'Top', 'ever-compare' ),
597 + 'right' => esc_html__( 'Right', 'ever-compare' ),
598 + 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
599 + 'left' => esc_html__( 'Left', 'ever-compare' ),
600 + 'unit' => esc_html__( 'Unit', 'ever-compare' ),
601 + ],
602 + 'class' => 'depend_button_custom_style',
603 + ),
604 +
605 + array(
606 + 'name' => 'table_custom_style_area_title',
607 + 'headding'=> esc_html__( 'Table custom style', 'ever-compare' ),
608 + 'type' => 'title',
609 + 'size' => 'margin_0 regular',
610 + 'class' => 'depend_table_custom_style element_section_title_area',
611 + ),
612 +
613 + array(
614 + 'name' => 'table_border_color',
615 + 'label' => esc_html__( 'Border color', 'ever-compare' ),
616 + 'desc' => wp_kses_post( __( 'Set the border color of the table.', 'ever-compare' ) ),
617 + 'type' => 'color',
618 + 'class' => 'depend_table_custom_style',
619 + ),
620 +
621 + array(
622 + 'name' => 'table_column_padding',
623 + 'label' => __( 'Column Padding', 'ever-compare' ),
624 + 'type' => 'dimensions',
625 + 'options' => [
626 + 'top' => esc_html__( 'Top', 'ever-compare' ),
627 + 'right' => esc_html__( 'Right', 'ever-compare' ),
628 + 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
629 + 'left' => esc_html__( 'Left', 'ever-compare' ),
630 + 'unit' => esc_html__( 'Unit', 'ever-compare' ),
631 + ],
632 + 'class' => 'depend_table_custom_style',
633 + ),
634 +
635 + array(
636 + 'name' => 'table_event_color',
637 + 'label' => esc_html__( 'Column background color (Event)', 'ever-compare' ),
638 + 'desc' => wp_kses_post( __( 'Set the background color of the table event column.', 'ever-compare' ) ),
639 + 'type' => 'color',
640 + 'class' => 'depend_table_custom_style',
641 + ),
642 +
643 + array(
644 + 'name' => 'table_odd_color',
645 + 'label' => esc_html__( 'Column background color (Odd)', 'ever-compare' ),
646 + 'desc' => wp_kses_post( __( 'Set the background color of the table odd column.', 'ever-compare' ) ),
647 + 'type' => 'color',
648 + 'class' => 'depend_table_custom_style',
649 + ),
650 +
651 + array(
652 + 'name' => 'table_heading_event_color',
653 + 'label' => esc_html__( 'Heading color (Event)', 'ever-compare' ),
654 + 'desc' => wp_kses_post( __( 'Set the heading color of the table event column.', 'ever-compare' ) ),
655 + 'type' => 'color',
656 + 'class' => 'depend_table_custom_style',
657 + ),
658 +
659 + array(
660 + 'name' => 'table_heading_odd_color',
661 + 'label' => esc_html__( 'Heading color (Odd)', 'ever-compare' ),
662 + 'desc' => wp_kses_post( __( 'Set the heading color of the table odd column.', 'ever-compare' ) ),
663 + 'type' => 'color',
664 + 'class' => 'depend_table_custom_style',
665 + ),
666 +
667 + array(
668 + 'name' => 'table_content_event_color',
669 + 'label' => esc_html__( 'Content color (Event)', 'ever-compare' ),
670 + 'desc' => wp_kses_post( __( 'Set the content color of the table event column.', 'ever-compare' ) ),
671 + 'type' => 'color',
672 + 'class' => 'depend_table_custom_style',
673 + ),
674 +
675 + array(
676 + 'name' => 'table_content_odd_color',
677 + 'label' => esc_html__( 'Content color (Odd)', 'ever-compare' ),
678 + 'desc' => wp_kses_post( __( 'Set the content color of the table odd column.', 'ever-compare' ) ),
679 + 'type' => 'color',
680 + 'class' => 'depend_table_custom_style',
681 + ),
682 +
683 + array(
684 + 'name' => 'table_content_link_color',
685 + 'label' => esc_html__( 'Content link color', 'ever-compare' ),
686 + 'desc' => wp_kses_post( __( 'Set the content link color of the table.', 'ever-compare' ) ),
687 + 'type' => 'color',
688 + 'class' => 'depend_table_custom_style',
689 + ),
690 +
691 + array(
692 + 'name' => 'table_content_link_hover_color',
693 + 'label' => esc_html__( 'Content link hover color', 'ever-compare' ),
694 + 'desc' => wp_kses_post( __( 'Set the content link hover color of the table.', 'ever-compare' ) ),
695 + 'type' => 'color',
696 + 'class' => 'depend_table_custom_style',
697 + ),
698 +
699 + array(
700 + 'name' => 'notification_custom_style_title',
701 + 'headding'=> __( 'Notification custom style', 'ever-compare' ),
702 + 'type' => 'title',
703 + 'size' => 'margin_0 regular',
704 + 'class' => 'depend_notification_custom_style element_section_title_area',
705 + ),
706 +
707 + array(
708 + 'name' => 'notification_bg_color',
709 + 'label' => esc_html__( 'Background Color', 'ever-compare' ),
710 + 'desc' => __( 'Set the background color of the notification.', 'ever-compare' ),
711 + 'type' => 'color',
712 + 'class' => 'depend_notification_custom_style',
713 + ),
714 + array(
715 + 'name' => 'notification_border_color',
716 + 'label' => esc_html__( 'Border Color', 'ever-compare' ),
717 + 'desc' => __( 'Set the border color of the notification.', 'ever-compare' ),
718 + 'type' => 'color',
719 + 'class' => 'depend_notification_custom_style',
720 + ),
721 + array(
722 + 'name' => 'notification_text_color',
723 + 'label' => esc_html__( 'Content Color', 'ever-compare' ),
724 + 'desc' => __( 'Set the content color of the notification.', 'ever-compare' ),
725 + 'type' => 'color',
726 + 'class' => 'depend_notification_custom_style',
727 + ),
728 + array(
729 + 'name' => 'notification_btn_color',
730 + 'label' => esc_html__( 'Close Button Color', 'ever-compare' ),
731 + 'desc' => __( 'Set the close button color of the notification.', 'ever-compare' ),
732 + 'type' => 'color',
733 + 'class' => 'depend_notification_custom_style',
734 + ),
735 + array(
736 + 'name' => 'notification_btn_color_hover',
737 + 'label' => esc_html__( 'Close Button Hover Color', 'ever-compare' ),
738 + 'desc' => __( 'Set the close button hover color of the notification.', 'ever-compare' ),
739 + 'type' => 'color',
740 + 'class' => 'depend_notification_custom_style',
741 + ),
742 +
743 + ),
744 +
182 745 );
183 746
184 747 return $settings_fields;
185 748 }
@@ -193,9 +756,9 @@
193 756 echo '</div>';
194 757 }
195 758
196 759 public function save_message() {
197 - if( isset( $_GET['settings-updated'] ) ) {
760 + if( isset( $_GET['settings-updated'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
198 761 ?>
199 762 <div class="updated notice is-dismissible">
200 763 <p><strong><?php esc_html_e('Successfully Settings Saved.', 'ever-compare') ?></strong></p>
201 764 </div>