PluginProbe
Ever Compare – Products Compare Plugin for WooCommerce / 1.2.8
Ever Compare – Products Compare Plugin for WooCommerce v1.2.8
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
ever-compare / includes / classes / Admin / Admin_Fields.php

Admin_Fields.php in Ever Compare – Products Compare Plugin for WooCommerce 1.2.8, at includes/classes/Admin/Admin_Fields.php

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