PluginProbe
Filter Everything — WordPress & WooCommerce Filters / 1.2.4
Filter Everything — WordPress & WooCommerce Filters v1.2.4
1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2.2 1.9.2.1 trunk 1.2.1 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.1 1.4.4 1.4.5 1.4.8 1.4.9 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 All 52 releases
filter-everything / src / Settings / Tabs / ExperimentalTab.php

ExperimentalTab.php in Filter Everything — WordPress & WooCommerce Filters 1.2.4, at src/Settings/Tabs/ExperimentalTab.php

105 lines 4.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FilterEverything\Filter;
4
5 if ( ! defined('WPINC') ) {
6 wp_die();
7 }
8
9 class ExperimentalTab extends BaseSettings
10 {
11 protected $page = 'wpc-filter-experimental-settings';
12
13 protected $group = 'wpc_filter_experimental';
14
15 protected $optionName = 'wpc_filter_experimental';
16
17 public function init()
18 {
19 add_action('admin_init', array($this, 'initSettings'));
20 }
21
22 public function initSettings()
23 {
24 register_setting($this->group, $this->optionName);
25
26 $settings = array(
27 'ajax_settings' => array(
28 'label' => esc_html__('AJAX', 'filter-everything'),
29 'fields' => array(
30 'use_loader' => array(
31 'type' => 'checkbox',
32 'title' => esc_html__('Show AJAX loading icon (on desktop only)', 'filter-everything'),
33 'id' => 'use_loader',
34 'label' => esc_html__('Show icon', 'filter-everything'),
35 ),
36 'use_wait_cursor' => array(
37 'type' => 'checkbox',
38 'title' => esc_html__('Use the Wait Cursor (on desktop only)', 'filter-everything'),
39 'id' => 'use_wait_cursor',
40 'label' => esc_html__('Wait Cursor for AJAX', 'filter-everything'),
41 ),
42 'dark_overlay' => array(
43 'type' => 'checkbox',
44 'title' => esc_html__('Dark Overlay (on desktop only)', 'filter-everything'),
45 'id' => 'dark_overlay',
46 'label' => esc_html__('Use dark transparent overlay instead of white', 'filter-everything'),
47 ),
48 'auto_scroll' => array(
49 'type' => 'checkbox',
50 'title' => esc_html__('Smart Auto Scroll (on desktop only)', 'filter-everything'),
51 'id' => 'auto_scroll',
52 'label' => esc_html__('Automatically Scroll to the top of posts grid', 'filter-everything'),
53 )
54 )
55 ),
56 'layout_settings' => array(
57 'label' => esc_html__('Layout settings', 'filter-everything'),
58 'fields' => array(
59 'styled_inputs' => array(
60 'type' => 'checkbox',
61 'title' => esc_html__('Styled inputs', 'filter-everything'),
62 'id' => 'styled_inputs',
63 'label' => esc_html__('Use styled inputs', 'filter-everything'),
64 ),
65 'select2_dropdowns' => array(
66 'type' => 'checkbox',
67 'title' => esc_html__('Improved dropdowns', 'filter-everything'),
68 'id' => 'styled_inputs',
69 'label' => esc_html__('Use improved dropdowns instead of regular ones (jQuery Select2)', 'filter-everything'),
70 ),
71 )
72 ),
73 'customization' => array(
74 'label' => esc_html__('Customization', 'filter-everything'),
75 'fields' => array(
76 'custom_css' => array(
77 'type' => 'textarea',
78 'title' => esc_html__('Custom CSS', 'filter-everything'),
79 'id' => 'custom_css',
80 'label' => ''
81 )
82 )
83 )
84 );
85
86 $settings = apply_filters('wpc_experimental_filters_settings', $settings);
87
88 $this->registerSettings($settings, $this->page, $this->optionName);
89 }
90
91 public function getLabel()
92 {
93 return esc_html__('Experimental', 'filter-everything');
94 }
95
96 public function getName()
97 {
98 return 'experimental';
99 }
100
101 public function valid()
102 {
103 return true;
104 }
105 }