PluginProbe
Ever Compare – Products Compare Plugin for WooCommerce / 1.2.3
Ever Compare – Products Compare Plugin for WooCommerce v1.2.3
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.3, at includes/classes/Admin/Admin_Fields.php

651 lines 29.8 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_tabs',
48 'title' => esc_html__( 'Button Settings', 'ever-compare' ),
49 ),
50
51 array(
52 'id' => 'ever_compare_table_settings_tabs',
53 'title' => esc_html__( 'Table Settings', 'ever-compare' )
54 ),
55 array(
56 'id' => 'ever_compare_style_tabs',
57 'title' => esc_html__( 'Style Settings', 'ever-compare' ),
58 )
59
60 );
61 return $sections;
62 }
63
64 // Options page field register
65 protected function fields_settings() {
66
67 $settings_fields = array(
68
69 'ever_compare_settings_tabs' => array(
70
71 array(
72 'name' => 'btn_show_shoppage',
73 'label' => __( 'Show button in product list page', 'ever-compare' ),
74 'desc' => __( 'Show compare button in product list page.', 'ever-compare' ),
75 'type' => 'checkbox',
76 'default' => 'off',
77 ),
78
79 array(
80 'name' => 'btn_show_productpage',
81 'label' => __( 'Show button in single product page', 'ever-compare' ),
82 'desc' => __( 'Show compare button in single product page.', 'ever-compare' ),
83 'type' => 'checkbox',
84 'default' => 'on',
85 ),
86
87 array(
88 'name' => 'shop_btn_position',
89 'label' => __( 'Shop page button position', 'ever-compare' ),
90 'desc' => __( 'You can manage compare button position in product list page.', 'ever-compare' ),
91 'type' => 'select',
92 'default' => 'after_cart_btn',
93 'options' => [
94 'before_cart_btn' => __( 'Before Add To Cart', 'ever-compare' ),
95 'after_cart_btn' => __( 'After Add To Cart', 'ever-compare' ),
96 'top_thumbnail' => __( 'Top On Image', 'ever-compare' ),
97 'use_shortcode' => __( 'Use Shortcode', 'ever-compare' ),
98 'custom_position' => __( 'Custom Position', 'ever-compare' ),
99 ],
100 ),
101
102 array(
103 'name' => 'shop_use_shortcode_message',
104 'headding'=> wp_kses_post('<code>[evercompare_button]</code> Use this shortcode into your theme/child theme to place the compare button.'),
105 'type' => 'title',
106 'size' => 'margin_0 regular',
107 'class' => 'depend_shop_btn_position_use_shortcode element_section_title_area message-info',
108 ),
109
110 array(
111 'name' => 'shop_custom_hook_message',
112 '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' ),
113 'type' => 'title',
114 'size' => 'margin_0 regular',
115 'class' => 'depend_shop_btn_position_custom_hook element_section_title_area message-info',
116 ),
117
118 array(
119 'name' => 'shop_custom_hook_name',
120 'label' => __( 'Hook name', 'ever-compare' ),
121 'desc' => __( 'e.g: woocommerce_after_shop_loop_item_title', 'ever-compare' ),
122 'type' => 'text',
123 'class' => 'depend_shop_btn_position_custom_hook'
124 ),
125
126 array(
127 'name' => 'shop_custom_hook_priority',
128 'label' => __( 'Hook priority', 'ever-compare' ),
129 'desc' => __( 'Default: 10', 'ever-compare' ),
130 'type' => 'text',
131 'class' => 'depend_shop_btn_position_custom_hook'
132 ),
133
134 array(
135 'name' => 'product_btn_position',
136 'label' => __( 'Product page button position', 'ever-compare' ),
137 'desc' => __( 'You can manage compare button position in single product page.', 'ever-compare' ),
138 'type' => 'select',
139 'default' => 'after_cart_btn',
140 'options' => [
141 'before_cart_btn' => __( 'Before Add To Cart', 'ever-compare' ),
142 'after_cart_btn' => __( 'After Add To Cart', 'ever-compare' ),
143 'after_thumbnail' => __( 'After Image', 'ever-compare' ),
144 'after_summary' => __( 'After Summary', 'ever-compare' ),
145 'use_shortcode' => __( 'Use Shortcode', 'ever-compare' ),
146 'custom_position' => __( 'Custom Position', 'ever-compare' ),
147 ],
148 ),
149
150 array(
151 'name' => 'product_use_shortcode_message',
152 'headding'=> wp_kses_post('<code>[evercompare_button]</code> Use this shortcode into your theme/child theme to place the compare button.'),
153 'type' => 'title',
154 'size' => 'margin_0 regular',
155 'class' => 'depend_product_btn_position_use_shortcode element_section_title_area message-info',
156 ),
157
158 array(
159 'name' => 'product_custom_hook_message',
160 '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' ),
161 'type' => 'title',
162 'size' => 'margin_0 regular',
163 'class' => 'depend_product_btn_position_custom_hook element_section_title_area message-info',
164 ),
165
166 array(
167 'name' => 'product_custom_hook_name',
168 'label' => __( 'Hook name', 'ever-compare' ),
169 'desc' => __( 'e.g: woocommerce_after_single_product_summary', 'ever-compare' ),
170 'type' => 'text',
171 'class' => 'depend_product_btn_position_custom_hook'
172 ),
173
174 array(
175 'name' => 'product_custom_hook_priority',
176 'label' => __( 'Hook priority', 'ever-compare' ),
177 'desc' => __( 'Default: 10', 'ever-compare' ),
178 'type' => 'text',
179 'class' => 'depend_product_btn_position_custom_hook'
180 ),
181
182 array(
183 'name' => 'open_popup',
184 'label' => __( 'Open popup', 'ever-compare' ),
185 'type' => 'checkbox',
186 'default' => 'on',
187 'desc' => __( 'You can manage the popup window from here.', 'ever-compare' ),
188 ),
189
190 array(
191 'name' => 'button_text',
192 'label' => __( 'Button text', 'ever-compare' ),
193 'desc' => __( 'Enter your compare button text.', 'ever-compare' ),
194 'type' => 'text',
195 'default' => __( 'Compare', 'ever-compare' ),
196 'placeholder' => __( 'Compare', 'ever-compare' ),
197 ),
198
199 array(
200 'name' => 'added_button_text',
201 'label' => __( 'Added button text', 'ever-compare' ),
202 'desc' => __( 'Enter your compare added button text.', 'ever-compare' ),
203 'type' => 'text',
204 'default' => __( 'Added', 'ever-compare' ),
205 'placeholder' => __( 'Added', 'ever-compare' ),
206 ),
207
208 array(
209 'name' => 'button_icon_type',
210 'label' => esc_html__( 'Button icon type', 'ever-compare' ),
211 'desc' => esc_html__( 'Choose an icon type for the compare button from here.', 'ever-compare' ),
212 'type' => 'select',
213 'default' => 'default',
214 'options' => [
215 'none' => esc_html__( 'None', 'ever-compare' ),
216 'default' => esc_html__( 'Default', 'ever-compare' ),
217 'custom' => esc_html__( 'Custom', 'ever-compare' ),
218 ]
219 ),
220
221 array(
222 'name' => 'button_custom_icon',
223 'label' => esc_html__( 'Button custom icon', 'ever-compare' ),
224 'type' => 'image_upload',
225 'options' => [
226 'button_label' => esc_html__( 'Upload', 'ever-compare' ),
227 'button_remove_label' => esc_html__( 'Remove', 'ever-compare' ),
228 ],
229 'desc' => esc_html__( 'Upload you custom icon from here.', 'ever-compare' ),
230 'class' => 'depend_button_icon_type_custom',
231 ),
232
233 array(
234 'name' => 'added_button_icon_type',
235 'label' => __( 'Added button icon type', 'ever-compare' ),
236 'desc' => __( 'Choose an icon for the compare button from here.', 'ever-compare' ),
237 'type' => 'select',
238 'default' => 'default',
239 'options' => [
240 'none' => esc_html__( 'None', 'ever-compare' ),
241 'default' => esc_html__( 'Default', 'ever-compare' ),
242 'custom' => esc_html__( 'Custom', 'ever-compare' ),
243 ]
244 ),
245
246 array(
247 'name' => 'added_button_custom_icon',
248 'label' => __( 'Added button custom icon', 'ever-compare' ),
249 'type' => 'image_upload',
250 'options' => [
251 'button_label' => esc_html__( 'Upload', 'ever-compare' ),
252 'button_remove_label' => esc_html__( 'Remove', 'ever-compare' ),
253 ],
254 'class' => 'depend_added_button_icon_type_custom',
255 ),
256
257 ),
258
259 'ever_compare_table_settings_tabs' => array(
260
261 array(
262 'name' => 'compare_page',
263 'label' => __( 'Compare page', 'ever-compare' ),
264 'desc' => wp_kses_post('Select a compare page for compare table. It should contain the shortcode <code>[evercompare_table]</code>'),
265 'type' => 'select',
266 'default' => '0',
267 'options' => ever_compare_get_post_list()
268 ),
269
270 array(
271 'name' => 'enable_shareable_link',
272 'label' => __( 'Enable shareable link', 'ever-compare' ),
273 'type' => 'checkbox',
274 'default' => 'off',
275 'desc' => __( 'If you enable this you can easily share your compare page link with specific products.', 'ever-compare' ),
276 ),
277
278 array(
279 'name' => 'linkshare_btn_pos',
280 'label' => __( 'Share link button position', 'ever-compare' ),
281 'type' => 'select',
282 'default' => 'right',
283 'options' => [
284 'left' => __('Left','ever-compare'),
285 'center' => __('Center','ever-compare'),
286 'right' => __('Right','ever-compare')
287 ],
288 'class' => 'depend_enable_shareable_link'
289 ),
290
291 array(
292 'name' => 'shareable_link_button_text',
293 'label' => __( 'Share link button text', 'ever-compare' ),
294 'placeholder' => __( 'Copy shareable link', 'ever-compare' ),
295 'type' => 'text',
296 'class' => 'depend_enable_shareable_link'
297 ),
298
299 array(
300 'name' => 'shareable_link_after_button_text',
301 'label' => __( 'Text to show after link is copied', 'ever-compare' ),
302 'placeholder' => __( 'Copied', 'ever-compare' ),
303 'type' => 'text',
304 'class' => 'depend_enable_shareable_link'
305 ),
306
307 array(
308 'name' => 'limit',
309 'label' => esc_html__( 'Limit', 'quickswish' ),
310 'desc' => esc_html__( 'You can manage your maximum compare quantity from here.', 'quickswish' ),
311 'type' => 'number',
312 'min' => 1,
313 'max' => 1500,
314 'step' => 1,
315 'default' => 10,
316 'sanitize_callback' => 'floatval',
317 ),
318
319 array(
320 'name' => 'show_fields',
321 'label' => __('Show fields in table', 'ever-compare'),
322 'desc' => __('Choose which fields should be presented on the product compare page with table.', 'ever-compare'),
323 'type' => 'multicheckshort',
324 'options' => ever_compare_get_available_attributes(),
325 'default' => [
326 'title' => esc_html__( 'title', 'ever-compare' ),
327 'ratting' => esc_html__( 'ratting', 'ever-compare' ),
328 'price' => esc_html__( 'price', 'ever-compare' ),
329 'add_to_cart' => esc_html__( 'add_to_cart', 'ever-compare' ),
330 'description' => esc_html__( 'description', 'ever-compare' ),
331 'availability' => esc_html__( 'availability', 'ever-compare' ),
332 'sku' => esc_html__( 'sku', 'ever-compare' ),
333 'weight' => esc_html__( 'weight', 'ever-compare' ),
334 'dimensions' => esc_html__( 'dimensions', 'ever-compare' ),
335 ],
336 ),
337
338 array(
339 'name' => 'table_heading_section_title',
340 'headding'=> esc_html__( 'Custom heading', 'ever-compare' ),
341 'type' => 'title',
342 'size' => 'margin_0 regular',
343 'class' => 'element_section_title_area',
344 ),
345
346 array(
347 'name' => 'table_heading',
348 'label' => __( 'Fields heading text', 'ever-compare' ),
349 'desc' => __( 'You can change heading text from here.', 'ever-compare' ),
350 'type' => 'multitext',
351 'options' => ever_compare_table_heading()
352 ),
353
354 array(
355 'name' => 'reached_max_limit_message',
356 'label' => __('Reached maximum limit message', 'ever-compare'),
357 'desc' => __('You can manage message for maximum product added in the compare table.', 'ever-compare'),
358 'type' => 'textarea'
359 ),
360
361 array(
362 'name' => 'empty_table_text',
363 'label' => __('Empty compare page text', 'ever-compare'),
364 'desc' => __('Text will be displayed if user don\'t add any products to compare', 'ever-compare'),
365 'type' => 'textarea'
366 ),
367
368 array(
369 'name' => 'shop_button_text',
370 'label' => __( 'Return to shop button text', 'ever-compare' ),
371 'desc' => __( 'Enter your return to shop button text.', 'ever-compare' ),
372 'type' => 'text',
373 'default' => __( 'Return to shop', 'ever-compare' ),
374 'placeholder' => __( 'Return to shop', 'ever-compare' ),
375 ),
376
377 array(
378 'name' => 'image_size',
379 'label' => __( 'Image size', 'ever-compare' ),
380 'desc' => __( 'Enter your required image size.', 'ever-compare' ),
381 'type' => 'multitext',
382 'options' =>[
383 'width' => esc_html__( 'Width', 'ever-compare' ),
384 'height' => esc_html__( 'Height', 'ever-compare' ),
385 ],
386 'default' => [
387 'width' => 300,
388 'height' => 300,
389 ],
390 ),
391
392 array(
393 'name' => 'hard_crop',
394 'label' => __( 'Image Hard Crop', 'ever-compare' ),
395 'type' => 'checkbox',
396 'default' => 'on',
397 ),
398
399 ),
400
401 'ever_compare_style_tabs' => array(
402
403 array(
404 'name' => 'button_style',
405 'label' => esc_html__( 'Button style', 'ever-compare' ),
406 'desc' => esc_html__( 'Choose a style for the compare button from here.', 'ever-compare' ),
407 'type' => 'select',
408 'default' => 'theme',
409 'options' => [
410 'default' => esc_html__( 'Default', 'ever-compare' ),
411 'theme' => esc_html__( 'Theme', 'ever-compare' ),
412 'custom' => esc_html__( 'Custom', 'ever-compare' ),
413 ]
414 ),
415
416 array(
417 'name' => 'table_style',
418 'label' => esc_html__( 'Table style', 'ever-compare' ),
419 'desc' => esc_html__( 'Choose a table style from here.', 'ever-compare' ),
420 'type' => 'select',
421 'default' => 'default',
422 'options' => [
423 'default' => esc_html__( 'Default', 'ever-compare' ),
424 'custom' => esc_html__( 'Custom', 'ever-compare' ),
425 ]
426 ),
427
428 array(
429 'name' => 'button_custom_style_area_title',
430 'headding'=> esc_html__( 'Button custom style', 'ever-compare' ),
431 'type' => 'title',
432 'size' => 'margin_0 regular',
433 'class' => 'depend_button_custom_style element_section_title_area',
434 ),
435
436 array(
437 'name' => 'button_color',
438 'label' => esc_html__( 'Color', 'ever-compare' ),
439 'desc' => wp_kses_post( 'Set the color of the button.', 'ever-compare' ),
440 'type' => 'color',
441 'class' => 'depend_button_custom_style',
442 ),
443
444 array(
445 'name' => 'button_hover_color',
446 'label' => esc_html__( 'Hover Color', 'ever-compare' ),
447 'desc' => wp_kses_post( 'Set the hover color of the button.', 'ever-compare' ),
448 'type' => 'color',
449 'class' => 'depend_button_custom_style',
450 ),
451
452 array(
453 'name' => 'background_color',
454 'label' => esc_html__( 'Background Color', 'ever-compare' ),
455 'desc' => wp_kses_post( 'Set the background color of the button.', 'ever-compare' ),
456 'type' => 'color',
457 'class' => 'depend_button_custom_style',
458 ),
459
460 array(
461 'name' => 'hover_background_color',
462 'label' => esc_html__( 'Hover Background Color', 'ever-compare' ),
463 'desc' => wp_kses_post( 'Set the hover background color of the button.', 'ever-compare' ),
464 'type' => 'color',
465 'class' => 'depend_button_custom_style',
466 ),
467
468 array(
469 'name' => 'button_custom_padding',
470 'label' => __( 'Padding', 'ever-compare' ),
471 'type' => 'dimensions',
472 'options' => [
473 'top' => esc_html__( 'Top', 'ever-compare' ),
474 'right' => esc_html__( 'Right', 'ever-compare' ),
475 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
476 'left' => esc_html__( 'Left', 'ever-compare' ),
477 'unit' => esc_html__( 'Unit', 'ever-compare' ),
478 ],
479 'class' => 'depend_button_custom_style',
480 ),
481
482 array(
483 'name' => 'button_custom_margin',
484 'label' => __( 'Margin', 'ever-compare' ),
485 'type' => 'dimensions',
486 'options' => [
487 'top' => esc_html__( 'Top', 'ever-compare' ),
488 'right' => esc_html__( 'Right', 'ever-compare' ),
489 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
490 'left' => esc_html__( 'Left', 'ever-compare' ),
491 'unit' => esc_html__( 'Unit', 'ever-compare' ),
492 ],
493 'class' => 'depend_button_custom_style',
494 ),
495
496 array(
497 'name' => 'button_custom_border',
498 'label' => __( 'Border width', 'ever-compare' ),
499 'type' => 'dimensions',
500 'options' => [
501 'top' => esc_html__( 'Top', 'ever-compare' ),
502 'right' => esc_html__( 'Right', 'ever-compare' ),
503 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
504 'left' => esc_html__( 'Left', 'ever-compare' ),
505 'unit' => esc_html__( 'Unit', 'ever-compare' ),
506 ],
507 'class' => 'depend_button_custom_style',
508 ),
509 array(
510 'name' => 'button_custom_border_color',
511 'label' => esc_html__( 'Border Color', 'ever-compare' ),
512 'desc' => wp_kses_post( 'Set the button color of the button.', 'ever-compare' ),
513 'type' => 'color',
514 'class' => 'depend_button_custom_style',
515 ),
516
517 array(
518 'name' => 'button_custom_border_radius',
519 'label' => __( 'Border Radius', 'ever-compare' ),
520 'type' => 'dimensions',
521 'options' => [
522 'top' => esc_html__( 'Top', 'ever-compare' ),
523 'right' => esc_html__( 'Right', 'ever-compare' ),
524 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
525 'left' => esc_html__( 'Left', 'ever-compare' ),
526 'unit' => esc_html__( 'Unit', 'ever-compare' ),
527 ],
528 'class' => 'depend_button_custom_style',
529 ),
530
531 array(
532 'name' => 'table_custom_style_area_title',
533 'headding'=> esc_html__( 'Table custom style', 'ever-compare' ),
534 'type' => 'title',
535 'size' => 'margin_0 regular',
536 'class' => 'depend_table_custom_style element_section_title_area',
537 ),
538
539 array(
540 'name' => 'table_border_color',
541 'label' => esc_html__( 'Border color', 'ever-compare' ),
542 'desc' => wp_kses_post( 'Set the border color of the table.', 'ever-compare' ),
543 'type' => 'color',
544 'class' => 'depend_table_custom_style',
545 ),
546
547 array(
548 'name' => 'table_column_padding',
549 'label' => __( 'Column Padding', 'ever-compare' ),
550 'type' => 'dimensions',
551 'options' => [
552 'top' => esc_html__( 'Top', 'ever-compare' ),
553 'right' => esc_html__( 'Right', 'ever-compare' ),
554 'bottom'=> esc_html__( 'Bottom', 'ever-compare' ),
555 'left' => esc_html__( 'Left', 'ever-compare' ),
556 'unit' => esc_html__( 'Unit', 'ever-compare' ),
557 ],
558 'class' => 'depend_table_custom_style',
559 ),
560
561 array(
562 'name' => 'table_event_color',
563 'label' => esc_html__( 'Column background color (Event)', 'ever-compare' ),
564 'desc' => wp_kses_post( 'Set the background color of the table event column.', 'ever-compare' ),
565 'type' => 'color',
566 'class' => 'depend_table_custom_style',
567 ),
568
569 array(
570 'name' => 'table_odd_color',
571 'label' => esc_html__( 'Column background color (Odd)', 'ever-compare' ),
572 'desc' => wp_kses_post( 'Set the background color of the table odd column.', 'ever-compare' ),
573 'type' => 'color',
574 'class' => 'depend_table_custom_style',
575 ),
576
577 array(
578 'name' => 'table_heading_event_color',
579 'label' => esc_html__( 'Heading color (Event)', 'ever-compare' ),
580 'desc' => wp_kses_post( 'Set the heading color of the table event column.', 'ever-compare' ),
581 'type' => 'color',
582 'class' => 'depend_table_custom_style',
583 ),
584
585 array(
586 'name' => 'table_heading_odd_color',
587 'label' => esc_html__( 'Heading color (Odd)', 'ever-compare' ),
588 'desc' => wp_kses_post( 'Set the heading color of the table odd column.', 'ever-compare' ),
589 'type' => 'color',
590 'class' => 'depend_table_custom_style',
591 ),
592
593 array(
594 'name' => 'table_content_event_color',
595 'label' => esc_html__( 'Content color (Event)', 'ever-compare' ),
596 'desc' => wp_kses_post( 'Set the content color of the table event column.', 'ever-compare' ),
597 'type' => 'color',
598 'class' => 'depend_table_custom_style',
599 ),
600
601 array(
602 'name' => 'table_content_odd_color',
603 'label' => esc_html__( 'Content color (Odd)', 'ever-compare' ),
604 'desc' => wp_kses_post( 'Set the content color of the table odd column.', 'ever-compare' ),
605 'type' => 'color',
606 'class' => 'depend_table_custom_style',
607 ),
608
609 array(
610 'name' => 'table_content_link_color',
611 'label' => esc_html__( 'Content link color', 'ever-compare' ),
612 'desc' => wp_kses_post( 'Set the content link color of the table.', 'ever-compare' ),
613 'type' => 'color',
614 'class' => 'depend_table_custom_style',
615 ),
616
617 array(
618 'name' => 'table_content_link_hover_color',
619 'label' => esc_html__( 'Content link hover color', 'ever-compare' ),
620 'desc' => wp_kses_post( 'Set the content link hover color of the table.', 'ever-compare' ),
621 'type' => 'color',
622 'class' => 'depend_table_custom_style',
623 ),
624
625 ),
626
627 );
628
629 return $settings_fields;
630 }
631
632 public function plugin_page() {
633 echo '<div class="wrap">';
634 echo '<h2>'.esc_html__( 'Compare Settings','ever-compare' ).'</h2>';
635 $this->save_message();
636 $this->settings_api->show_navigation();
637 $this->settings_api->show_forms();
638 echo '</div>';
639 }
640
641 public function save_message() {
642 if( isset( $_GET['settings-updated'] ) ) {
643 ?>
644 <div class="updated notice is-dismissible">
645 <p><strong><?php esc_html_e('Successfully Settings Saved.', 'ever-compare') ?></strong></p>
646 </div>
647 <?php
648 }
649 }
650
651 }