← All changes
|
includes/Admin/Customizer/Sections/LiveSearch.php
+1446
-4733
4.9.2
→
3.5.3
View file →
| @@ -10,4918 +10,1631 @@ | ||
| 10 | 10 | use WPDeveloper\BetterDocs\Admin\Customizer\Controls\DimensionControl; |
| 11 | 11 | use WPDeveloper\BetterDocs\Admin\Customizer\Controls\SeparatorControl; |
| 12 | 12 | use WPDeveloper\BetterDocs\Admin\Customizer\Controls\AlphaColorControl; |
| 13 | 13 | use WPDeveloper\BetterDocs\Admin\Customizer\Controls\RangeValueControl; |
| 14 | -use WPDeveloper\BetterDocs\Admin\Customizer\Controls\RadioImageControl; | |
| 15 | -use WPDeveloper\BetterDocs\Admin\Customizer\Controls\MultiDimensionControl; | |
| 16 | 14 | |
| 17 | 15 | class LiveSearch extends Section { |
| 18 | - /** | |
| 19 | - * Section Priority | |
| 20 | - * @var int | |
| 21 | - */ | |
| 22 | - protected $priority = 500; | |
| 16 | + /** | |
| 17 | + * Section Priority | |
| 18 | + * @var int | |
| 19 | + */ | |
| 20 | + protected $priority = 500; | |
| 23 | 21 | |
| 24 | - /** | |
| 25 | - * Get the section id. | |
| 26 | - * @return string | |
| 27 | - */ | |
| 28 | - public function get_id() { | |
| 29 | - return 'betterdocs_live_search_settings'; | |
| 30 | - } | |
| 22 | + /** | |
| 23 | + * Get the section id. | |
| 24 | + * @return string | |
| 25 | + */ | |
| 26 | + public function get_id() { | |
| 27 | + return 'betterdocs_live_search_settings'; | |
| 28 | + } | |
| 31 | 29 | |
| 32 | - /** | |
| 33 | - * Get the title of the section. | |
| 34 | - * @return string | |
| 35 | - */ | |
| 36 | - public function get_title() { | |
| 37 | - return __( 'Live Search', 'betterdocs' ); | |
| 38 | - } | |
| 30 | + /** | |
| 31 | + * Get the title of the section. | |
| 32 | + * @return string | |
| 33 | + */ | |
| 34 | + public function get_title() { | |
| 35 | + return __( 'Live Search', 'betterdocs' ); | |
| 36 | + } | |
| 39 | 37 | |
| 40 | - public function betterdocs_search_layout_select() { | |
| 41 | - $this->customizer->add_setting( | |
| 42 | - 'betterdocs_search_layout_select', | |
| 43 | - [ | |
| 44 | - 'default' => $this->defaults['betterdocs_search_layout_select'], | |
| 45 | - 'capability' => 'edit_theme_options', | |
| 46 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 47 | - ] | |
| 48 | - ); | |
| 38 | + public function search_heading_switch() { | |
| 39 | + $this->customizer->add_setting( 'betterdocs_live_search_heading_switch', [ | |
| 40 | + 'default' => $this->defaults['betterdocs_live_search_heading_switch'], | |
| 41 | + 'capability' => 'edit_theme_options' | |
| 49 | 42 | |
| 50 | - $this->customizer->add_control( | |
| 51 | - new RadioImageControl( | |
| 52 | - $this->customizer, | |
| 53 | - 'betterdocs_search_layout_select', | |
| 54 | - [ | |
| 55 | - 'type' => 'betterdocs-radio-image', | |
| 56 | - 'settings' => 'betterdocs_search_layout_select', | |
| 57 | - 'section' => 'betterdocs_live_search_settings', | |
| 58 | - 'label' => __( 'Select Search Layout', 'betterdocs' ), | |
| 59 | - 'choices' => [ | |
| 60 | - 'layout-2' => [ | |
| 61 | - 'label' => __( 'Modal Layout', 'betterdocs' ), | |
| 62 | - 'image' => $this->assets->icon( 'customizer/search/layout-2.png', true ), | |
| 63 | - 'url' => 'https://betterdocs.co/upgrade' | |
| 64 | - ], | |
| 65 | - 'layout-1' => [ | |
| 66 | - 'label' => __( 'Classic Layout', 'betterdocs' ), | |
| 67 | - 'image' => $this->assets->icon( 'customizer/search/layout-1.png', true ) | |
| 68 | - ] | |
| 69 | - ], | |
| 70 | - 'priority' => 499 | |
| 71 | - ] | |
| 72 | - ) | |
| 73 | - ); | |
| 74 | - } | |
| 43 | + ] ); | |
| 75 | 44 | |
| 76 | - public function search_heading_switch() { | |
| 77 | - $this->customizer->add_setting( | |
| 78 | - 'betterdocs_live_search_heading_switch', | |
| 79 | - [ | |
| 80 | - 'default' => $this->defaults['betterdocs_live_search_heading_switch'], | |
| 81 | - 'capability' => 'edit_theme_options' | |
| 45 | + $this->customizer->add_control( new ToggleControl( | |
| 46 | + $this->customizer, 'betterdocs_live_search_heading_switch', [ | |
| 47 | + 'label' => __( 'Search Heading', 'betterdocs' ), | |
| 48 | + 'section' => 'betterdocs_live_search_settings', | |
| 49 | + 'settings' => 'betterdocs_live_search_heading_switch', | |
| 50 | + 'type' => 'light', // light, ios, flat | |
| 51 | + 'priority' => 501 | |
| 52 | + ] ) | |
| 53 | + ); | |
| 54 | + } | |
| 82 | 55 | |
| 83 | - ] | |
| 84 | - ); | |
| 56 | + public function search_heading() { | |
| 57 | + $this->customizer->add_setting( 'betterdocs_live_search_heading', [ | |
| 58 | + 'default' => $this->defaults['betterdocs_live_search_heading'], | |
| 59 | + 'capability' => 'edit_theme_options', | |
| 60 | + 'sanitize_callback' => 'esc_html' | |
| 61 | + ] ); | |
| 85 | 62 | |
| 86 | - $this->customizer->add_control( | |
| 87 | - new ToggleControl( | |
| 88 | - $this->customizer, | |
| 89 | - 'betterdocs_live_search_heading_switch', | |
| 90 | - [ | |
| 91 | - 'label' => __( 'Search Heading', 'betterdocs' ), | |
| 92 | - 'section' => 'betterdocs_live_search_settings', | |
| 93 | - 'settings' => 'betterdocs_live_search_heading_switch', | |
| 94 | - 'type' => 'light', // light, ios, flat | |
| 95 | - 'priority' => 501 | |
| 96 | - ] | |
| 97 | - ) | |
| 98 | - ); | |
| 99 | - } | |
| 63 | + $this->customizer->add_control( | |
| 64 | + new SelectControl( | |
| 65 | + $this->customizer, | |
| 66 | + 'betterdocs_live_search_heading', | |
| 67 | + [ | |
| 68 | + 'label' => __( 'Heading', 'betterdocs' ), | |
| 69 | + 'section' => 'betterdocs_live_search_settings', | |
| 70 | + 'settings' => 'betterdocs_live_search_heading', | |
| 71 | + 'type' => 'text', | |
| 72 | + 'priority' => 502 | |
| 73 | + ] | |
| 74 | + ) | |
| 75 | + ); | |
| 76 | + } | |
| 100 | 77 | |
| 101 | - public function search_heading() { | |
| 102 | - $this->customizer->add_setting( | |
| 103 | - 'betterdocs_live_search_heading', | |
| 104 | - [ | |
| 105 | - 'default' => $this->defaults['betterdocs_live_search_heading'], | |
| 106 | - 'capability' => 'edit_theme_options', | |
| 107 | - 'sanitize_callback' => 'esc_html' | |
| 108 | - ] | |
| 109 | - ); | |
| 78 | + public function heading_tag() { | |
| 79 | + $this->customizer->add_setting( 'betterdocs_live_search_heading_tag', [ | |
| 80 | + 'default' => $this->defaults['betterdocs_live_search_heading_tag'], | |
| 81 | + 'capability' => 'edit_theme_options', | |
| 82 | + 'sanitize_callback' => [$this->sanitizer, 'select'] | |
| 83 | + ] ); | |
| 110 | 84 | |
| 111 | - $this->customizer->add_control( | |
| 112 | - new SelectControl( | |
| 113 | - $this->customizer, | |
| 114 | - 'betterdocs_live_search_heading', | |
| 115 | - [ | |
| 116 | - 'label' => __( 'Heading', 'betterdocs' ), | |
| 117 | - 'section' => 'betterdocs_live_search_settings', | |
| 118 | - 'settings' => 'betterdocs_live_search_heading', | |
| 119 | - 'type' => 'text', | |
| 120 | - 'priority' => 502 | |
| 121 | - ] | |
| 122 | - ) | |
| 123 | - ); | |
| 124 | - } | |
| 85 | + $this->customizer->add_control( | |
| 86 | + new WP_Customize_Control( | |
| 87 | + $this->customizer, | |
| 88 | + 'betterdocs_live_search_heading_tag', | |
| 89 | + [ | |
| 90 | + 'label' => __( 'Heading Tags', 'betterdocs' ), | |
| 91 | + 'section' => 'betterdocs_live_search_settings', | |
| 92 | + 'settings' => 'betterdocs_live_search_heading_tag', | |
| 93 | + 'type' => 'select', | |
| 94 | + 'choices' => [ | |
| 95 | + 'h1' => 'h1', | |
| 96 | + 'h2' => 'h2', | |
| 97 | + 'h3' => 'h3', | |
| 98 | + 'h4' => 'h4', | |
| 99 | + 'h5' => 'h5', | |
| 100 | + 'h6' => 'h6', | |
| 101 | + 'p' => 'p' | |
| 102 | + ], | |
| 103 | + 'priority' => 502 | |
| 104 | + ] | |
| 105 | + ) | |
| 106 | + ); | |
| 107 | + } | |
| 125 | 108 | |
| 126 | - public function heading_tag() { | |
| 127 | - $this->customizer->add_setting( | |
| 128 | - 'betterdocs_live_search_heading_tag', | |
| 129 | - [ | |
| 130 | - 'default' => $this->defaults['betterdocs_live_search_heading_tag'], | |
| 131 | - 'capability' => 'edit_theme_options', | |
| 132 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 133 | - ] | |
| 134 | - ); | |
| 109 | + public function heading_font_size() { | |
| 110 | + $this->customizer->add_setting( 'betterdocs_live_search_heading_font_size', [ | |
| 111 | + 'default' => $this->defaults['betterdocs_live_search_heading_font_size'], | |
| 112 | + 'capability' => 'edit_theme_options', | |
| 113 | + 'transport' => 'postMessage', | |
| 114 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 135 | 115 | |
| 136 | - $this->customizer->add_control( | |
| 137 | - new WP_Customize_Control( | |
| 138 | - $this->customizer, | |
| 139 | - 'betterdocs_live_search_heading_tag', | |
| 140 | - [ | |
| 141 | - 'label' => __( 'Heading Tags', 'betterdocs' ), | |
| 142 | - 'section' => 'betterdocs_live_search_settings', | |
| 143 | - 'settings' => 'betterdocs_live_search_heading_tag', | |
| 144 | - 'type' => 'select', | |
| 145 | - 'choices' => [ | |
| 146 | - 'h1' => 'h1', | |
| 147 | - 'h2' => 'h2', | |
| 148 | - 'h3' => 'h3', | |
| 149 | - 'h4' => 'h4', | |
| 150 | - 'h5' => 'h5', | |
| 151 | - 'h6' => 'h6', | |
| 152 | - 'p' => 'p' | |
| 153 | - ], | |
| 154 | - 'priority' => 502 | |
| 155 | - ] | |
| 156 | - ) | |
| 157 | - ); | |
| 158 | - } | |
| 116 | + ] ); | |
| 159 | 117 | |
| 160 | - public function heading_font_size() { | |
| 161 | - $this->customizer->add_setting( | |
| 162 | - 'betterdocs_live_search_heading_font_size', | |
| 163 | - [ | |
| 164 | - 'default' => $this->defaults['betterdocs_live_search_heading_font_size'], | |
| 165 | - 'capability' => 'edit_theme_options', | |
| 166 | - 'transport' => 'postMessage', | |
| 167 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 118 | + $this->customizer->add_control( new RangeValueControl( | |
| 119 | + $this->customizer, 'betterdocs_live_search_heading_font_size', [ | |
| 120 | + 'type' => 'betterdocs-range-value', | |
| 121 | + 'section' => 'betterdocs_live_search_settings', | |
| 122 | + 'settings' => 'betterdocs_live_search_heading_font_size', | |
| 123 | + 'label' => __( 'Heading Font Size', 'betterdocs' ), | |
| 124 | + 'input_attrs' => [ | |
| 125 | + 'class' => '', | |
| 126 | + 'min' => 0, | |
| 127 | + 'max' => 100, | |
| 128 | + 'step' => 1, | |
| 129 | + 'suffix' => 'px' //optional suffix | |
| 130 | + ], | |
| 131 | + 'priority' => 503 | |
| 132 | + ] ) | |
| 133 | + ); | |
| 134 | + } | |
| 168 | 135 | |
| 169 | - ] | |
| 170 | - ); | |
| 136 | + public function heading_font_color() { | |
| 137 | + $this->customizer->add_setting( 'betterdocs_live_search_heading_font_color', [ | |
| 138 | + 'default' => $this->defaults['betterdocs_live_search_heading_font_color'], | |
| 139 | + 'capability' => 'edit_theme_options', | |
| 140 | + 'transport' => 'postMessage', | |
| 141 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 142 | + ] ); | |
| 171 | 143 | |
| 172 | - $this->customizer->add_control( | |
| 173 | - new RangeValueControl( | |
| 174 | - $this->customizer, | |
| 175 | - 'betterdocs_live_search_heading_font_size', | |
| 176 | - [ | |
| 177 | - 'type' => 'betterdocs-range-value', | |
| 178 | - 'section' => 'betterdocs_live_search_settings', | |
| 179 | - 'settings' => 'betterdocs_live_search_heading_font_size', | |
| 180 | - 'label' => __( 'Heading Font Size', 'betterdocs' ), | |
| 181 | - 'input_attrs' => [ | |
| 182 | - 'class' => '', | |
| 183 | - 'min' => 0, | |
| 184 | - 'max' => 100, | |
| 185 | - 'step' => 1, | |
| 186 | - 'suffix' => 'px' //optional suffix | |
| 187 | - ], | |
| 188 | - 'priority' => 503 | |
| 189 | - ] | |
| 190 | - ) | |
| 191 | - ); | |
| 192 | - } | |
| 144 | + $this->customizer->add_control( | |
| 145 | + new AlphaColorControl( | |
| 146 | + $this->customizer, | |
| 147 | + 'betterdocs_live_search_heading_font_color', | |
| 148 | + [ | |
| 149 | + 'label' => __( 'Heading Color', 'betterdocs' ), | |
| 150 | + 'section' => 'betterdocs_live_search_settings', | |
| 151 | + 'settings' => 'betterdocs_live_search_heading_font_color', | |
| 152 | + 'priority' => 504 | |
| 153 | + ] | |
| 154 | + ) | |
| 155 | + ); | |
| 156 | + } | |
| 193 | 157 | |
| 194 | - public function betterdocs_live_search_heading_font_size_layout_2() { | |
| 195 | - $this->customizer->add_setting( | |
| 196 | - 'betterdocs_live_search_heading_font_size_layout_2', | |
| 197 | - [ | |
| 198 | - 'default' => $this->defaults['betterdocs_live_search_heading_font_size_layout_2'], | |
| 199 | - 'capability' => 'edit_theme_options', | |
| 200 | - 'transport' => 'postMessage', | |
| 201 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 158 | + public function heading_margin() { | |
| 159 | + $this->customizer->add_setting( 'betterdocs_search_heading_margin', [ | |
| 160 | + 'default' => $this->defaults['betterdocs_search_heading_margin'], | |
| 161 | + 'capability' => 'edit_theme_options', | |
| 162 | + 'transport' => 'postMessage', | |
| 163 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 202 | 164 | |
| 203 | - ] | |
| 204 | - ); | |
| 165 | + ] ); | |
| 205 | 166 | |
| 206 | - $this->customizer->add_control( | |
| 207 | - new RangeValueControl( | |
| 208 | - $this->customizer, | |
| 209 | - 'betterdocs_live_search_heading_font_size_layout_2', | |
| 210 | - [ | |
| 211 | - 'type' => 'betterdocs-range-value', | |
| 212 | - 'section' => 'betterdocs_live_search_settings', | |
| 213 | - 'settings' => 'betterdocs_live_search_heading_font_size_layout_2', | |
| 214 | - 'label' => __( 'Heading Font Size', 'betterdocs' ), | |
| 215 | - 'input_attrs' => [ | |
| 216 | - 'class' => '', | |
| 217 | - 'min' => 0, | |
| 218 | - 'max' => 100, | |
| 219 | - 'step' => 1, | |
| 220 | - 'suffix' => 'px' //optional suffix | |
| 221 | - ], | |
| 222 | - 'priority' => 503 | |
| 223 | - ] | |
| 224 | - ) | |
| 225 | - ); | |
| 226 | - } | |
| 167 | + $this->customizer->add_control( new TitleControl( | |
| 168 | + $this->customizer, 'betterdocs_search_heading_margin', [ | |
| 169 | + 'type' => 'betterdocs-title', | |
| 170 | + 'section' => 'betterdocs_live_search_settings', | |
| 171 | + 'settings' => 'betterdocs_search_heading_margin', | |
| 172 | + 'label' => __( 'Heading Margin', 'betterdocs' ), | |
| 173 | + 'input_attrs' => [ | |
| 174 | + 'id' => 'betterdocs_search_heading_margin', | |
| 175 | + 'class' => 'betterdocs-dimension' | |
| 176 | + ], | |
| 177 | + 'priority' => 505 | |
| 178 | + ] ) | |
| 179 | + ); | |
| 227 | 180 | |
| 228 | - public function heading_font_color() { | |
| 229 | - $this->customizer->add_setting( | |
| 230 | - 'betterdocs_live_search_heading_font_color', | |
| 231 | - [ | |
| 232 | - 'default' => $this->defaults['betterdocs_live_search_heading_font_color'], | |
| 233 | - 'capability' => 'edit_theme_options', | |
| 234 | - 'transport' => 'postMessage', | |
| 235 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 236 | - ] | |
| 237 | - ); | |
| 181 | + $this->customizer->add_setting( 'betterdocs_search_heading_margin_top', [ | |
| 182 | + 'default' => $this->defaults['betterdocs_search_heading_margin_top'], | |
| 183 | + 'capability' => 'edit_theme_options', | |
| 184 | + 'transport' => 'postMessage', | |
| 185 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 186 | + ] ); | |
| 238 | 187 | |
| 239 | - $this->customizer->add_control( | |
| 240 | - new AlphaColorControl( | |
| 241 | - $this->customizer, | |
| 242 | - 'betterdocs_live_search_heading_font_color', | |
| 243 | - [ | |
| 244 | - 'label' => __( 'Heading Color', 'betterdocs' ), | |
| 245 | - 'section' => 'betterdocs_live_search_settings', | |
| 246 | - 'settings' => 'betterdocs_live_search_heading_font_color', | |
| 247 | - 'priority' => 504 | |
| 248 | - ] | |
| 249 | - ) | |
| 250 | - ); | |
| 251 | - } | |
| 188 | + $this->customizer->add_control( new DimensionControl( | |
| 189 | + $this->customizer, 'betterdocs_search_heading_margin_top', [ | |
| 190 | + 'type' => 'betterdocs-dimension', | |
| 191 | + 'section' => 'betterdocs_live_search_settings', | |
| 192 | + 'settings' => 'betterdocs_search_heading_margin_top', | |
| 193 | + 'label' => __( 'Top', 'betterdocs' ), | |
| 194 | + 'input_attrs' => [ | |
| 195 | + 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 196 | + ], | |
| 197 | + 'priority' => 505 | |
| 198 | + ] ) | |
| 199 | + ); | |
| 252 | 200 | |
| 253 | - public function betterdocs_live_search_heading_font_color_layout_2() { | |
| 254 | - $this->customizer->add_setting( | |
| 255 | - 'betterdocs_live_search_heading_font_color_layout_2', | |
| 256 | - [ | |
| 257 | - 'default' => $this->defaults['betterdocs_live_search_heading_font_color_layout_2'], | |
| 258 | - 'capability' => 'edit_theme_options', | |
| 259 | - 'transport' => 'postMessage', | |
| 260 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 261 | - ] | |
| 262 | - ); | |
| 201 | + $this->customizer->add_setting( 'betterdocs_search_heading_margin_right', [ | |
| 202 | + 'default' => $this->defaults['betterdocs_search_heading_margin_right'], | |
| 203 | + 'capability' => 'edit_theme_options', | |
| 204 | + 'transport' => 'postMessage', | |
| 205 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 263 | 206 | |
| 264 | - $this->customizer->add_control( | |
| 265 | - new AlphaColorControl( | |
| 266 | - $this->customizer, | |
| 267 | - 'betterdocs_live_search_heading_font_color_layout_2', | |
| 268 | - [ | |
| 269 | - 'label' => __( 'Heading Color', 'betterdocs' ), | |
| 270 | - 'section' => 'betterdocs_live_search_settings', | |
| 271 | - 'settings' => 'betterdocs_live_search_heading_font_color_layout_2', | |
| 272 | - 'priority' => 504 | |
| 273 | - ] | |
| 274 | - ) | |
| 275 | - ); | |
| 276 | - } | |
| 207 | + ] ); | |
| 277 | 208 | |
| 278 | - public function heading_margin() { | |
| 279 | - $this->customizer->add_setting( | |
| 280 | - 'betterdocs_search_heading_margin', | |
| 281 | - [ | |
| 282 | - 'default' => $this->defaults['betterdocs_search_heading_margin'], | |
| 283 | - 'capability' => 'edit_theme_options', | |
| 284 | - 'transport' => 'postMessage', | |
| 285 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 209 | + $this->customizer->add_control( new DimensionControl( | |
| 210 | + $this->customizer, 'betterdocs_search_heading_margin_right', [ | |
| 211 | + 'type' => 'betterdocs-dimension', | |
| 212 | + 'section' => 'betterdocs_live_search_settings', | |
| 213 | + 'settings' => 'betterdocs_search_heading_margin_right', | |
| 214 | + 'label' => __( 'Right', 'betterdocs' ), | |
| 215 | + 'input_attrs' => [ | |
| 216 | + 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 217 | + ], | |
| 218 | + 'priority' => 505 | |
| 219 | + ] ) | |
| 220 | + ); | |
| 286 | 221 | |
| 287 | - ] | |
| 288 | - ); | |
| 222 | + $this->customizer->add_setting( 'betterdocs_search_heading_margin_bottom', [ | |
| 223 | + 'default' => $this->defaults['betterdocs_search_heading_margin_bottom'], | |
| 224 | + 'capability' => 'edit_theme_options', | |
| 225 | + 'transport' => 'postMessage', | |
| 226 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 289 | 227 | |
| 290 | - $this->customizer->add_control( | |
| 291 | - new TitleControl( | |
| 292 | - $this->customizer, | |
| 293 | - 'betterdocs_search_heading_margin', | |
| 294 | - [ | |
| 295 | - 'type' => 'betterdocs-title', | |
| 296 | - 'section' => 'betterdocs_live_search_settings', | |
| 297 | - 'settings' => 'betterdocs_search_heading_margin', | |
| 298 | - 'label' => __( 'Heading Margin', 'betterdocs' ), | |
| 299 | - 'input_attrs' => [ | |
| 300 | - 'id' => 'betterdocs_search_heading_margin', | |
| 301 | - 'class' => 'betterdocs-dimension' | |
| 302 | - ], | |
| 303 | - 'priority' => 505 | |
| 304 | - ] | |
| 305 | - ) | |
| 306 | - ); | |
| 228 | + ] ); | |
| 307 | 229 | |
| 308 | - $this->customizer->add_setting( | |
| 309 | - 'betterdocs_search_heading_margin_top', | |
| 310 | - [ | |
| 311 | - 'default' => $this->defaults['betterdocs_search_heading_margin_top'], | |
| 312 | - 'capability' => 'edit_theme_options', | |
| 313 | - 'transport' => 'postMessage', | |
| 314 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 315 | - ] | |
| 316 | - ); | |
| 230 | + $this->customizer->add_control( new DimensionControl( | |
| 231 | + $this->customizer, 'betterdocs_search_heading_margin_bottom', [ | |
| 232 | + 'type' => 'betterdocs-dimension', | |
| 233 | + 'section' => 'betterdocs_live_search_settings', | |
| 234 | + 'settings' => 'betterdocs_search_heading_margin_bottom', | |
| 235 | + 'label' => __( 'Bottom', 'betterdocs' ), | |
| 236 | + 'input_attrs' => [ | |
| 237 | + 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 238 | + ], | |
| 239 | + 'priority' => 505 | |
| 240 | + ] ) | |
| 241 | + ); | |
| 317 | 242 | |
| 318 | - $this->customizer->add_control( | |
| 319 | - new DimensionControl( | |
| 320 | - $this->customizer, | |
| 321 | - 'betterdocs_search_heading_margin_top', | |
| 322 | - [ | |
| 323 | - 'type' => 'betterdocs-dimension', | |
| 324 | - 'section' => 'betterdocs_live_search_settings', | |
| 325 | - 'settings' => 'betterdocs_search_heading_margin_top', | |
| 326 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 327 | - 'input_attrs' => [ | |
| 328 | - 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 329 | - ], | |
| 330 | - 'priority' => 505 | |
| 331 | - ] | |
| 332 | - ) | |
| 333 | - ); | |
| 243 | + $this->customizer->add_setting( 'betterdocs_search_heading_margin_left', [ | |
| 244 | + 'default' => $this->defaults['betterdocs_search_heading_margin_left'], | |
| 245 | + 'capability' => 'edit_theme_options', | |
| 246 | + 'transport' => 'postMessage', | |
| 247 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 334 | 248 | |
| 335 | - $this->customizer->add_setting( | |
| 336 | - 'betterdocs_search_heading_margin_right', | |
| 337 | - [ | |
| 338 | - 'default' => $this->defaults['betterdocs_search_heading_margin_right'], | |
| 339 | - 'capability' => 'edit_theme_options', | |
| 340 | - 'transport' => 'postMessage', | |
| 341 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 249 | + ] ); | |
| 342 | 250 | |
| 343 | - ] | |
| 344 | - ); | |
| 251 | + $this->customizer->add_control( new DimensionControl( | |
| 252 | + $this->customizer, 'betterdocs_search_heading_margin_left', [ | |
| 253 | + 'type' => 'betterdocs-dimension', | |
| 254 | + 'section' => 'betterdocs_live_search_settings', | |
| 255 | + 'settings' => 'betterdocs_search_heading_margin_left', | |
| 256 | + 'label' => __( 'Left', 'betterdocs' ), | |
| 257 | + 'input_attrs' => [ | |
| 258 | + 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 259 | + ], | |
| 260 | + 'priority' => 505 | |
| 261 | + ] ) | |
| 262 | + ); | |
| 263 | + } | |
| 345 | 264 | |
| 346 | - $this->customizer->add_control( | |
| 347 | - new DimensionControl( | |
| 348 | - $this->customizer, | |
| 349 | - 'betterdocs_search_heading_margin_right', | |
| 350 | - [ | |
| 351 | - 'type' => 'betterdocs-dimension', | |
| 352 | - 'section' => 'betterdocs_live_search_settings', | |
| 353 | - 'settings' => 'betterdocs_search_heading_margin_right', | |
| 354 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 355 | - 'input_attrs' => [ | |
| 356 | - 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 357 | - ], | |
| 358 | - 'priority' => 505 | |
| 359 | - ] | |
| 360 | - ) | |
| 361 | - ); | |
| 265 | + public function search_subheading() { | |
| 266 | + $this->customizer->add_setting( 'betterdocs_live_search_subheading', [ | |
| 267 | + 'default' => $this->defaults['betterdocs_live_search_subheading'], | |
| 268 | + 'capability' => 'edit_theme_options', | |
| 269 | + 'sanitize_callback' => 'esc_html' | |
| 270 | + ] ); | |
| 362 | 271 | |
| 363 | - $this->customizer->add_setting( | |
| 364 | - 'betterdocs_search_heading_margin_bottom', | |
| 365 | - [ | |
| 366 | - 'default' => $this->defaults['betterdocs_search_heading_margin_bottom'], | |
| 367 | - 'capability' => 'edit_theme_options', | |
| 368 | - 'transport' => 'postMessage', | |
| 369 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 272 | + $this->customizer->add_control( | |
| 273 | + new SelectControl( | |
| 274 | + $this->customizer, | |
| 275 | + 'betterdocs_live_search_subheading', | |
| 276 | + [ | |
| 277 | + 'label' => __( 'Sub Heading', 'betterdocs' ), | |
| 278 | + 'section' => 'betterdocs_live_search_settings', | |
| 279 | + 'settings' => 'betterdocs_live_search_subheading', | |
| 280 | + 'type' => 'text', | |
| 281 | + 'priority' => 506 | |
| 282 | + ] | |
| 283 | + ) | |
| 284 | + ); | |
| 285 | + } | |
| 370 | 286 | |
| 371 | - ] | |
| 372 | - ); | |
| 287 | + public function subheading_tag() { | |
| 288 | + $this->customizer->add_setting( 'betterdocs_live_search_subheading_tag', [ | |
| 289 | + 'default' => $this->defaults['betterdocs_live_search_subheading_tag'], | |
| 290 | + 'capability' => 'edit_theme_options', | |
| 291 | + 'sanitize_callback' => [$this->sanitizer, 'select'] | |
| 292 | + ] ); | |
| 373 | 293 | |
| 374 | - $this->customizer->add_control( | |
| 375 | - new DimensionControl( | |
| 376 | - $this->customizer, | |
| 377 | - 'betterdocs_search_heading_margin_bottom', | |
| 378 | - [ | |
| 379 | - 'type' => 'betterdocs-dimension', | |
| 380 | - 'section' => 'betterdocs_live_search_settings', | |
| 381 | - 'settings' => 'betterdocs_search_heading_margin_bottom', | |
| 382 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 383 | - 'input_attrs' => [ | |
| 384 | - 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 385 | - ], | |
| 386 | - 'priority' => 505 | |
| 387 | - ] | |
| 388 | - ) | |
| 389 | - ); | |
| 294 | + $this->customizer->add_control( | |
| 295 | + new WP_Customize_Control( | |
| 296 | + $this->customizer, | |
| 297 | + 'betterdocs_live_search_subheading_tag', | |
| 298 | + [ | |
| 299 | + 'label' => __( 'Sub Heading Tags', 'betterdocs' ), | |
| 300 | + 'section' => 'betterdocs_live_search_settings', | |
| 301 | + 'settings' => 'betterdocs_live_search_subheading_tag', | |
| 302 | + 'type' => 'select', | |
| 303 | + 'choices' => [ | |
| 304 | + 'h1' => 'h1', | |
| 305 | + 'h2' => 'h2', | |
| 306 | + 'h3' => 'h3', | |
| 307 | + 'h4' => 'h4', | |
| 308 | + 'h5' => 'h5', | |
| 309 | + 'h6' => 'h6', | |
| 310 | + 'p' => 'p' | |
| 311 | + ], | |
| 312 | + 'priority' => 507 | |
| 313 | + ] | |
| 314 | + ) | |
| 315 | + ); | |
| 316 | + } | |
| 390 | 317 | |
| 391 | - $this->customizer->add_setting( | |
| 392 | - 'betterdocs_search_heading_margin_left', | |
| 393 | - [ | |
| 394 | - 'default' => $this->defaults['betterdocs_search_heading_margin_left'], | |
| 395 | - 'capability' => 'edit_theme_options', | |
| 396 | - 'transport' => 'postMessage', | |
| 397 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 318 | + public function subheading_font_size() { | |
| 319 | + $this->customizer->add_setting( 'betterdocs_live_search_subheading_font_size', [ | |
| 320 | + 'default' => $this->defaults['betterdocs_live_search_subheading_font_size'], | |
| 321 | + 'capability' => 'edit_theme_options', | |
| 322 | + 'transport' => 'postMessage', | |
| 323 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 398 | 324 | |
| 399 | - ] | |
| 400 | - ); | |
| 325 | + ] ); | |
| 401 | 326 | |
| 402 | - $this->customizer->add_control( | |
| 403 | - new DimensionControl( | |
| 404 | - $this->customizer, | |
| 405 | - 'betterdocs_search_heading_margin_left', | |
| 406 | - [ | |
| 407 | - 'type' => 'betterdocs-dimension', | |
| 408 | - 'section' => 'betterdocs_live_search_settings', | |
| 409 | - 'settings' => 'betterdocs_search_heading_margin_left', | |
| 410 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 411 | - 'input_attrs' => [ | |
| 412 | - 'class' => 'betterdocs_search_heading_margin betterdocs-dimension' | |
| 413 | - ], | |
| 414 | - 'priority' => 505 | |
| 415 | - ] | |
| 416 | - ) | |
| 417 | - ); | |
| 418 | - } | |
| 327 | + $this->customizer->add_control( new RangeValueControl( | |
| 328 | + $this->customizer, 'betterdocs_live_search_subheading_font_size', [ | |
| 329 | + 'type' => 'betterdocs-range-value', | |
| 330 | + 'section' => 'betterdocs_live_search_settings', | |
| 331 | + 'settings' => 'betterdocs_live_search_subheading_font_size', | |
| 332 | + 'label' => __( 'Sub Heading Font Size', 'betterdocs' ), | |
| 333 | + 'input_attrs' => [ | |
| 334 | + 'class' => '', | |
| 335 | + 'min' => 0, | |
| 336 | + 'max' => 100, | |
| 337 | + 'step' => 1, | |
| 338 | + 'suffix' => 'px' //optional suffix | |
| 339 | + ], | |
| 340 | + 'priority' => 507 | |
| 341 | + ] ) | |
| 342 | + ); | |
| 343 | + } | |
| 419 | 344 | |
| 420 | - public function heading_margin_layout_2() { | |
| 421 | - $this->customizer->add_setting( | |
| 422 | - 'heading_margin_layout_2', | |
| 423 | - [ | |
| 424 | - 'default' => $this->defaults['heading_margin_layout_2'], | |
| 425 | - 'capability' => 'edit_theme_options', | |
| 426 | - 'transport' => 'postMessage', | |
| 427 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 428 | - ] | |
| 429 | - ); | |
| 345 | + public function subheading_font_color() { | |
| 346 | + $this->customizer->add_setting( 'betterdocs_live_search_subheading_font_color', [ | |
| 347 | + 'default' => $this->defaults['betterdocs_live_search_subheading_font_color'], | |
| 348 | + 'capability' => 'edit_theme_options', | |
| 349 | + 'transport' => 'postMessage', | |
| 350 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 351 | + ] ); | |
| 430 | 352 | |
| 431 | - $this->customizer->add_control( | |
| 432 | - new TitleControl( | |
| 433 | - $this->customizer, | |
| 434 | - 'heading_margin_layout_2', | |
| 435 | - [ | |
| 436 | - 'type' => 'betterdocs-title', | |
| 437 | - 'section' => 'betterdocs_live_search_settings', | |
| 438 | - 'settings' => 'heading_margin_layout_2', | |
| 439 | - 'label' => __( 'Heading Margin', 'betterdocs' ), | |
| 440 | - 'input_attrs' => [ | |
| 441 | - 'id' => 'heading_margin_layout_2', | |
| 442 | - 'class' => 'betterdocs-dimension' | |
| 443 | - ], | |
| 444 | - 'priority' => 505 | |
| 445 | - ] | |
| 446 | - ) | |
| 447 | - ); | |
| 353 | + $this->customizer->add_control( | |
| 354 | + new AlphaColorControl( | |
| 355 | + $this->customizer, | |
| 356 | + 'betterdocs_live_search_subheading_font_color', | |
| 357 | + [ | |
| 358 | + 'label' => __( 'Sub Heading Color', 'betterdocs' ), | |
| 359 | + 'section' => 'betterdocs_live_search_settings', | |
| 360 | + 'settings' => 'betterdocs_live_search_subheading_font_color', | |
| 361 | + 'priority' => 508 | |
| 362 | + ] | |
| 363 | + ) | |
| 364 | + ); | |
| 365 | + } | |
| 448 | 366 | |
| 449 | - $this->customizer->add_setting( | |
| 450 | - 'betterdocs_search_heading_margin_top_layout_2', | |
| 451 | - [ | |
| 452 | - 'default' => $this->defaults['betterdocs_search_heading_margin_top_layout_2'], | |
| 453 | - 'capability' => 'edit_theme_options', | |
| 454 | - 'transport' => 'postMessage', | |
| 455 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 456 | - ] | |
| 457 | - ); | |
| 367 | + public function subheading_margin() { | |
| 368 | + $this->customizer->add_setting( 'betterdocs_search_subheading_margin', [ | |
| 369 | + 'default' => $this->defaults['betterdocs_search_subheading_margin'], | |
| 370 | + 'capability' => 'edit_theme_options', | |
| 371 | + 'transport' => 'postMessage', | |
| 372 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 458 | 373 | |
| 459 | - $this->customizer->add_control( | |
| 460 | - new DimensionControl( | |
| 461 | - $this->customizer, | |
| 462 | - 'betterdocs_search_heading_margin_top_layout_2', | |
| 463 | - [ | |
| 464 | - 'type' => 'betterdocs-dimension', | |
| 465 | - 'section' => 'betterdocs_live_search_settings', | |
| 466 | - 'settings' => 'betterdocs_search_heading_margin_top_layout_2', | |
| 467 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 468 | - 'input_attrs' => [ | |
| 469 | - 'class' => 'heading_margin_layout_2 betterdocs-dimension' | |
| 470 | - ], | |
| 471 | - 'priority' => 505 | |
| 472 | - ] | |
| 473 | - ) | |
| 474 | - ); | |
| 374 | + ] ); | |
| 475 | 375 | |
| 476 | - $this->customizer->add_setting( | |
| 477 | - 'betterdocs_search_heading_margin_right_layout_2', | |
| 478 | - [ | |
| 479 | - 'default' => $this->defaults['betterdocs_search_heading_margin_right_layout_2'], | |
| 480 | - 'capability' => 'edit_theme_options', | |
| 481 | - 'transport' => 'postMessage', | |
| 482 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 376 | + $this->customizer->add_control( new TitleControl( | |
| 377 | + $this->customizer, 'betterdocs_search_subheading_margin', [ | |
| 378 | + 'type' => 'betterdocs-title', | |
| 379 | + 'section' => 'betterdocs_live_search_settings', | |
| 380 | + 'settings' => 'betterdocs_search_subheading_margin', | |
| 381 | + 'label' => __( 'Sub Heading Margin', 'betterdocs' ), | |
| 382 | + 'input_attrs' => [ | |
| 383 | + 'id' => 'betterdocs_search_subheading_margin', | |
| 384 | + 'class' => 'betterdocs-dimension' | |
| 385 | + ], | |
| 386 | + 'priority' => 509 | |
| 387 | + ] ) | |
| 388 | + ); | |
| 483 | 389 | |
| 484 | - ] | |
| 485 | - ); | |
| 390 | + $this->customizer->add_setting( 'betterdocs_search_subheading_margin_top', [ | |
| 391 | + 'default' => $this->defaults['betterdocs_search_subheading_margin_top'], | |
| 392 | + 'capability' => 'edit_theme_options', | |
| 393 | + 'transport' => 'postMessage', | |
| 394 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 395 | + ] ); | |
| 486 | 396 | |
| 487 | - $this->customizer->add_control( | |
| 488 | - new DimensionControl( | |
| 489 | - $this->customizer, | |
| 490 | - 'betterdocs_search_heading_margin_right_layout_2', | |
| 491 | - [ | |
| 492 | - 'type' => 'betterdocs-dimension', | |
| 493 | - 'section' => 'betterdocs_live_search_settings', | |
| 494 | - 'settings' => 'betterdocs_search_heading_margin_right_layout_2', | |
| 495 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 496 | - 'input_attrs' => [ | |
| 497 | - 'class' => 'heading_margin_layout_2 betterdocs-dimension' | |
| 498 | - ], | |
| 499 | - 'priority' => 505 | |
| 500 | - ] | |
| 501 | - ) | |
| 502 | - ); | |
| 397 | + $this->customizer->add_control( new DimensionControl( | |
| 398 | + $this->customizer, 'betterdocs_search_subheading_margin_top', [ | |
| 399 | + 'type' => 'betterdocs-dimension', | |
| 400 | + 'section' => 'betterdocs_live_search_settings', | |
| 401 | + 'settings' => 'betterdocs_search_subheading_margin_top', | |
| 402 | + 'label' => __( 'Top', 'betterdocs' ), | |
| 403 | + 'input_attrs' => [ | |
| 404 | + 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 405 | + ], | |
| 406 | + 'priority' => 509 | |
| 407 | + ] ) | |
| 408 | + ); | |
| 503 | 409 | |
| 504 | - $this->customizer->add_setting( | |
| 505 | - 'betterdocs_search_heading_margin_bottom_layout_2', | |
| 506 | - [ | |
| 507 | - 'default' => $this->defaults['betterdocs_search_heading_margin_bottom_layout_2'], | |
| 508 | - 'capability' => 'edit_theme_options', | |
| 509 | - 'transport' => 'postMessage', | |
| 510 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 410 | + $this->customizer->add_setting( 'betterdocs_search_subheading_margin_right', [ | |
| 411 | + 'default' => $this->defaults['betterdocs_search_subheading_margin_right'], | |
| 412 | + 'capability' => 'edit_theme_options', | |
| 413 | + 'transport' => 'postMessage', | |
| 414 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 511 | 415 | |
| 512 | - ] | |
| 513 | - ); | |
| 416 | + ] ); | |
| 514 | 417 | |
| 515 | - $this->customizer->add_control( | |
| 516 | - new DimensionControl( | |
| 517 | - $this->customizer, | |
| 518 | - 'betterdocs_search_heading_margin_bottom_layout_2', | |
| 519 | - [ | |
| 520 | - 'type' => 'betterdocs-dimension', | |
| 521 | - 'section' => 'betterdocs_live_search_settings', | |
| 522 | - 'settings' => 'betterdocs_search_heading_margin_bottom_layout_2', | |
| 523 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 524 | - 'input_attrs' => [ | |
| 525 | - 'class' => 'heading_margin_layout_2 betterdocs-dimension' | |
| 526 | - ], | |
| 527 | - 'priority' => 505 | |
| 528 | - ] | |
| 529 | - ) | |
| 530 | - ); | |
| 418 | + $this->customizer->add_control( new DimensionControl( | |
| 419 | + $this->customizer, 'betterdocs_search_subheading_margin_right', [ | |
| 420 | + 'type' => 'betterdocs-dimension', | |
| 421 | + 'section' => 'betterdocs_live_search_settings', | |
| 422 | + 'settings' => 'betterdocs_search_subheading_margin_right', | |
| 423 | + 'label' => __( 'Right', 'betterdocs' ), | |
| 424 | + 'input_attrs' => [ | |
| 425 | + 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 426 | + ], | |
| 427 | + 'priority' => 509 | |
| 428 | + ] ) | |
| 429 | + ); | |
| 531 | 430 | |
| 532 | - $this->customizer->add_setting( | |
| 533 | - 'betterdocs_search_heading_margin_left_layout_2', | |
| 534 | - [ | |
| 535 | - 'default' => $this->defaults['betterdocs_search_heading_margin_left_layout_2'], | |
| 536 | - 'capability' => 'edit_theme_options', | |
| 537 | - 'transport' => 'postMessage', | |
| 538 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 431 | + $this->customizer->add_setting( 'betterdocs_search_subheading_margin_bottom', [ | |
| 432 | + 'default' => $this->defaults['betterdocs_search_subheading_margin_bottom'], | |
| 433 | + 'capability' => 'edit_theme_options', | |
| 434 | + 'transport' => 'postMessage', | |
| 435 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 539 | 436 | |
| 540 | - ] | |
| 541 | - ); | |
| 437 | + ] ); | |
| 542 | 438 | |
| 543 | - $this->customizer->add_control( | |
| 544 | - new DimensionControl( | |
| 545 | - $this->customizer, | |
| 546 | - 'betterdocs_search_heading_margin_left_layout_2', | |
| 547 | - [ | |
| 548 | - 'type' => 'betterdocs-dimension', | |
| 549 | - 'section' => 'betterdocs_live_search_settings', | |
| 550 | - 'settings' => 'betterdocs_search_heading_margin_left_layout_2', | |
| 551 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 552 | - 'input_attrs' => [ | |
| 553 | - 'class' => 'heading_margin_layout_2 betterdocs-dimension' | |
| 554 | - ], | |
| 555 | - 'priority' => 505 | |
| 556 | - ] | |
| 557 | - ) | |
| 558 | - ); | |
| 559 | - } | |
| 439 | + $this->customizer->add_control( new DimensionControl( | |
| 440 | + $this->customizer, 'betterdocs_search_subheading_margin_bottom', [ | |
| 441 | + 'type' => 'betterdocs-dimension', | |
| 442 | + 'section' => 'betterdocs_live_search_settings', | |
| 443 | + 'settings' => 'betterdocs_search_subheading_margin_bottom', | |
| 444 | + 'label' => __( 'Bottom', 'betterdocs' ), | |
| 445 | + 'input_attrs' => [ | |
| 446 | + 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 447 | + ], | |
| 448 | + 'priority' => 509 | |
| 449 | + ] ) | |
| 450 | + ); | |
| 560 | 451 | |
| 452 | + $this->customizer->add_setting( 'betterdocs_search_subheading_margin_left', [ | |
| 453 | + 'default' => $this->defaults['betterdocs_search_subheading_margin_left'], | |
| 454 | + 'capability' => 'edit_theme_options', | |
| 455 | + 'transport' => 'postMessage', | |
| 456 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 561 | 457 | |
| 562 | - public function search_subheading() { | |
| 563 | - $this->customizer->add_setting( | |
| 564 | - 'betterdocs_live_search_subheading', | |
| 565 | - [ | |
| 566 | - 'default' => $this->defaults['betterdocs_live_search_subheading'], | |
| 567 | - 'capability' => 'edit_theme_options', | |
| 568 | - 'sanitize_callback' => 'esc_html' | |
| 569 | - ] | |
| 570 | - ); | |
| 458 | + ] ); | |
| 571 | 459 | |
| 572 | - $this->customizer->add_control( | |
| 573 | - new SelectControl( | |
| 574 | - $this->customizer, | |
| 575 | - 'betterdocs_live_search_subheading', | |
| 576 | - [ | |
| 577 | - 'label' => __( 'Sub Heading', 'betterdocs' ), | |
| 578 | - 'section' => 'betterdocs_live_search_settings', | |
| 579 | - 'settings' => 'betterdocs_live_search_subheading', | |
| 580 | - 'type' => 'text', | |
| 581 | - 'priority' => 506 | |
| 582 | - ] | |
| 583 | - ) | |
| 584 | - ); | |
| 585 | - } | |
| 460 | + $this->customizer->add_control( new DimensionControl( | |
| 461 | + $this->customizer, 'betterdocs_search_subheading_margin_left', [ | |
| 462 | + 'type' => 'betterdocs-dimension', | |
| 463 | + 'section' => 'betterdocs_live_search_settings', | |
| 464 | + 'settings' => 'betterdocs_search_subheading_margin_left', | |
| 465 | + 'label' => __( 'Left', 'betterdocs' ), | |
| 466 | + 'input_attrs' => [ | |
| 467 | + 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 468 | + ], | |
| 469 | + 'priority' => 509 | |
| 470 | + ] ) | |
| 471 | + ); | |
| 472 | + } | |
| 586 | 473 | |
| 587 | - public function subheading_tag() { | |
| 588 | - $this->customizer->add_setting( | |
| 589 | - 'betterdocs_live_search_subheading_tag', | |
| 590 | - [ | |
| 591 | - 'default' => $this->defaults['betterdocs_live_search_subheading_tag'], | |
| 592 | - 'capability' => 'edit_theme_options', | |
| 593 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 594 | - ] | |
| 595 | - ); | |
| 474 | + public function background_color() { | |
| 475 | + $this->customizer->add_setting( 'betterdocs_live_search_background_color', [ | |
| 476 | + 'default' => $this->defaults['betterdocs_live_search_background_color'], | |
| 477 | + 'capability' => 'edit_theme_options', | |
| 478 | + 'transport' => 'postMessage', | |
| 479 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 480 | + ] ); | |
| 596 | 481 | |
| 597 | - $this->customizer->add_control( | |
| 598 | - new WP_Customize_Control( | |
| 599 | - $this->customizer, | |
| 600 | - 'betterdocs_live_search_subheading_tag', | |
| 601 | - [ | |
| 602 | - 'label' => __( 'Sub Heading Tags', 'betterdocs' ), | |
| 603 | - 'section' => 'betterdocs_live_search_settings', | |
| 604 | - 'settings' => 'betterdocs_live_search_subheading_tag', | |
| 605 | - 'type' => 'select', | |
| 606 | - 'choices' => [ | |
| 607 | - 'h1' => 'h1', | |
| 608 | - 'h2' => 'h2', | |
| 609 | - 'h3' => 'h3', | |
| 610 | - 'h4' => 'h4', | |
| 611 | - 'h5' => 'h5', | |
| 612 | - 'h6' => 'h6', | |
| 613 | - 'p' => 'p' | |
| 614 | - ], | |
| 615 | - 'priority' => 507 | |
| 616 | - ] | |
| 617 | - ) | |
| 618 | - ); | |
| 619 | - } | |
| 482 | + $this->customizer->add_control( | |
| 483 | + new AlphaColorControl( | |
| 484 | + $this->customizer, | |
| 485 | + 'betterdocs_live_search_background_color', | |
| 486 | + [ | |
| 487 | + 'label' => __( 'Background Color', 'betterdocs' ), | |
| 488 | + 'section' => 'betterdocs_live_search_settings', | |
| 489 | + 'settings' => 'betterdocs_live_search_background_color', | |
| 490 | + 'priority' => 510 | |
| 491 | + ] | |
| 492 | + ) | |
| 493 | + ); | |
| 494 | + } | |
| 620 | 495 | |
| 621 | - public function subheading_font_size() { | |
| 622 | - $this->customizer->add_setting( | |
| 623 | - 'betterdocs_live_search_subheading_font_size', | |
| 624 | - [ | |
| 625 | - 'default' => $this->defaults['betterdocs_live_search_subheading_font_size'], | |
| 626 | - 'capability' => 'edit_theme_options', | |
| 627 | - 'transport' => 'postMessage', | |
| 628 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 496 | + public function background_image() { | |
| 497 | + $this->customizer->add_setting( 'betterdocs_live_search_background_image', [ | |
| 498 | + 'default' => $this->defaults['betterdocs_live_search_background_image'], | |
| 499 | + 'capability' => 'edit_theme_options', | |
| 500 | + 'transport' => 'postMessage' | |
| 629 | 501 | |
| 630 | - ] | |
| 631 | - ); | |
| 502 | + ] ); | |
| 632 | 503 | |
| 633 | - $this->customizer->add_control( | |
| 634 | - new RangeValueControl( | |
| 635 | - $this->customizer, | |
| 636 | - 'betterdocs_live_search_subheading_font_size', | |
| 637 | - [ | |
| 638 | - 'type' => 'betterdocs-range-value', | |
| 639 | - 'section' => 'betterdocs_live_search_settings', | |
| 640 | - 'settings' => 'betterdocs_live_search_subheading_font_size', | |
| 641 | - 'label' => __( 'Sub Heading Font Size', 'betterdocs' ), | |
| 642 | - 'input_attrs' => [ | |
| 643 | - 'class' => '', | |
| 644 | - 'min' => 0, | |
| 645 | - 'max' => 100, | |
| 646 | - 'step' => 1, | |
| 647 | - 'suffix' => 'px' //optional suffix | |
| 648 | - ], | |
| 649 | - 'priority' => 507 | |
| 650 | - ] | |
| 651 | - ) | |
| 652 | - ); | |
| 653 | - } | |
| 504 | + $this->customizer->add_control( new WP_Customize_Image_Control( | |
| 505 | + $this->customizer, 'betterdocs_live_search_background_image', [ | |
| 506 | + 'section' => 'betterdocs_live_search_settings', | |
| 507 | + 'settings' => 'betterdocs_live_search_background_image', | |
| 508 | + 'label' => __( 'Background Image', 'betterdocs' ), | |
| 509 | + 'priority' => 511 | |
| 510 | + ] ) | |
| 511 | + ); | |
| 512 | + } | |
| 654 | 513 | |
| 655 | - public function betterdocs_live_search_subheading_font_size_layout_2() { | |
| 656 | - $this->customizer->add_setting( | |
| 657 | - 'betterdocs_live_search_subheading_font_size_layout_2', | |
| 658 | - [ | |
| 659 | - 'default' => $this->defaults['betterdocs_live_search_subheading_font_size_layout_2'], | |
| 660 | - 'capability' => 'edit_theme_options', | |
| 661 | - 'transport' => 'postMessage', | |
| 662 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 514 | + public function background_property() { | |
| 515 | + $this->customizer->add_setting( 'betterdocs_live_search_background_property', [ | |
| 516 | + 'default' => $this->defaults['betterdocs_live_search_background_property'], | |
| 517 | + 'capability' => 'edit_theme_options', | |
| 518 | + 'transport' => 'postMessage', | |
| 519 | + 'sanitize_callback' => [$this->sanitizer, 'select'] | |
| 520 | + ] ); | |
| 663 | 521 | |
| 664 | - ] | |
| 665 | - ); | |
| 522 | + $this->customizer->add_control( new TitleControl( | |
| 523 | + $this->customizer, 'betterdocs_live_search_background_property', [ | |
| 524 | + 'type' => 'betterdocs-title', | |
| 525 | + 'section' => 'betterdocs_live_search_settings', | |
| 526 | + 'settings' => 'betterdocs_live_search_background_property', | |
| 527 | + 'label' => __( 'Background Property', 'betterdocs' ), | |
| 528 | + 'input_attrs' => [ | |
| 529 | + 'id' => 'betterdocs_live_search_background_property', | |
| 530 | + 'class' => 'betterdocs-select' | |
| 531 | + ], | |
| 532 | + 'priority' => 512 | |
| 533 | + ] ) | |
| 534 | + ); | |
| 666 | 535 | |
| 667 | - $this->customizer->add_control( | |
| 668 | - new RangeValueControl( | |
| 669 | - $this->customizer, | |
| 670 | - 'betterdocs_live_search_subheading_font_size_layout_2', | |
| 671 | - [ | |
| 672 | - 'type' => 'betterdocs-range-value', | |
| 673 | - 'section' => 'betterdocs_live_search_settings', | |
| 674 | - 'settings' => 'betterdocs_live_search_subheading_font_size_layout_2', | |
| 675 | - 'label' => __( 'Sub Heading Font Size', 'betterdocs' ), | |
| 676 | - 'input_attrs' => [ | |
| 677 | - 'class' => '', | |
| 678 | - 'min' => 0, | |
| 679 | - 'max' => 100, | |
| 680 | - 'step' => 1, | |
| 681 | - 'suffix' => 'px' //optional suffix | |
| 682 | - ], | |
| 683 | - 'priority' => 507 | |
| 684 | - ] | |
| 685 | - ) | |
| 686 | - ); | |
| 687 | - } | |
| 536 | + $this->customizer->add_setting( 'betterdocs_live_search_background_size', [ | |
| 537 | + 'default' => $this->defaults['betterdocs_live_search_background_size'], | |
| 538 | + 'capability' => 'edit_theme_options', | |
| 539 | + 'transport' => 'postMessage', | |
| 540 | + 'sanitize_callback' => [$this->sanitizer, 'select'] | |
| 688 | 541 | |
| 689 | - public function subheading_font_color() { | |
| 690 | - $this->customizer->add_setting( | |
| 691 | - 'betterdocs_live_search_subheading_font_color', | |
| 692 | - [ | |
| 693 | - 'default' => $this->defaults['betterdocs_live_search_subheading_font_color'], | |
| 694 | - 'capability' => 'edit_theme_options', | |
| 695 | - 'transport' => 'postMessage', | |
| 696 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 697 | - ] | |
| 698 | - ); | |
| 542 | + ] ); | |
| 699 | 543 | |
| 700 | - $this->customizer->add_control( | |
| 701 | - new AlphaColorControl( | |
| 702 | - $this->customizer, | |
| 703 | - 'betterdocs_live_search_subheading_font_color', | |
| 704 | - [ | |
| 705 | - 'label' => __( 'Sub Heading Color', 'betterdocs' ), | |
| 706 | - 'section' => 'betterdocs_live_search_settings', | |
| 707 | - 'settings' => 'betterdocs_live_search_subheading_font_color', | |
| 708 | - 'priority' => 508 | |
| 709 | - ] | |
| 710 | - ) | |
| 711 | - ); | |
| 712 | - } | |
| 544 | + $this->customizer->add_control( new SelectControl( | |
| 545 | + $this->customizer, 'betterdocs_live_search_background_size', [ | |
| 546 | + 'type' => 'betterdocs-select', | |
| 547 | + 'section' => 'betterdocs_live_search_settings', | |
| 548 | + 'settings' => 'betterdocs_live_search_background_size', | |
| 549 | + 'label' => __( 'Size', 'betterdocs' ), | |
| 550 | + 'input_attrs' => [ | |
| 551 | + 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 552 | + ], | |
| 553 | + 'choices' => [ | |
| 554 | + 'auto' => __( 'auto', 'betterdocs' ), | |
| 555 | + 'length' => __( 'length', 'betterdocs' ), | |
| 556 | + 'cover' => __( 'cover', 'betterdocs' ), | |
| 557 | + 'contain' => __( 'contain', 'betterdocs' ), | |
| 558 | + 'initial' => __( 'initial', 'betterdocs' ), | |
| 559 | + 'inherit' => __( 'inherit', 'betterdocs' ) | |
| 560 | + ], | |
| 561 | + 'priority' => 513 | |
| 562 | + ] ) | |
| 563 | + ); | |
| 713 | 564 | |
| 714 | - public function betterdocs_live_search_subheading_font_color_layout_2() { | |
| 715 | - $this->customizer->add_setting( | |
| 716 | - 'betterdocs_live_search_subheading_font_color_layout_2', | |
| 717 | - [ | |
| 718 | - 'default' => $this->defaults['betterdocs_live_search_subheading_font_color_layout_2'], | |
| 719 | - 'capability' => 'edit_theme_options', | |
| 720 | - 'transport' => 'postMessage', | |
| 721 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 722 | - ] | |
| 723 | - ); | |
| 565 | + $this->customizer->add_setting( 'betterdocs_live_search_background_repeat', [ | |
| 566 | + 'default' => $this->defaults['betterdocs_live_search_background_repeat'], | |
| 567 | + 'capability' => 'edit_theme_options', | |
| 568 | + 'transport' => 'postMessage', | |
| 569 | + 'sanitize_callback' => [$this->sanitizer, 'select'] | |
| 724 | 570 | |
| 725 | - $this->customizer->add_control( | |
| 726 | - new AlphaColorControl( | |
| 727 | - $this->customizer, | |
| 728 | - 'betterdocs_live_search_subheading_font_color_layout_2', | |
| 729 | - [ | |
| 730 | - 'label' => __( 'Sub Heading Color', 'betterdocs' ), | |
| 731 | - 'section' => 'betterdocs_live_search_settings', | |
| 732 | - 'settings' => 'betterdocs_live_search_subheading_font_color_layout_2', | |
| 733 | - 'priority' => 508 | |
| 734 | - ] | |
| 735 | - ) | |
| 736 | - ); | |
| 737 | - } | |
| 571 | + ] ); | |
| 738 | 572 | |
| 739 | - public function subheading_margin() { | |
| 740 | - $this->customizer->add_setting( | |
| 741 | - 'betterdocs_search_subheading_margin', | |
| 742 | - [ | |
| 743 | - 'default' => $this->defaults['betterdocs_search_subheading_margin'], | |
| 744 | - 'capability' => 'edit_theme_options', | |
| 745 | - 'transport' => 'postMessage', | |
| 746 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 573 | + $this->customizer->add_control( new SelectControl( | |
| 574 | + $this->customizer, 'betterdocs_live_search_background_repeat', [ | |
| 575 | + 'type' => 'betterdocs-select', | |
| 576 | + 'section' => 'betterdocs_live_search_settings', | |
| 577 | + 'settings' => 'betterdocs_live_search_background_repeat', | |
| 578 | + 'label' => __( 'Repeat', 'betterdocs' ), | |
| 579 | + 'input_attrs' => [ | |
| 580 | + 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 581 | + ], | |
| 582 | + 'choices' => [ | |
| 583 | + 'no-repeat' => __( 'no-repeat', 'betterdocs' ), | |
| 584 | + 'initial' => __( 'initial', 'betterdocs' ), | |
| 585 | + 'inherit' => __( 'inherit', 'betterdocs' ), | |
| 586 | + 'repeat' => __( 'repeat', 'betterdocs' ), | |
| 587 | + 'repeat-x' => __( 'repeat-x', 'betterdocs' ), | |
| 588 | + 'repeat-y' => __( 'repeat-y', 'betterdocs' ) | |
| 589 | + ], | |
| 590 | + 'priority' => 513 | |
| 591 | + ] ) | |
| 592 | + ); | |
| 747 | 593 | |
| 748 | - ] | |
| 749 | - ); | |
| 594 | + $this->customizer->add_setting( 'betterdocs_live_search_background_attachment', [ | |
| 595 | + 'default' => $this->defaults['betterdocs_live_search_background_attachment'], | |
| 596 | + 'capability' => 'edit_theme_options', | |
| 597 | + 'transport' => 'postMessage', | |
| 598 | + 'sanitize_callback' => [$this->sanitizer, 'select'] | |
| 750 | 599 | |
| 751 | - $this->customizer->add_control( | |
| 752 | - new TitleControl( | |
| 753 | - $this->customizer, | |
| 754 | - 'betterdocs_search_subheading_margin', | |
| 755 | - [ | |
| 756 | - 'type' => 'betterdocs-title', | |
| 757 | - 'section' => 'betterdocs_live_search_settings', | |
| 758 | - 'settings' => 'betterdocs_search_subheading_margin', | |
| 759 | - 'label' => __( 'Sub Heading Margin', 'betterdocs' ), | |
| 760 | - 'input_attrs' => [ | |
| 761 | - 'id' => 'betterdocs_search_subheading_margin', | |
| 762 | - 'class' => 'betterdocs-dimension' | |
| 763 | - ], | |
| 764 | - 'priority' => 509 | |
| 765 | - ] | |
| 766 | - ) | |
| 767 | - ); | |
| 600 | + ] ); | |
| 768 | 601 | |
| 769 | - $this->customizer->add_setting( | |
| 770 | - 'betterdocs_search_subheading_margin_top', | |
| 771 | - [ | |
| 772 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_top'], | |
| 773 | - 'capability' => 'edit_theme_options', | |
| 774 | - 'transport' => 'postMessage', | |
| 775 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 776 | - ] | |
| 777 | - ); | |
| 602 | + $this->customizer->add_control( new SelectControl( | |
| 603 | + $this->customizer, 'betterdocs_live_search_background_attachment', [ | |
| 604 | + 'type' => 'betterdocs-select', | |
| 605 | + 'section' => 'betterdocs_live_search_settings', | |
| 606 | + 'settings' => 'betterdocs_live_search_background_attachment', | |
| 607 | + 'label' => __( 'Attachment', 'betterdocs' ), | |
| 608 | + 'input_attrs' => [ | |
| 609 | + 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 610 | + ], | |
| 611 | + 'choices' => [ | |
| 612 | + 'initial' => __( 'initial', 'betterdocs' ), | |
| 613 | + 'inherit' => __( 'inherit', 'betterdocs' ), | |
| 614 | + 'scroll' => __( 'scroll', 'betterdocs' ), | |
| 615 | + 'fixed' => __( 'fixed', 'betterdocs' ), | |
| 616 | + 'local' => __( 'local', 'betterdocs' ) | |
| 617 | + ], | |
| 618 | + 'priority' => 513 | |
| 619 | + ] ) | |
| 620 | + ); | |
| 778 | 621 | |
| 779 | - $this->customizer->add_control( | |
| 780 | - new DimensionControl( | |
| 781 | - $this->customizer, | |
| 782 | - 'betterdocs_search_subheading_margin_top', | |
| 783 | - [ | |
| 784 | - 'type' => 'betterdocs-dimension', | |
| 785 | - 'section' => 'betterdocs_live_search_settings', | |
| 786 | - 'settings' => 'betterdocs_search_subheading_margin_top', | |
| 787 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 788 | - 'input_attrs' => [ | |
| 789 | - 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 790 | - ], | |
| 791 | - 'priority' => 509 | |
| 792 | - ] | |
| 793 | - ) | |
| 794 | - ); | |
| 622 | + $this->customizer->add_setting( 'betterdocs_live_search_background_position', [ | |
| 623 | + 'default' => $this->defaults['betterdocs_live_search_background_position'], | |
| 624 | + 'capability' => 'edit_theme_options', | |
| 625 | + 'transport' => 'postMessage', | |
| 626 | + 'sanitize_callback' => 'esc_html' | |
| 795 | 627 | |
| 796 | - $this->customizer->add_setting( | |
| 797 | - 'betterdocs_search_subheading_margin_right', | |
| 798 | - [ | |
| 799 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_right'], | |
| 800 | - 'capability' => 'edit_theme_options', | |
| 801 | - 'transport' => 'postMessage', | |
| 802 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 628 | + ] ); | |
| 803 | 629 | |
| 804 | - ] | |
| 805 | - ); | |
| 630 | + $this->customizer->add_control( new SelectControl( | |
| 631 | + $this->customizer, 'betterdocs_live_search_background_position', [ | |
| 632 | + 'type' => 'betterdocs-select', | |
| 633 | + 'section' => 'betterdocs_live_search_settings', | |
| 634 | + 'settings' => 'betterdocs_live_search_background_position', | |
| 635 | + 'label' => __( 'Position', 'betterdocs' ), | |
| 636 | + 'input_attrs' => [ | |
| 637 | + 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 638 | + ], | |
| 639 | + 'choices' => [ | |
| 640 | + 'left top' => __( 'left top', 'betterdocs' ), | |
| 641 | + 'left center' => __( 'left center', 'betterdocs' ), | |
| 642 | + 'left bottom' => __( 'left bottom', 'betterdocs' ), | |
| 643 | + 'right top' => __( 'right top', 'betterdocs' ), | |
| 644 | + 'right center' => __( 'right center', 'betterdocs' ), | |
| 645 | + 'right bottom' => __( 'right bottom', 'betterdocs' ), | |
| 646 | + 'center top' => __( 'center top', 'betterdocs' ), | |
| 647 | + 'center center' => __( 'center center', 'betterdocs' ), | |
| 648 | + 'center bottom' => __( 'center bottom', 'betterdocs' ) | |
| 649 | + ], | |
| 650 | + 'priority' => 513 | |
| 651 | + ] ) | |
| 652 | + ); | |
| 653 | + } | |
| 806 | 654 | |
| 807 | - $this->customizer->add_control( | |
| 808 | - new DimensionControl( | |
| 809 | - $this->customizer, | |
| 810 | - 'betterdocs_search_subheading_margin_right', | |
| 811 | - [ | |
| 812 | - 'type' => 'betterdocs-dimension', | |
| 813 | - 'section' => 'betterdocs_live_search_settings', | |
| 814 | - 'settings' => 'betterdocs_search_subheading_margin_right', | |
| 815 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 816 | - 'input_attrs' => [ | |
| 817 | - 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 818 | - ], | |
| 819 | - 'priority' => 509 | |
| 820 | - ] | |
| 821 | - ) | |
| 822 | - ); | |
| 655 | + public function custom_background_switch() { | |
| 656 | + $this->customizer->add_setting( 'betterdocs_live_search_custom_background_switch', [ | |
| 657 | + 'default' => $this->defaults['betterdocs_live_search_custom_background_switch'], | |
| 658 | + 'capability' => 'edit_theme_options' | |
| 823 | 659 | |
| 824 | - $this->customizer->add_setting( | |
| 825 | - 'betterdocs_search_subheading_margin_bottom', | |
| 826 | - [ | |
| 827 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_bottom'], | |
| 828 | - 'capability' => 'edit_theme_options', | |
| 829 | - 'transport' => 'postMessage', | |
| 830 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 660 | + ] ); | |
| 831 | 661 | |
| 832 | - ] | |
| 833 | - ); | |
| 662 | + $this->customizer->add_control( new ToggleControl( | |
| 663 | + $this->customizer, 'betterdocs_live_search_custom_background_switch', [ | |
| 664 | + 'label' => __( 'Custom Background Image Size', 'betterdocs' ), | |
| 665 | + 'section' => 'betterdocs_live_search_settings', | |
| 666 | + 'settings' => 'betterdocs_live_search_custom_background_switch', | |
| 667 | + 'type' => 'light', // light, ios, flat | |
| 668 | + 'priority' => 515 | |
| 669 | + ] ) | |
| 670 | + ); | |
| 671 | + } | |
| 834 | 672 | |
| 835 | - $this->customizer->add_control( | |
| 836 | - new DimensionControl( | |
| 837 | - $this->customizer, | |
| 838 | - 'betterdocs_search_subheading_margin_bottom', | |
| 839 | - [ | |
| 840 | - 'type' => 'betterdocs-dimension', | |
| 841 | - 'section' => 'betterdocs_live_search_settings', | |
| 842 | - 'settings' => 'betterdocs_search_subheading_margin_bottom', | |
| 843 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 844 | - 'input_attrs' => [ | |
| 845 | - 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 846 | - ], | |
| 847 | - 'priority' => 509 | |
| 848 | - ] | |
| 849 | - ) | |
| 850 | - ); | |
| 673 | + public function custom_background_width() { | |
| 674 | + $this->customizer->add_setting( 'betterdocs_live_search_custom_background_width', [ | |
| 675 | + 'default' => $this->defaults['betterdocs_live_search_custom_background_width'], | |
| 676 | + 'capability' => 'edit_theme_options', | |
| 677 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 678 | + ] ); | |
| 851 | 679 | |
| 852 | - $this->customizer->add_setting( | |
| 853 | - 'betterdocs_search_subheading_margin_left', | |
| 854 | - [ | |
| 855 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_left'], | |
| 856 | - 'capability' => 'edit_theme_options', | |
| 857 | - 'transport' => 'postMessage', | |
| 858 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 680 | + $this->customizer->add_control( new RangeValueControl( | |
| 681 | + $this->customizer, 'betterdocs_live_search_custom_background_width', [ | |
| 682 | + 'type' => 'betterdocs-range-value', | |
| 683 | + 'section' => 'betterdocs_live_search_settings', | |
| 684 | + 'settings' => 'betterdocs_live_search_custom_background_width', | |
| 685 | + 'label' => __( 'Background Image Width', 'betterdocs' ), | |
| 686 | + 'input_attrs' => [ | |
| 687 | + 'class' => '', | |
| 688 | + 'min' => 0, | |
| 689 | + 'max' => 200, | |
| 690 | + 'step' => 1, | |
| 691 | + 'suffix' => '%' //optional suffix | |
| 692 | + ], | |
| 693 | + 'priority' => 516 | |
| 694 | + ] ) | |
| 695 | + ); | |
| 696 | + } | |
| 859 | 697 | |
| 860 | - ] | |
| 861 | - ); | |
| 698 | + public function custom_background_height() { | |
| 699 | + $this->customizer->add_setting( 'betterdocs_live_search_custom_background_height', [ | |
| 700 | + 'default' => $this->defaults['betterdocs_live_search_custom_background_height'], | |
| 701 | + 'capability' => 'edit_theme_options', | |
| 702 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 703 | + ] ); | |
| 862 | 704 | |
| 863 | - $this->customizer->add_control( | |
| 864 | - new DimensionControl( | |
| 865 | - $this->customizer, | |
| 866 | - 'betterdocs_search_subheading_margin_left', | |
| 867 | - [ | |
| 868 | - 'type' => 'betterdocs-dimension', | |
| 869 | - 'section' => 'betterdocs_live_search_settings', | |
| 870 | - 'settings' => 'betterdocs_search_subheading_margin_left', | |
| 871 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 872 | - 'input_attrs' => [ | |
| 873 | - 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 874 | - ], | |
| 875 | - 'priority' => 509 | |
| 876 | - ] | |
| 877 | - ) | |
| 878 | - ); | |
| 879 | - } | |
| 705 | + $this->customizer->add_control( new RangeValueControl( | |
| 706 | + $this->customizer, 'betterdocs_live_search_custom_background_height', [ | |
| 707 | + 'type' => 'betterdocs-range-value', | |
| 708 | + 'section' => 'betterdocs_live_search_settings', | |
| 709 | + 'settings' => 'betterdocs_live_search_custom_background_height', | |
| 710 | + 'label' => __( 'Background Image Height', 'betterdocs' ), | |
| 711 | + 'input_attrs' => [ | |
| 712 | + 'class' => '', | |
| 713 | + 'min' => 0, | |
| 714 | + 'max' => 200, | |
| 715 | + 'step' => 1, | |
| 716 | + 'suffix' => '%' //optional suffix | |
| 717 | + ], | |
| 718 | + 'priority' => 517 | |
| 719 | + ] ) | |
| 720 | + ); | |
| 721 | + } | |
| 880 | 722 | |
| 881 | - public function betterdocs_search_subheading_margin_layout_2() { | |
| 882 | - $this->customizer->add_setting( | |
| 883 | - 'betterdocs_search_subheading_margin_layout_2', | |
| 884 | - [ | |
| 885 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_layout_2'], | |
| 886 | - 'capability' => 'edit_theme_options', | |
| 887 | - 'transport' => 'postMessage', | |
| 888 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 723 | + public function search_margin() { | |
| 724 | + $this->customizer->add_setting( 'betterdocs_live_search_margin', [ | |
| 725 | + 'default' => $this->defaults['betterdocs_live_search_margin'], | |
| 726 | + 'capability' => 'edit_theme_options', | |
| 727 | + 'transport' => 'postMessage', | |
| 728 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 729 | + ] ); | |
| 889 | 730 | |
| 890 | - ] | |
| 891 | - ); | |
| 731 | + $this->customizer->add_control( new TitleControl( | |
| 732 | + $this->customizer, 'betterdocs_live_search_margin', [ | |
| 733 | + 'type' => 'betterdocs-title', | |
| 734 | + 'section' => 'betterdocs_live_search_settings', | |
| 735 | + 'settings' => 'betterdocs_live_search_margin', | |
| 736 | + 'label' => __( 'Margin', 'betterdocs' ), | |
| 737 | + 'input_attrs' => [ | |
| 738 | + 'id' => 'betterdocs_live_search_margin', | |
| 739 | + 'class' => 'betterdocs-dimension' | |
| 740 | + ], | |
| 741 | + 'priority' => 518 | |
| 742 | + ] ) | |
| 743 | + ); | |
| 892 | 744 | |
| 893 | - $this->customizer->add_control( | |
| 894 | - new TitleControl( | |
| 895 | - $this->customizer, | |
| 896 | - 'betterdocs_search_subheading_margin_layout_2', | |
| 897 | - [ | |
| 898 | - 'type' => 'betterdocs-title', | |
| 899 | - 'section' => 'betterdocs_live_search_settings', | |
| 900 | - 'settings' => 'betterdocs_search_subheading_margin_layout_2', | |
| 901 | - 'label' => __( 'Sub Heading Margin', 'betterdocs' ), | |
| 902 | - 'input_attrs' => [ | |
| 903 | - 'id' => 'betterdocs_search_subheading_margin_layout_2', | |
| 904 | - 'class' => 'betterdocs-dimension' | |
| 905 | - ], | |
| 906 | - 'priority' => 509 | |
| 907 | - ] | |
| 908 | - ) | |
| 909 | - ); | |
| 745 | + $this->customizer->add_setting( 'betterdocs_live_search_margin_top', [ | |
| 746 | + 'default' => $this->defaults['betterdocs_live_search_margin_top'], | |
| 747 | + 'capability' => 'edit_theme_options', | |
| 748 | + 'transport' => 'postMessage', | |
| 749 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 750 | + ] ); | |
| 910 | 751 | |
| 911 | - $this->customizer->add_setting( | |
| 912 | - 'betterdocs_search_subheading_margin_top_layout_2', | |
| 913 | - [ | |
| 914 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_top_layout_2'], | |
| 915 | - 'capability' => 'edit_theme_options', | |
| 916 | - 'transport' => 'postMessage', | |
| 917 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 918 | - ] | |
| 919 | - ); | |
| 752 | + $this->customizer->add_control( new DimensionControl( | |
| 753 | + $this->customizer, 'betterdocs_live_search_margin_top', [ | |
| 754 | + 'type' => 'betterdocs-dimension', | |
| 755 | + 'section' => 'betterdocs_live_search_settings', | |
| 756 | + 'settings' => 'betterdocs_live_search_margin_top', | |
| 757 | + 'label' => __( 'Top', 'betterdocs' ), | |
| 758 | + 'input_attrs' => [ | |
| 759 | + 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 760 | + ], | |
| 761 | + 'priority' => 518 | |
| 762 | + ] ) | |
| 763 | + ); | |
| 920 | 764 | |
| 921 | - $this->customizer->add_control( | |
| 922 | - new DimensionControl( | |
| 923 | - $this->customizer, | |
| 924 | - 'betterdocs_search_subheading_margin_top_layout_2', | |
| 925 | - [ | |
| 926 | - 'type' => 'betterdocs-dimension', | |
| 927 | - 'section' => 'betterdocs_live_search_settings', | |
| 928 | - 'settings' => 'betterdocs_search_subheading_margin_top_layout_2', | |
| 929 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 930 | - 'input_attrs' => [ | |
| 931 | - 'class' => 'betterdocs_search_subheading_margin_layout_2 betterdocs-dimension' | |
| 932 | - ], | |
| 933 | - 'priority' => 509 | |
| 934 | - ] | |
| 935 | - ) | |
| 936 | - ); | |
| 765 | + $this->customizer->add_setting( 'betterdocs_live_search_margin_right', [ | |
| 766 | + 'default' => $this->defaults['betterdocs_live_search_margin_right'], | |
| 767 | + 'capability' => 'edit_theme_options', | |
| 768 | + 'transport' => 'postMessage', | |
| 769 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 937 | 770 | |
| 938 | - $this->customizer->add_setting( | |
| 939 | - 'betterdocs_search_subheading_margin_right_layout_2', | |
| 940 | - [ | |
| 941 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_right_layout_2'], | |
| 942 | - 'capability' => 'edit_theme_options', | |
| 943 | - 'transport' => 'postMessage', | |
| 944 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 771 | + ] ); | |
| 945 | 772 | |
| 946 | - ] | |
| 947 | - ); | |
| 773 | + $this->customizer->add_control( new DimensionControl( | |
| 774 | + $this->customizer, 'betterdocs_live_search_margin_right', [ | |
| 775 | + 'type' => 'betterdocs-dimension', | |
| 776 | + 'section' => 'betterdocs_live_search_settings', | |
| 777 | + 'settings' => 'betterdocs_live_search_margin_right', | |
| 778 | + 'label' => __( 'Right', 'betterdocs' ), | |
| 779 | + 'input_attrs' => [ | |
| 780 | + 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 781 | + ], | |
| 782 | + 'priority' => 518 | |
| 783 | + ] ) | |
| 784 | + ); | |
| 948 | 785 | |
| 949 | - $this->customizer->add_control( | |
| 950 | - new DimensionControl( | |
| 951 | - $this->customizer, | |
| 952 | - 'betterdocs_search_subheading_margin_right_layout_2', | |
| 953 | - [ | |
| 954 | - 'type' => 'betterdocs-dimension', | |
| 955 | - 'section' => 'betterdocs_live_search_settings', | |
| 956 | - 'settings' => 'betterdocs_search_subheading_margin_right_layout_2', | |
| 957 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 958 | - 'input_attrs' => [ | |
| 959 | - 'class' => 'betterdocs_search_subheading_margin_layout_2 betterdocs-dimension' | |
| 960 | - ], | |
| 961 | - 'priority' => 509 | |
| 962 | - ] | |
| 963 | - ) | |
| 964 | - ); | |
| 786 | + $this->customizer->add_setting( 'betterdocs_live_search_margin_bottom', [ | |
| 787 | + 'default' => $this->defaults['betterdocs_live_search_margin_bottom'], | |
| 788 | + 'capability' => 'edit_theme_options', | |
| 789 | + 'transport' => 'postMessage', | |
| 790 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 965 | 791 | |
| 966 | - $this->customizer->add_setting( | |
| 967 | - 'betterdocs_search_subheading_margin_bottom_layout_2', | |
| 968 | - [ | |
| 969 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_bottom_layout_2'], | |
| 970 | - 'capability' => 'edit_theme_options', | |
| 971 | - 'transport' => 'postMessage', | |
| 972 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 792 | + ] ); | |
| 973 | 793 | |
| 974 | - ] | |
| 975 | - ); | |
| 794 | + $this->customizer->add_control( new DimensionControl( | |
| 795 | + $this->customizer, 'betterdocs_live_search_margin_bottom', [ | |
| 796 | + 'type' => 'betterdocs-dimension', | |
| 797 | + 'section' => 'betterdocs_live_search_settings', | |
| 798 | + 'settings' => 'betterdocs_live_search_margin_bottom', | |
| 799 | + 'label' => __( 'Bottom', 'betterdocs' ), | |
| 800 | + 'input_attrs' => [ | |
| 801 | + 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 802 | + ], | |
| 803 | + 'priority' => 518 | |
| 804 | + ] ) | |
| 805 | + ); | |
| 976 | 806 | |
| 977 | - $this->customizer->add_control( | |
| 978 | - new DimensionControl( | |
| 979 | - $this->customizer, | |
| 980 | - 'betterdocs_search_subheading_margin_bottom_layout_2', | |
| 981 | - [ | |
| 982 | - 'type' => 'betterdocs-dimension', | |
| 983 | - 'section' => 'betterdocs_live_search_settings', | |
| 984 | - 'settings' => 'betterdocs_search_subheading_margin_bottom_layout_2', | |
| 985 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 986 | - 'input_attrs' => [ | |
| 987 | - 'class' => 'betterdocs_search_subheading_margin_layout_2 betterdocs-dimension' | |
| 988 | - ], | |
| 989 | - 'priority' => 509 | |
| 990 | - ] | |
| 991 | - ) | |
| 992 | - ); | |
| 807 | + $this->customizer->add_setting( 'betterdocs_live_search_margin_left', [ | |
| 808 | + 'default' => $this->defaults['betterdocs_live_search_margin_left'], | |
| 809 | + 'capability' => 'edit_theme_options', | |
| 810 | + 'transport' => 'postMessage', | |
| 811 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 812 | + ] ); | |
| 993 | 813 | |
| 994 | - $this->customizer->add_setting( | |
| 995 | - 'betterdocs_search_subheading_margin_left_layout_2', | |
| 996 | - [ | |
| 997 | - 'default' => $this->defaults['betterdocs_search_subheading_margin_left_layout_2'], | |
| 998 | - 'capability' => 'edit_theme_options', | |
| 999 | - 'transport' => 'postMessage', | |
| 1000 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 814 | + $this->customizer->add_control( new DimensionControl( | |
| 815 | + $this->customizer, 'betterdocs_live_search_margin_left', [ | |
| 816 | + 'type' => 'betterdocs-dimension', | |
| 817 | + 'section' => 'betterdocs_live_search_settings', | |
| 818 | + 'settings' => 'betterdocs_live_search_margin_left', | |
| 819 | + 'label' => __( 'Left', 'betterdocs' ), | |
| 820 | + 'input_attrs' => [ | |
| 821 | + 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 822 | + ], | |
| 823 | + 'priority' => 518 | |
| 824 | + ] ) | |
| 825 | + ); | |
| 826 | + } | |
| 1001 | 827 | |
| 1002 | - ] | |
| 1003 | - ); | |
| 828 | + public function search_padding() { | |
| 829 | + $this->customizer->add_setting( 'betterdocs_live_search_padding', [ | |
| 830 | + 'default' => $this->defaults['betterdocs_live_search_padding'], | |
| 831 | + 'capability' => 'edit_theme_options', | |
| 832 | + 'transport' => 'postMessage', | |
| 833 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 834 | + ] ); | |
| 1004 | 835 | |
| 1005 | - $this->customizer->add_control( | |
| 1006 | - new DimensionControl( | |
| 1007 | - $this->customizer, | |
| 1008 | - 'betterdocs_search_subheading_margin_left_layout_2', | |
| 1009 | - [ | |
| 1010 | - 'type' => 'betterdocs-dimension', | |
| 1011 | - 'section' => 'betterdocs_live_search_settings', | |
| 1012 | - 'settings' => 'betterdocs_search_subheading_margin_left_layout_2', | |
| 1013 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 1014 | - 'input_attrs' => [ | |
| 1015 | - 'class' => 'betterdocs_search_subheading_margin betterdocs-dimension' | |
| 1016 | - ], | |
| 1017 | - 'priority' => 509 | |
| 1018 | - ] | |
| 1019 | - ) | |
| 1020 | - ); | |
| 1021 | - } | |
| 836 | + $this->customizer->add_control( new TitleControl( | |
| 837 | + $this->customizer, 'betterdocs_live_search_padding', [ | |
| 838 | + 'type' => 'betterdocs-title', | |
| 839 | + 'section' => 'betterdocs_live_search_settings', | |
| 840 | + 'settings' => 'betterdocs_live_search_padding', | |
| 841 | + 'label' => __( 'Padding', 'betterdocs' ), | |
| 842 | + 'input_attrs' => [ | |
| 843 | + 'id' => 'betterdocs_live_search_padding', | |
| 844 | + 'class' => 'betterdocs-dimension' | |
| 845 | + ], | |
| 846 | + 'priority' => 519 | |
| 847 | + ] ) | |
| 848 | + ); | |
| 1022 | 849 | |
| 850 | + $this->customizer->add_setting( 'betterdocs_live_search_padding_top', [ | |
| 851 | + 'default' => $this->defaults['betterdocs_live_search_padding_top'], | |
| 852 | + 'capability' => 'edit_theme_options', | |
| 853 | + 'transport' => 'postMessage', | |
| 854 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 855 | + ] ); | |
| 1023 | 856 | |
| 1024 | - public function background_color() { | |
| 1025 | - $this->customizer->add_setting( | |
| 1026 | - 'betterdocs_live_search_background_color', | |
| 1027 | - [ | |
| 1028 | - 'default' => $this->defaults['betterdocs_live_search_background_color'], | |
| 1029 | - 'capability' => 'edit_theme_options', | |
| 1030 | - 'transport' => 'postMessage', | |
| 1031 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 1032 | - ] | |
| 1033 | - ); | |
| 857 | + $this->customizer->add_control( new DimensionControl( | |
| 858 | + $this->customizer, 'betterdocs_live_search_padding_top', [ | |
| 859 | + 'type' => 'betterdocs-dimension', | |
| 860 | + 'section' => 'betterdocs_live_search_settings', | |
| 861 | + 'settings' => 'betterdocs_live_search_padding_top', | |
| 862 | + 'label' => __( 'Top', 'betterdocs' ), | |
| 863 | + 'input_attrs' => [ | |
| 864 | + 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 865 | + ], | |
| 866 | + 'priority' => 519 | |
| 867 | + ] ) | |
| 868 | + ); | |
| 1034 | 869 | |
| 1035 | - $this->customizer->add_control( | |
| 1036 | - new AlphaColorControl( | |
| 1037 | - $this->customizer, | |
| 1038 | - 'betterdocs_live_search_background_color', | |
| 1039 | - [ | |
| 1040 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 1041 | - 'section' => 'betterdocs_live_search_settings', | |
| 1042 | - 'settings' => 'betterdocs_live_search_background_color', | |
| 1043 | - 'priority' => 510 | |
| 1044 | - ] | |
| 1045 | - ) | |
| 1046 | - ); | |
| 1047 | - } | |
| 870 | + $this->customizer->add_setting( 'betterdocs_live_search_padding_right', [ | |
| 871 | + 'default' => $this->defaults['betterdocs_live_search_padding_right'], | |
| 872 | + 'capability' => 'edit_theme_options', | |
| 873 | + 'transport' => 'postMessage', | |
| 874 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1048 | 875 | |
| 1049 | - public function betterdocs_live_search_background_color_layout_2() { | |
| 1050 | - $this->customizer->add_setting( | |
| 1051 | - 'betterdocs_live_search_background_color_layout_2', | |
| 1052 | - [ | |
| 1053 | - 'default' => $this->defaults['betterdocs_live_search_background_color_layout_2'], | |
| 1054 | - 'capability' => 'edit_theme_options', | |
| 1055 | - 'transport' => 'postMessage', | |
| 1056 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 1057 | - ] | |
| 1058 | - ); | |
| 876 | + ] ); | |
| 1059 | 877 | |
| 1060 | - $this->customizer->add_control( | |
| 1061 | - new AlphaColorControl( | |
| 1062 | - $this->customizer, | |
| 1063 | - 'betterdocs_live_search_background_color_layout_2', | |
| 1064 | - [ | |
| 1065 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 1066 | - 'section' => 'betterdocs_live_search_settings', | |
| 1067 | - 'settings' => 'betterdocs_live_search_background_color_layout_2', | |
| 1068 | - 'priority' => 510 | |
| 1069 | - ] | |
| 1070 | - ) | |
| 1071 | - ); | |
| 1072 | - } | |
| 878 | + $this->customizer->add_control( new DimensionControl( | |
| 879 | + $this->customizer, 'betterdocs_live_search_padding_right', [ | |
| 880 | + 'type' => 'betterdocs-dimension', | |
| 881 | + 'section' => 'betterdocs_live_search_settings', | |
| 882 | + 'settings' => 'betterdocs_live_search_padding_right', | |
| 883 | + 'label' => __( 'Right', 'betterdocs' ), | |
| 884 | + 'input_attrs' => [ | |
| 885 | + 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 886 | + ], | |
| 887 | + 'priority' => 519 | |
| 888 | + ] ) | |
| 889 | + ); | |
| 1073 | 890 | |
| 1074 | - public function background_image() { | |
| 1075 | - $this->customizer->add_setting( | |
| 1076 | - 'betterdocs_live_search_background_image', | |
| 1077 | - [ | |
| 1078 | - 'default' => $this->defaults['betterdocs_live_search_background_image'], | |
| 1079 | - 'capability' => 'edit_theme_options', | |
| 1080 | - 'transport' => 'postMessage' | |
| 891 | + $this->customizer->add_setting( 'betterdocs_live_search_padding_bottom', [ | |
| 892 | + 'default' => $this->defaults['betterdocs_live_search_padding_bottom'], | |
| 893 | + 'capability' => 'edit_theme_options', | |
| 894 | + 'transport' => 'postMessage', | |
| 895 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 896 | + ] ); | |
| 1081 | 897 | |
| 1082 | - ] | |
| 1083 | - ); | |
| 898 | + $this->customizer->add_control( new DimensionControl( | |
| 899 | + $this->customizer, 'betterdocs_live_search_padding_bottom', [ | |
| 900 | + 'type' => 'betterdocs-dimension', | |
| 901 | + 'section' => 'betterdocs_live_search_settings', | |
| 902 | + 'settings' => 'betterdocs_live_search_padding_bottom', | |
| 903 | + 'label' => __( 'Bottom', 'betterdocs' ), | |
| 904 | + 'input_attrs' => [ | |
| 905 | + 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 906 | + ], | |
| 907 | + 'priority' => 519 | |
| 908 | + ] ) | |
| 909 | + ); | |
| 1084 | 910 | |
| 1085 | - $this->customizer->add_control( | |
| 1086 | - new WP_Customize_Image_Control( | |
| 1087 | - $this->customizer, | |
| 1088 | - 'betterdocs_live_search_background_image', | |
| 1089 | - [ | |
| 1090 | - 'section' => 'betterdocs_live_search_settings', | |
| 1091 | - 'settings' => 'betterdocs_live_search_background_image', | |
| 1092 | - 'label' => __( 'Background Image', 'betterdocs' ), | |
| 1093 | - 'priority' => 511 | |
| 1094 | - ] | |
| 1095 | - ) | |
| 1096 | - ); | |
| 1097 | - } | |
| 911 | + $this->customizer->add_setting( 'betterdocs_live_search_padding_left', [ | |
| 912 | + 'default' => $this->defaults['betterdocs_live_search_padding_left'], | |
| 913 | + 'capability' => 'edit_theme_options', | |
| 914 | + 'transport' => 'postMessage', | |
| 915 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1098 | 916 | |
| 1099 | - public function background_live_search_image_layout_2() { | |
| 1100 | - $this->customizer->add_setting( | |
| 1101 | - 'background_live_search_image_layout_2', | |
| 1102 | - [ | |
| 1103 | - 'default' => $this->defaults['background_live_search_image_layout_2'], | |
| 1104 | - 'capability' => 'edit_theme_options', | |
| 1105 | - 'transport' => 'postMessage' | |
| 917 | + ] ); | |
| 1106 | 918 | |
| 1107 | - ] | |
| 1108 | - ); | |
| 919 | + $this->customizer->add_control( new DimensionControl( | |
| 920 | + $this->customizer, 'betterdocs_live_search_padding_left', [ | |
| 921 | + 'type' => 'betterdocs-dimension', | |
| 922 | + 'section' => 'betterdocs_live_search_settings', | |
| 923 | + 'settings' => 'betterdocs_live_search_padding_left', | |
| 924 | + 'label' => __( 'Left', 'betterdocs' ), | |
| 925 | + 'input_attrs' => [ | |
| 926 | + 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 927 | + ], | |
| 928 | + 'priority' => 519 | |
| 929 | + ] ) | |
| 930 | + ); | |
| 931 | + } | |
| 1109 | 932 | |
| 1110 | - $this->customizer->add_control( | |
| 1111 | - new WP_Customize_Image_Control( | |
| 1112 | - $this->customizer, | |
| 1113 | - 'background_live_search_image_layout_2', | |
| 1114 | - [ | |
| 1115 | - 'section' => 'betterdocs_live_search_settings', | |
| 1116 | - 'settings' => 'background_live_search_image_layout_2', | |
| 1117 | - 'label' => __( 'Background Image', 'betterdocs' ), | |
| 1118 | - 'priority' => 511 | |
| 1119 | - ] | |
| 1120 | - ) | |
| 1121 | - ); | |
| 1122 | - } | |
| 933 | + public function field_settings() { | |
| 934 | + $this->customizer->add_setting( 'betterdocs_search_field_settings', [ | |
| 935 | + 'default' => $this->defaults['betterdocs_search_field_settings'], | |
| 936 | + 'sanitize_callback' => 'esc_html' | |
| 937 | + ] ); | |
| 1123 | 938 | |
| 1124 | - public function background_property() { | |
| 1125 | - $this->customizer->add_setting( | |
| 1126 | - 'betterdocs_live_search_background_property', | |
| 1127 | - [ | |
| 1128 | - 'default' => $this->defaults['betterdocs_live_search_background_property'], | |
| 1129 | - 'capability' => 'edit_theme_options', | |
| 1130 | - 'transport' => 'postMessage', | |
| 1131 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 1132 | - ] | |
| 1133 | - ); | |
| 939 | + $this->customizer->add_control( new SeparatorControl( | |
| 940 | + $this->customizer, 'betterdocs_search_field_settings', [ | |
| 941 | + 'label' => __( 'Search Field Settings', 'betterdocs' ), | |
| 942 | + 'settings' => 'betterdocs_search_field_settings', | |
| 943 | + 'section' => 'betterdocs_live_search_settings', | |
| 944 | + 'priority' => 530 | |
| 945 | + ] ) | |
| 946 | + ); | |
| 947 | + } | |
| 1134 | 948 | |
| 1135 | - $this->customizer->add_control( | |
| 1136 | - new TitleControl( | |
| 1137 | - $this->customizer, | |
| 1138 | - 'betterdocs_live_search_background_property', | |
| 1139 | - [ | |
| 1140 | - 'type' => 'betterdocs-title', | |
| 1141 | - 'section' => 'betterdocs_live_search_settings', | |
| 1142 | - 'settings' => 'betterdocs_live_search_background_property', | |
| 1143 | - 'label' => __( 'Background Property', 'betterdocs' ), | |
| 1144 | - 'input_attrs' => [ | |
| 1145 | - 'id' => 'betterdocs_live_search_background_property', | |
| 1146 | - 'class' => 'betterdocs-select' | |
| 1147 | - ], | |
| 1148 | - 'priority' => 512 | |
| 1149 | - ] | |
| 1150 | - ) | |
| 1151 | - ); | |
| 949 | + public function field_background_color() { | |
| 950 | + $this->customizer->add_setting( 'betterdocs_search_field_background_color', [ | |
| 951 | + 'default' => $this->defaults['betterdocs_search_field_background_color'], | |
| 952 | + 'capability' => 'edit_theme_options', | |
| 953 | + 'transport' => 'postMessage', | |
| 954 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 955 | + ] ); | |
| 1152 | 956 | |
| 1153 | - $this->customizer->add_setting( | |
| 1154 | - 'betterdocs_live_search_background_size', | |
| 1155 | - [ | |
| 1156 | - 'default' => $this->defaults['betterdocs_live_search_background_size'], | |
| 1157 | - 'capability' => 'edit_theme_options', | |
| 1158 | - 'transport' => 'postMessage', | |
| 1159 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 957 | + $this->customizer->add_control( | |
| 958 | + new AlphaColorControl( | |
| 959 | + $this->customizer, | |
| 960 | + 'betterdocs_search_field_background_color', | |
| 961 | + [ | |
| 962 | + 'label' => __( 'Search Field Background Color', 'betterdocs' ), | |
| 963 | + 'section' => 'betterdocs_live_search_settings', | |
| 964 | + 'settings' => 'betterdocs_search_field_background_color', | |
| 965 | + 'priority' => 531 | |
| 966 | + ] | |
| 967 | + ) | |
| 968 | + ); | |
| 969 | + } | |
| 1160 | 970 | |
| 1161 | - ] | |
| 1162 | - ); | |
| 971 | + public function field_font_size() { | |
| 972 | + $this->customizer->add_setting( 'betterdocs_search_field_font_size', [ | |
| 973 | + 'default' => $this->defaults['betterdocs_search_field_font_size'], | |
| 974 | + 'capability' => 'edit_theme_options', | |
| 975 | + 'transport' => 'postMessage', | |
| 976 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1163 | 977 | |
| 1164 | - $this->customizer->add_control( | |
| 1165 | - new SelectControl( | |
| 1166 | - $this->customizer, | |
| 1167 | - 'betterdocs_live_search_background_size', | |
| 1168 | - [ | |
| 1169 | - 'type' => 'betterdocs-select', | |
| 1170 | - 'section' => 'betterdocs_live_search_settings', | |
| 1171 | - 'settings' => 'betterdocs_live_search_background_size', | |
| 1172 | - 'label' => __( 'Size', 'betterdocs' ), | |
| 1173 | - 'input_attrs' => [ | |
| 1174 | - 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 1175 | - ], | |
| 1176 | - 'choices' => [ | |
| 1177 | - 'auto' => __( 'auto', 'betterdocs' ), | |
| 1178 | - 'length' => __( 'length', 'betterdocs' ), | |
| 1179 | - 'cover' => __( 'cover', 'betterdocs' ), | |
| 1180 | - 'contain' => __( 'contain', 'betterdocs' ), | |
| 1181 | - 'initial' => __( 'initial', 'betterdocs' ), | |
| 1182 | - 'inherit' => __( 'inherit', 'betterdocs' ) | |
| 1183 | - ], | |
| 1184 | - 'priority' => 513 | |
| 1185 | - ] | |
| 1186 | - ) | |
| 1187 | - ); | |
| 978 | + ] ); | |
| 1188 | 979 | |
| 1189 | - $this->customizer->add_setting( | |
| 1190 | - 'betterdocs_live_search_background_repeat', | |
| 1191 | - [ | |
| 1192 | - 'default' => $this->defaults['betterdocs_live_search_background_repeat'], | |
| 1193 | - 'capability' => 'edit_theme_options', | |
| 1194 | - 'transport' => 'postMessage', | |
| 1195 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 980 | + $this->customizer->add_control( new RangeValueControl( | |
| 981 | + $this->customizer, 'betterdocs_search_field_font_size', [ | |
| 982 | + 'type' => 'betterdocs-range-value', | |
| 983 | + 'section' => 'betterdocs_live_search_settings', | |
| 984 | + 'settings' => 'betterdocs_search_field_font_size', | |
| 985 | + 'label' => __( 'Search Field Font Size', 'betterdocs' ), | |
| 986 | + 'input_attrs' => [ | |
| 987 | + 'class' => '', | |
| 988 | + 'min' => 0, | |
| 989 | + 'max' => 50, | |
| 990 | + 'step' => 1, | |
| 991 | + 'suffix' => 'px' //optional suffix | |
| 992 | + ], | |
| 993 | + 'priority' => 532 | |
| 994 | + ] ) | |
| 995 | + ); | |
| 996 | + } | |
| 1196 | 997 | |
| 1197 | - ] | |
| 1198 | - ); | |
| 998 | + public function field_color() { | |
| 999 | + $this->customizer->add_setting( 'betterdocs_search_field_color', [ | |
| 1000 | + 'default' => $this->defaults['betterdocs_search_field_color'], | |
| 1001 | + 'capability' => 'edit_theme_options', | |
| 1002 | + 'transport' => 'postMessage', | |
| 1003 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1004 | + ] ); | |
| 1199 | 1005 | |
| 1200 | - $this->customizer->add_control( | |
| 1201 | - new SelectControl( | |
| 1202 | - $this->customizer, | |
| 1203 | - 'betterdocs_live_search_background_repeat', | |
| 1204 | - [ | |
| 1205 | - 'type' => 'betterdocs-select', | |
| 1206 | - 'section' => 'betterdocs_live_search_settings', | |
| 1207 | - 'settings' => 'betterdocs_live_search_background_repeat', | |
| 1208 | - 'label' => __( 'Repeat', 'betterdocs' ), | |
| 1209 | - 'input_attrs' => [ | |
| 1210 | - 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 1211 | - ], | |
| 1212 | - 'choices' => [ | |
| 1213 | - 'no-repeat' => __( 'no-repeat', 'betterdocs' ), | |
| 1214 | - 'initial' => __( 'initial', 'betterdocs' ), | |
| 1215 | - 'inherit' => __( 'inherit', 'betterdocs' ), | |
| 1216 | - 'repeat' => __( 'repeat', 'betterdocs' ), | |
| 1217 | - 'repeat-x' => __( 'repeat-x', 'betterdocs' ), | |
| 1218 | - 'repeat-y' => __( 'repeat-y', 'betterdocs' ) | |
| 1219 | - ], | |
| 1220 | - 'priority' => 513 | |
| 1221 | - ] | |
| 1222 | - ) | |
| 1223 | - ); | |
| 1006 | + $this->customizer->add_control( | |
| 1007 | + new AlphaColorControl( | |
| 1008 | + $this->customizer, | |
| 1009 | + 'betterdocs_search_field_color', | |
| 1010 | + [ | |
| 1011 | + 'label' => __( 'Search Text Color', 'betterdocs' ), | |
| 1012 | + 'section' => 'betterdocs_live_search_settings', | |
| 1013 | + 'settings' => 'betterdocs_search_field_color', | |
| 1014 | + 'priority' => 533 | |
| 1015 | + ] | |
| 1016 | + ) | |
| 1017 | + ); | |
| 1018 | + } | |
| 1224 | 1019 | |
| 1225 | - $this->customizer->add_setting( | |
| 1226 | - 'betterdocs_live_search_background_attachment', | |
| 1227 | - [ | |
| 1228 | - 'default' => $this->defaults['betterdocs_live_search_background_attachment'], | |
| 1229 | - 'capability' => 'edit_theme_options', | |
| 1230 | - 'transport' => 'postMessage', | |
| 1231 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 1020 | + public function placeholder_color() { | |
| 1021 | + $this->customizer->add_setting( 'betterdocs_search_placeholder_color', [ | |
| 1022 | + 'default' => $this->defaults['betterdocs_search_placeholder_color'], | |
| 1023 | + 'capability' => 'edit_theme_options', | |
| 1024 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1025 | + ] ); | |
| 1232 | 1026 | |
| 1233 | - ] | |
| 1234 | - ); | |
| 1027 | + $this->customizer->add_control( | |
| 1028 | + new AlphaColorControl( | |
| 1029 | + $this->customizer, | |
| 1030 | + 'betterdocs_search_placeholder_color', | |
| 1031 | + [ | |
| 1032 | + 'label' => __( 'Search Placeholder Color', 'betterdocs' ), | |
| 1033 | + 'section' => 'betterdocs_live_search_settings', | |
| 1034 | + 'settings' => 'betterdocs_search_placeholder_color', | |
| 1035 | + 'priority' => 533 | |
| 1036 | + ] | |
| 1037 | + ) | |
| 1038 | + ); | |
| 1039 | + } | |
| 1235 | 1040 | |
| 1236 | - $this->customizer->add_control( | |
| 1237 | - new SelectControl( | |
| 1238 | - $this->customizer, | |
| 1239 | - 'betterdocs_live_search_background_attachment', | |
| 1240 | - [ | |
| 1241 | - 'type' => 'betterdocs-select', | |
| 1242 | - 'section' => 'betterdocs_live_search_settings', | |
| 1243 | - 'settings' => 'betterdocs_live_search_background_attachment', | |
| 1244 | - 'label' => __( 'Attachment', 'betterdocs' ), | |
| 1245 | - 'input_attrs' => [ | |
| 1246 | - 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 1247 | - ], | |
| 1248 | - 'choices' => [ | |
| 1249 | - 'initial' => __( 'initial', 'betterdocs' ), | |
| 1250 | - 'inherit' => __( 'inherit', 'betterdocs' ), | |
| 1251 | - 'scroll' => __( 'scroll', 'betterdocs' ), | |
| 1252 | - 'fixed' => __( 'fixed', 'betterdocs' ), | |
| 1253 | - 'local' => __( 'local', 'betterdocs' ) | |
| 1254 | - ], | |
| 1255 | - 'priority' => 513 | |
| 1256 | - ] | |
| 1257 | - ) | |
| 1258 | - ); | |
| 1041 | + public function field_padding() { | |
| 1042 | + $this->customizer->add_setting( 'betterdocs_search_field_padding', [ | |
| 1043 | + 'default' => $this->defaults['betterdocs_search_field_padding'], | |
| 1044 | + 'capability' => 'edit_theme_options', | |
| 1045 | + 'transport' => 'postMessage', | |
| 1046 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1259 | 1047 | |
| 1260 | - $this->customizer->add_setting( | |
| 1261 | - 'betterdocs_live_search_background_position', | |
| 1262 | - [ | |
| 1263 | - 'default' => $this->defaults['betterdocs_live_search_background_position'], | |
| 1264 | - 'capability' => 'edit_theme_options', | |
| 1265 | - 'transport' => 'postMessage', | |
| 1266 | - 'sanitize_callback' => 'esc_html' | |
| 1048 | + ] ); | |
| 1267 | 1049 | |
| 1268 | - ] | |
| 1269 | - ); | |
| 1050 | + $this->customizer->add_control( new TitleControl( | |
| 1051 | + $this->customizer, 'betterdocs_search_field_padding', [ | |
| 1052 | + 'type' => 'betterdocs-title', | |
| 1053 | + 'section' => 'betterdocs_live_search_settings', | |
| 1054 | + 'settings' => 'betterdocs_search_field_padding', | |
| 1055 | + 'label' => __( 'Search Field Padding', 'betterdocs' ), | |
| 1056 | + 'input_attrs' => [ | |
| 1057 | + 'id' => 'betterdocs_search_field_padding', | |
| 1058 | + 'class' => 'betterdocs-dimension' | |
| 1059 | + ], | |
| 1060 | + 'priority' => 534 | |
| 1061 | + ] ) | |
| 1062 | + ); | |
| 1270 | 1063 | |
| 1271 | - $this->customizer->add_control( | |
| 1272 | - new SelectControl( | |
| 1273 | - $this->customizer, | |
| 1274 | - 'betterdocs_live_search_background_position', | |
| 1275 | - [ | |
| 1276 | - 'type' => 'betterdocs-select', | |
| 1277 | - 'section' => 'betterdocs_live_search_settings', | |
| 1278 | - 'settings' => 'betterdocs_live_search_background_position', | |
| 1279 | - 'label' => __( 'Position', 'betterdocs' ), | |
| 1280 | - 'input_attrs' => [ | |
| 1281 | - 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 1282 | - ], | |
| 1283 | - 'choices' => [ | |
| 1284 | - 'left top' => __( 'left top', 'betterdocs' ), | |
| 1285 | - 'left center' => __( 'left center', 'betterdocs' ), | |
| 1286 | - 'left bottom' => __( 'left bottom', 'betterdocs' ), | |
| 1287 | - 'right top' => __( 'right top', 'betterdocs' ), | |
| 1288 | - 'right center' => __( 'right center', 'betterdocs' ), | |
| 1289 | - 'right bottom' => __( 'right bottom', 'betterdocs' ), | |
| 1290 | - 'center top' => __( 'center top', 'betterdocs' ), | |
| 1291 | - 'center center' => __( 'center center', 'betterdocs' ), | |
| 1292 | - 'center bottom' => __( 'center bottom', 'betterdocs' ) | |
| 1293 | - ], | |
| 1294 | - 'priority' => 513 | |
| 1295 | - ] | |
| 1296 | - ) | |
| 1297 | - ); | |
| 1298 | - } | |
| 1064 | + $this->customizer->add_setting( 'betterdocs_search_field_padding_top', [ | |
| 1065 | + 'default' => $this->defaults['betterdocs_search_field_padding_top'], | |
| 1066 | + 'capability' => 'edit_theme_options', | |
| 1067 | + 'transport' => 'postMessage', | |
| 1068 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1069 | + ] ); | |
| 1299 | 1070 | |
| 1300 | - public function background_property_layout_2() { | |
| 1301 | - $this->customizer->add_setting( | |
| 1302 | - 'betterdocs_live_search_background_property_layout_2', | |
| 1303 | - [ | |
| 1304 | - 'default' => $this->defaults['betterdocs_live_search_background_property_layout_2'], | |
| 1305 | - 'capability' => 'edit_theme_options', | |
| 1306 | - 'transport' => 'postMessage', | |
| 1307 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 1308 | - ] | |
| 1309 | - ); | |
| 1071 | + $this->customizer->add_control( new DimensionControl( | |
| 1072 | + $this->customizer, 'betterdocs_search_field_padding_top', [ | |
| 1073 | + 'type' => 'betterdocs-dimension', | |
| 1074 | + 'section' => 'betterdocs_live_search_settings', | |
| 1075 | + 'settings' => 'betterdocs_search_field_padding_top', | |
| 1076 | + 'label' => __( 'Top', 'betterdocs' ), | |
| 1077 | + 'input_attrs' => [ | |
| 1078 | + 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 1079 | + ], | |
| 1080 | + 'priority' => 534 | |
| 1081 | + ] ) | |
| 1082 | + ); | |
| 1310 | 1083 | |
| 1311 | - $this->customizer->add_control( | |
| 1312 | - new TitleControl( | |
| 1313 | - $this->customizer, | |
| 1314 | - 'betterdocs_live_search_background_property_layout_2', | |
| 1315 | - [ | |
| 1316 | - 'type' => 'betterdocs-title', | |
| 1317 | - 'section' => 'betterdocs_live_search_settings', | |
| 1318 | - 'settings' => 'betterdocs_live_search_background_property_layout_2', | |
| 1319 | - 'label' => __( 'Background Property', 'betterdocs' ), | |
| 1320 | - 'input_attrs' => [ | |
| 1321 | - 'id' => 'betterdocs_live_search_background_property_layout_2', | |
| 1322 | - 'class' => 'betterdocs-select' | |
| 1323 | - ], | |
| 1324 | - 'priority' => 512 | |
| 1325 | - ] | |
| 1326 | - ) | |
| 1327 | - ); | |
| 1084 | + $this->customizer->add_setting( 'betterdocs_search_field_padding_right', [ | |
| 1085 | + 'default' => $this->defaults['betterdocs_search_field_padding_right'], | |
| 1086 | + 'capability' => 'edit_theme_options', | |
| 1087 | + 'transport' => 'postMessage', | |
| 1088 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1328 | 1089 | |
| 1329 | - $this->customizer->add_setting( | |
| 1330 | - 'betterdocs_live_search_background_size_layout_2', | |
| 1331 | - [ | |
| 1332 | - 'default' => $this->defaults['betterdocs_live_search_background_size_layout_2'], | |
| 1333 | - 'capability' => 'edit_theme_options', | |
| 1334 | - 'transport' => 'postMessage', | |
| 1335 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 1090 | + ] ); | |
| 1336 | 1091 | |
| 1337 | - ] | |
| 1338 | - ); | |
| 1092 | + $this->customizer->add_control( new DimensionControl( | |
| 1093 | + $this->customizer, 'betterdocs_search_field_padding_right', [ | |
| 1094 | + 'type' => 'betterdocs-dimension', | |
| 1095 | + 'section' => 'betterdocs_live_search_settings', | |
| 1096 | + 'settings' => 'betterdocs_search_field_padding_right', | |
| 1097 | + 'label' => __( 'Right', 'betterdocs' ), | |
| 1098 | + 'input_attrs' => [ | |
| 1099 | + 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 1100 | + ], | |
| 1101 | + 'priority' => 534 | |
| 1102 | + ] ) | |
| 1103 | + ); | |
| 1339 | 1104 | |
| 1340 | - $this->customizer->add_control( | |
| 1341 | - new SelectControl( | |
| 1342 | - $this->customizer, | |
| 1343 | - 'betterdocs_live_search_background_size_layout_2', | |
| 1344 | - [ | |
| 1345 | - 'type' => 'betterdocs-select', | |
| 1346 | - 'section' => 'betterdocs_live_search_settings', | |
| 1347 | - 'settings' => 'betterdocs_live_search_background_size_layout_2', | |
| 1348 | - 'label' => __( 'Size', 'betterdocs' ), | |
| 1349 | - 'input_attrs' => [ | |
| 1350 | - 'class' => 'betterdocs_live_search_background_property betterdocs-select' | |
| 1351 | - ], | |
| 1352 | - 'choices' => [ | |
| 1353 | - 'auto' => __( 'auto', 'betterdocs' ), | |
| 1354 | - 'length' => __( 'length', 'betterdocs' ), | |
| 1355 | - 'cover' => __( 'cover', 'betterdocs' ), | |
| 1356 | - 'contain' => __( 'contain', 'betterdocs' ), | |
| 1357 | - 'initial' => __( 'initial', 'betterdocs' ), | |
| 1358 | - 'inherit' => __( 'inherit', 'betterdocs' ) | |
| 1359 | - ], | |
| 1360 | - 'priority' => 513 | |
| 1361 | - ] | |
| 1362 | - ) | |
| 1363 | - ); | |
| 1105 | + $this->customizer->add_setting( 'betterdocs_search_field_padding_bottom', [ | |
| 1106 | + 'default' => $this->defaults['betterdocs_search_field_padding_bottom'], | |
| 1107 | + 'capability' => 'edit_theme_options', | |
| 1108 | + 'transport' => 'postMessage', | |
| 1109 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1364 | 1110 | |
| 1365 | - $this->customizer->add_setting( | |
| 1366 | - 'betterdocs_live_search_background_repeat_layout_2', | |
| 1367 | - [ | |
| 1368 | - 'default' => $this->defaults['betterdocs_live_search_background_repeat_layout_2'], | |
| 1369 | - 'capability' => 'edit_theme_options', | |
| 1370 | - 'transport' => 'postMessage', | |
| 1371 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 1111 | + ] ); | |
| 1372 | 1112 | |
| 1373 | - ] | |
| 1374 | - ); | |
| 1113 | + $this->customizer->add_control( new DimensionControl( | |
| 1114 | + $this->customizer, 'betterdocs_search_field_padding_bottom', [ | |
| 1115 | + 'type' => 'betterdocs-dimension', | |
| 1116 | + 'section' => 'betterdocs_live_search_settings', | |
| 1117 | + 'settings' => 'betterdocs_search_field_padding_bottom', | |
| 1118 | + 'label' => __( 'Bottom', 'betterdocs' ), | |
| 1119 | + 'input_attrs' => [ | |
| 1120 | + 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 1121 | + ], | |
| 1122 | + 'priority' => 534 | |
| 1123 | + ] ) | |
| 1124 | + ); | |
| 1375 | 1125 | |
| 1376 | - $this->customizer->add_control( | |
| 1377 | - new SelectControl( | |
| 1378 | - $this->customizer, | |
| 1379 | - 'betterdocs_live_search_background_repeat_layout_2', | |
| 1380 | - [ | |
| 1381 | - 'type' => 'betterdocs-select', | |
| 1382 | - 'section' => 'betterdocs_live_search_settings', | |
| 1383 | - 'settings' => 'betterdocs_live_search_background_repeat_layout_2', | |
| 1384 | - 'label' => __( 'Repeat', 'betterdocs' ), | |
| 1385 | - 'input_attrs' => [ | |
| 1386 | - 'class' => 'betterdocs_live_search_background_property_layout_2 betterdocs-select' | |
| 1387 | - ], | |
| 1388 | - 'choices' => [ | |
| 1389 | - 'no-repeat' => __( 'no-repeat', 'betterdocs' ), | |
| 1390 | - 'initial' => __( 'initial', 'betterdocs' ), | |
| 1391 | - 'inherit' => __( 'inherit', 'betterdocs' ), | |
| 1392 | - 'repeat' => __( 'repeat', 'betterdocs' ), | |
| 1393 | - 'repeat-x' => __( 'repeat-x', 'betterdocs' ), | |
| 1394 | - 'repeat-y' => __( 'repeat-y', 'betterdocs' ) | |
| 1395 | - ], | |
| 1396 | - 'priority' => 513 | |
| 1397 | - ] | |
| 1398 | - ) | |
| 1399 | - ); | |
| 1126 | + $this->customizer->add_setting( 'betterdocs_search_field_padding_left', [ | |
| 1127 | + 'default' => $this->defaults['betterdocs_search_field_padding_left'], | |
| 1128 | + 'capability' => 'edit_theme_options', | |
| 1129 | + 'transport' => 'postMessage', | |
| 1130 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1400 | 1131 | |
| 1401 | - $this->customizer->add_setting( | |
| 1402 | - 'betterdocs_live_search_background_attachment_layout_2', | |
| 1403 | - [ | |
| 1404 | - 'default' => $this->defaults['betterdocs_live_search_background_attachment_layout_2'], | |
| 1405 | - 'capability' => 'edit_theme_options', | |
| 1406 | - 'transport' => 'postMessage', | |
| 1407 | - 'sanitize_callback' => [ $this->sanitizer, 'select' ] | |
| 1132 | + ] ); | |
| 1408 | 1133 | |
| 1409 | - ] | |
| 1410 | - ); | |
| 1134 | + $this->customizer->add_control( new DimensionControl( | |
| 1135 | + $this->customizer, 'betterdocs_search_field_padding_left', [ | |
| 1136 | + 'type' => 'betterdocs-dimension', | |
| 1137 | + 'section' => 'betterdocs_live_search_settings', | |
| 1138 | + 'settings' => 'betterdocs_search_field_padding_left', | |
| 1139 | + 'label' => __( 'Left', 'betterdocs' ), | |
| 1140 | + 'input_attrs' => [ | |
| 1141 | + 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 1142 | + ], | |
| 1143 | + 'priority' => 534 | |
| 1144 | + ] ) | |
| 1145 | + ); | |
| 1146 | + } | |
| 1411 | 1147 | |
| 1412 | - $this->customizer->add_control( | |
| 1413 | - new SelectControl( | |
| 1414 | - $this->customizer, | |
| 1415 | - 'betterdocs_live_search_background_attachment_layout_2', | |
| 1416 | - [ | |
| 1417 | - 'type' => 'betterdocs-select', | |
| 1418 | - 'section' => 'betterdocs_live_search_settings', | |
| 1419 | - 'settings' => 'betterdocs_live_search_background_attachment', | |
| 1420 | - 'label' => __( 'Attachment', 'betterdocs' ), | |
| 1421 | - 'input_attrs' => [ | |
| 1422 | - 'class' => 'betterdocs_live_search_background_property_layout_2 betterdocs-select' | |
| 1423 | - ], | |
| 1424 | - 'choices' => [ | |
| 1425 | - 'initial' => __( 'initial', 'betterdocs' ), | |
| 1426 | - 'inherit' => __( 'inherit', 'betterdocs' ), | |
| 1427 | - 'scroll' => __( 'scroll', 'betterdocs' ), | |
| 1428 | - 'fixed' => __( 'fixed', 'betterdocs' ), | |
| 1429 | - 'local' => __( 'local', 'betterdocs' ) | |
| 1430 | - ], | |
| 1431 | - 'priority' => 513 | |
| 1432 | - ] | |
| 1433 | - ) | |
| 1434 | - ); | |
| 1148 | + public function field_border_radius() { | |
| 1149 | + $this->customizer->add_setting( 'betterdocs_search_field_border_radius', [ | |
| 1150 | + 'default' => $this->defaults['betterdocs_search_field_border_radius'], | |
| 1151 | + 'capability' => 'edit_theme_options', | |
| 1152 | + 'transport' => 'postMessage', | |
| 1153 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1435 | 1154 | |
| 1436 | - $this->customizer->add_setting( | |
| 1437 | - 'betterdocs_live_search_background_position_layout_2', | |
| 1438 | - [ | |
| 1439 | - 'default' => $this->defaults['betterdocs_live_search_background_position_layout_2'], | |
| 1440 | - 'capability' => 'edit_theme_options', | |
| 1441 | - 'transport' => 'postMessage', | |
| 1442 | - 'sanitize_callback' => 'esc_html' | |
| 1155 | + ] ); | |
| 1443 | 1156 | |
| 1444 | - ] | |
| 1445 | - ); | |
| 1157 | + $this->customizer->add_control( new RangeValueControl( | |
| 1158 | + $this->customizer, 'betterdocs_search_field_border_radius', [ | |
| 1159 | + 'type' => 'betterdocs-range-value', | |
| 1160 | + 'section' => 'betterdocs_live_search_settings', | |
| 1161 | + 'settings' => 'betterdocs_search_field_border_radius', | |
| 1162 | + 'label' => __( 'Search Field Border Radius', 'betterdocs' ), | |
| 1163 | + 'input_attrs' => [ | |
| 1164 | + 'class' => '', | |
| 1165 | + 'min' => 0, | |
| 1166 | + 'max' => 100, | |
| 1167 | + 'step' => 1, | |
| 1168 | + 'suffix' => 'px' //optional suffix | |
| 1169 | + ], | |
| 1170 | + 'priority' => 539 | |
| 1171 | + ] ) | |
| 1172 | + ); | |
| 1173 | + } | |
| 1446 | 1174 | |
| 1447 | - $this->customizer->add_control( | |
| 1448 | - new SelectControl( | |
| 1449 | - $this->customizer, | |
| 1450 | - 'betterdocs_live_search_background_position_layout_2', | |
| 1451 | - [ | |
| 1452 | - 'type' => 'betterdocs-select', | |
| 1453 | - 'section' => 'betterdocs_live_search_settings', | |
| 1454 | - 'settings' => 'betterdocs_live_search_background_position_layout_2', | |
| 1455 | - 'label' => __( 'Position', 'betterdocs' ), | |
| 1456 | - 'input_attrs' => [ | |
| 1457 | - 'class' => 'betterdocs_live_search_background_property_layout_2 betterdocs-select' | |
| 1458 | - ], | |
| 1459 | - 'choices' => [ | |
| 1460 | - 'left top' => __( 'left top', 'betterdocs' ), | |
| 1461 | - 'left center' => __( 'left center', 'betterdocs' ), | |
| 1462 | - 'left bottom' => __( 'left bottom', 'betterdocs' ), | |
| 1463 | - 'right top' => __( 'right top', 'betterdocs' ), | |
| 1464 | - 'right center' => __( 'right center', 'betterdocs' ), | |
| 1465 | - 'right bottom' => __( 'right bottom', 'betterdocs' ), | |
| 1466 | - 'center top' => __( 'center top', 'betterdocs' ), | |
| 1467 | - 'center center' => __( 'center center', 'betterdocs' ), | |
| 1468 | - 'center bottom' => __( 'center bottom', 'betterdocs' ) | |
| 1469 | - ], | |
| 1470 | - 'priority' => 513 | |
| 1471 | - ] | |
| 1472 | - ) | |
| 1473 | - ); | |
| 1474 | - } | |
| 1175 | + public function icon_size() { | |
| 1176 | + $this->customizer->add_setting( 'betterdocs_search_icon_size', [ | |
| 1177 | + 'default' => $this->defaults['betterdocs_search_icon_size'], | |
| 1178 | + 'capability' => 'edit_theme_options', | |
| 1179 | + 'transport' => 'postMessage', | |
| 1180 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1181 | + ] ); | |
| 1475 | 1182 | |
| 1476 | - public function custom_background_switch() { | |
| 1477 | - $this->customizer->add_setting( | |
| 1478 | - 'betterdocs_live_search_custom_background_switch', | |
| 1479 | - [ | |
| 1480 | - 'default' => $this->defaults['betterdocs_live_search_custom_background_switch'], | |
| 1481 | - 'capability' => 'edit_theme_options' | |
| 1183 | + $this->customizer->add_control( new RangeValueControl( | |
| 1184 | + $this->customizer, 'betterdocs_search_icon_size', [ | |
| 1185 | + 'type' => 'betterdocs-range-value', | |
| 1186 | + 'section' => 'betterdocs_live_search_settings', | |
| 1187 | + 'settings' => 'betterdocs_search_icon_size', | |
| 1188 | + 'label' => __( 'Search Icon Size', 'betterdocs' ), | |
| 1189 | + 'input_attrs' => [ | |
| 1190 | + 'min' => 0, | |
| 1191 | + 'max' => 100, | |
| 1192 | + 'step' => 1, | |
| 1193 | + 'suffix' => 'px' //optional suffix | |
| 1194 | + ], | |
| 1195 | + 'priority' => 540 | |
| 1196 | + ] ) | |
| 1197 | + ); | |
| 1198 | + } | |
| 1482 | 1199 | |
| 1483 | - ] | |
| 1484 | - ); | |
| 1200 | + public function icon_color() { | |
| 1201 | + $this->customizer->add_setting( 'betterdocs_search_icon_color', [ | |
| 1202 | + 'default' => $this->defaults['betterdocs_search_icon_color'], | |
| 1203 | + 'capability' => 'edit_theme_options', | |
| 1204 | + 'transport' => 'postMessage', | |
| 1205 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1206 | + ] ); | |
| 1485 | 1207 | |
| 1486 | - $this->customizer->add_control( | |
| 1487 | - new ToggleControl( | |
| 1488 | - $this->customizer, | |
| 1489 | - 'betterdocs_live_search_custom_background_switch', | |
| 1490 | - [ | |
| 1491 | - 'label' => __( 'Custom Background Image Size', 'betterdocs' ), | |
| 1492 | - 'section' => 'betterdocs_live_search_settings', | |
| 1493 | - 'settings' => 'betterdocs_live_search_custom_background_switch', | |
| 1494 | - 'type' => 'light', // light, ios, flat | |
| 1495 | - 'priority' => 515 | |
| 1496 | - ] | |
| 1497 | - ) | |
| 1498 | - ); | |
| 1499 | - } | |
| 1208 | + $this->customizer->add_control( | |
| 1209 | + new AlphaColorControl( | |
| 1210 | + $this->customizer, | |
| 1211 | + 'betterdocs_search_icon_color', | |
| 1212 | + [ | |
| 1213 | + 'label' => __( 'Search Icon Color', 'betterdocs' ), | |
| 1214 | + 'section' => 'betterdocs_live_search_settings', | |
| 1215 | + 'settings' => 'betterdocs_search_icon_color', | |
| 1216 | + 'priority' => 541 | |
| 1217 | + ] | |
| 1218 | + ) | |
| 1219 | + ); | |
| 1220 | + } | |
| 1500 | 1221 | |
| 1501 | - public function custom_background_width() { | |
| 1502 | - $this->customizer->add_setting( | |
| 1503 | - 'betterdocs_live_search_custom_background_width', | |
| 1504 | - [ | |
| 1505 | - 'default' => $this->defaults['betterdocs_live_search_custom_background_width'], | |
| 1506 | - 'capability' => 'edit_theme_options', | |
| 1507 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1508 | - ] | |
| 1509 | - ); | |
| 1222 | + public function icon_hover_color() { | |
| 1223 | + $this->customizer->add_setting( 'betterdocs_search_icon_hover_color', [ | |
| 1224 | + 'default' => $this->defaults['betterdocs_search_icon_hover_color'], | |
| 1225 | + 'capability' => 'edit_theme_options', | |
| 1226 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1227 | + ] ); | |
| 1510 | 1228 | |
| 1511 | - $this->customizer->add_control( | |
| 1512 | - new RangeValueControl( | |
| 1513 | - $this->customizer, | |
| 1514 | - 'betterdocs_live_search_custom_background_width', | |
| 1515 | - [ | |
| 1516 | - 'type' => 'betterdocs-range-value', | |
| 1517 | - 'section' => 'betterdocs_live_search_settings', | |
| 1518 | - 'settings' => 'betterdocs_live_search_custom_background_width', | |
| 1519 | - 'label' => __( 'Background Image Width', 'betterdocs' ), | |
| 1520 | - 'input_attrs' => [ | |
| 1521 | - 'class' => '', | |
| 1522 | - 'min' => 0, | |
| 1523 | - 'max' => 200, | |
| 1524 | - 'step' => 1, | |
| 1525 | - 'suffix' => '%' //optional suffix | |
| 1526 | - ], | |
| 1527 | - 'priority' => 516 | |
| 1528 | - ] | |
| 1529 | - ) | |
| 1530 | - ); | |
| 1531 | - } | |
| 1229 | + $this->customizer->add_control( | |
| 1230 | + new AlphaColorControl( | |
| 1231 | + $this->customizer, | |
| 1232 | + 'betterdocs_search_icon_hover_color', | |
| 1233 | + [ | |
| 1234 | + 'label' => __( 'Search Icon Hover Color', 'betterdocs' ), | |
| 1235 | + 'section' => 'betterdocs_live_search_settings', | |
| 1236 | + 'settings' => 'betterdocs_search_icon_hover_color', | |
| 1237 | + 'priority' => 542 | |
| 1238 | + ] | |
| 1239 | + ) | |
| 1240 | + ); | |
| 1241 | + } | |
| 1532 | 1242 | |
| 1533 | - public function custom_background_height() { | |
| 1534 | - $this->customizer->add_setting( | |
| 1535 | - 'betterdocs_live_search_custom_background_height', | |
| 1536 | - [ | |
| 1537 | - 'default' => $this->defaults['betterdocs_live_search_custom_background_height'], | |
| 1538 | - 'capability' => 'edit_theme_options', | |
| 1539 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1540 | - ] | |
| 1541 | - ); | |
| 1243 | + public function close_icon_color() { | |
| 1244 | + $this->customizer->add_setting( 'betterdocs_search_close_icon_color', [ | |
| 1245 | + 'default' => $this->defaults['betterdocs_search_close_icon_color'], | |
| 1246 | + 'capability' => 'edit_theme_options', | |
| 1247 | + 'transport' => 'postMessage', | |
| 1248 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1249 | + ] ); | |
| 1542 | 1250 | |
| 1543 | - $this->customizer->add_control( | |
| 1544 | - new RangeValueControl( | |
| 1545 | - $this->customizer, | |
| 1546 | - 'betterdocs_live_search_custom_background_height', | |
| 1547 | - [ | |
| 1548 | - 'type' => 'betterdocs-range-value', | |
| 1549 | - 'section' => 'betterdocs_live_search_settings', | |
| 1550 | - 'settings' => 'betterdocs_live_search_custom_background_height', | |
| 1551 | - 'label' => __( 'Background Image Height', 'betterdocs' ), | |
| 1552 | - 'input_attrs' => [ | |
| 1553 | - 'class' => '', | |
| 1554 | - 'min' => 0, | |
| 1555 | - 'max' => 200, | |
| 1556 | - 'step' => 1, | |
| 1557 | - 'suffix' => '%' //optional suffix | |
| 1558 | - ], | |
| 1559 | - 'priority' => 517 | |
| 1560 | - ] | |
| 1561 | - ) | |
| 1562 | - ); | |
| 1563 | - } | |
| 1251 | + $this->customizer->add_control( | |
| 1252 | + new AlphaColorControl( | |
| 1253 | + $this->customizer, | |
| 1254 | + 'betterdocs_search_close_icon_color', | |
| 1255 | + [ | |
| 1256 | + 'label' => __( 'Close Icon Color', 'betterdocs' ), | |
| 1257 | + 'section' => 'betterdocs_live_search_settings', | |
| 1258 | + 'settings' => 'betterdocs_search_close_icon_color', | |
| 1259 | + 'priority' => 543 | |
| 1260 | + ] | |
| 1261 | + ) | |
| 1262 | + ); | |
| 1263 | + } | |
| 1564 | 1264 | |
| 1565 | - public function search_margin() { | |
| 1566 | - $this->customizer->add_setting( | |
| 1567 | - 'betterdocs_live_search_margin', | |
| 1568 | - [ | |
| 1569 | - 'default' => $this->defaults['betterdocs_live_search_margin'], | |
| 1570 | - 'capability' => 'edit_theme_options', | |
| 1571 | - 'transport' => 'postMessage', | |
| 1572 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1573 | - ] | |
| 1574 | - ); | |
| 1265 | + public function close_icon_border_color() { | |
| 1266 | + $this->customizer->add_setting( 'betterdocs_search_close_icon_border_color', [ | |
| 1267 | + 'default' => $this->defaults['betterdocs_search_close_icon_border_color'], | |
| 1268 | + 'capability' => 'edit_theme_options', | |
| 1269 | + 'transport' => 'postMessage', | |
| 1270 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1271 | + ] ); | |
| 1575 | 1272 | |
| 1576 | - $this->customizer->add_control( | |
| 1577 | - new TitleControl( | |
| 1578 | - $this->customizer, | |
| 1579 | - 'betterdocs_live_search_margin', | |
| 1580 | - [ | |
| 1581 | - 'type' => 'betterdocs-title', | |
| 1582 | - 'section' => 'betterdocs_live_search_settings', | |
| 1583 | - 'settings' => 'betterdocs_live_search_margin', | |
| 1584 | - 'label' => __( 'Margin', 'betterdocs' ), | |
| 1585 | - 'input_attrs' => [ | |
| 1586 | - 'id' => 'betterdocs_live_search_margin', | |
| 1587 | - 'class' => 'betterdocs-dimension' | |
| 1588 | - ], | |
| 1589 | - 'priority' => 518 | |
| 1590 | - ] | |
| 1591 | - ) | |
| 1592 | - ); | |
| 1273 | + $this->customizer->add_control( | |
| 1274 | + new AlphaColorControl( | |
| 1275 | + $this->customizer, | |
| 1276 | + 'betterdocs_search_close_icon_border_color', | |
| 1277 | + [ | |
| 1278 | + 'label' => __( 'Close Icon Border Color', 'betterdocs' ), | |
| 1279 | + 'section' => 'betterdocs_live_search_settings', | |
| 1280 | + 'settings' => 'betterdocs_search_close_icon_border_color', | |
| 1281 | + 'priority' => 544 | |
| 1282 | + ] | |
| 1283 | + ) | |
| 1284 | + ); | |
| 1285 | + } | |
| 1593 | 1286 | |
| 1594 | - $this->customizer->add_setting( | |
| 1595 | - 'betterdocs_live_search_margin_top', | |
| 1596 | - [ | |
| 1597 | - 'default' => $this->defaults['betterdocs_live_search_margin_top'], | |
| 1598 | - 'capability' => 'edit_theme_options', | |
| 1599 | - 'transport' => 'postMessage', | |
| 1600 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1601 | - ] | |
| 1602 | - ); | |
| 1287 | + public function result_settings() { | |
| 1288 | + $this->customizer->add_setting( 'betterdocs_search_result_settings', [ | |
| 1289 | + 'default' => $this->defaults['betterdocs_search_result_settings'], | |
| 1290 | + 'capability' => 'edit_theme_options', | |
| 1291 | + 'sanitize_callback' => 'esc_html' | |
| 1292 | + ] ); | |
| 1603 | 1293 | |
| 1604 | - $this->customizer->add_control( | |
| 1605 | - new DimensionControl( | |
| 1606 | - $this->customizer, | |
| 1607 | - 'betterdocs_live_search_margin_top', | |
| 1608 | - [ | |
| 1609 | - 'type' => 'betterdocs-dimension', | |
| 1610 | - 'section' => 'betterdocs_live_search_settings', | |
| 1611 | - 'settings' => 'betterdocs_live_search_margin_top', | |
| 1612 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 1613 | - 'input_attrs' => [ | |
| 1614 | - 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 1615 | - ], | |
| 1616 | - 'priority' => 518 | |
| 1617 | - ] | |
| 1618 | - ) | |
| 1619 | - ); | |
| 1294 | + $this->customizer->add_control( new SeparatorControl( | |
| 1295 | + $this->customizer, 'betterdocs_search_result_settings', [ | |
| 1296 | + 'label' => __( 'Search Result Settings', 'betterdocs' ), | |
| 1297 | + 'settings' => 'betterdocs_search_result_settings', | |
| 1298 | + 'section' => 'betterdocs_live_search_settings', | |
| 1299 | + 'priority' => 545 | |
| 1300 | + ] ) | |
| 1301 | + ); | |
| 1302 | + } | |
| 1620 | 1303 | |
| 1621 | - $this->customizer->add_setting( | |
| 1622 | - 'betterdocs_live_search_margin_right', | |
| 1623 | - [ | |
| 1624 | - 'default' => $this->defaults['betterdocs_live_search_margin_right'], | |
| 1625 | - 'capability' => 'edit_theme_options', | |
| 1626 | - 'transport' => 'postMessage', | |
| 1627 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1304 | + public function result_width() { | |
| 1305 | + $this->customizer->add_setting( 'betterdocs_search_result_width', [ | |
| 1306 | + 'default' => $this->defaults['betterdocs_search_result_width'], | |
| 1307 | + 'capability' => 'edit_theme_options', | |
| 1308 | + 'transport' => 'postMessage', | |
| 1309 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1628 | 1310 | |
| 1629 | - ] | |
| 1630 | - ); | |
| 1311 | + ] ); | |
| 1631 | 1312 | |
| 1632 | - $this->customizer->add_control( | |
| 1633 | - new DimensionControl( | |
| 1634 | - $this->customizer, | |
| 1635 | - 'betterdocs_live_search_margin_right', | |
| 1636 | - [ | |
| 1637 | - 'type' => 'betterdocs-dimension', | |
| 1638 | - 'section' => 'betterdocs_live_search_settings', | |
| 1639 | - 'settings' => 'betterdocs_live_search_margin_right', | |
| 1640 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 1641 | - 'input_attrs' => [ | |
| 1642 | - 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 1643 | - ], | |
| 1644 | - 'priority' => 518 | |
| 1645 | - ] | |
| 1646 | - ) | |
| 1647 | - ); | |
| 1313 | + $this->customizer->add_control( new RangeValueControl( | |
| 1314 | + $this->customizer, 'betterdocs_search_result_width', [ | |
| 1315 | + 'type' => 'betterdocs-range-value', | |
| 1316 | + 'section' => 'betterdocs_live_search_settings', | |
| 1317 | + 'settings' => 'betterdocs_search_result_width', | |
| 1318 | + 'label' => __( 'Search Result Box Width', 'betterdocs' ), | |
| 1319 | + 'input_attrs' => [ | |
| 1320 | + 'min' => 0, | |
| 1321 | + 'max' => 100, | |
| 1322 | + 'step' => 1, | |
| 1323 | + 'suffix' => '%' //optional suffix | |
| 1324 | + ], | |
| 1325 | + 'priority' => 546 | |
| 1326 | + ] ) | |
| 1327 | + ); | |
| 1328 | + } | |
| 1648 | 1329 | |
| 1649 | - $this->customizer->add_setting( | |
| 1650 | - 'betterdocs_live_search_margin_bottom', | |
| 1651 | - [ | |
| 1652 | - 'default' => $this->defaults['betterdocs_live_search_margin_bottom'], | |
| 1653 | - 'capability' => 'edit_theme_options', | |
| 1654 | - 'transport' => 'postMessage', | |
| 1655 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1330 | + public function result_max_width() { | |
| 1331 | + $this->customizer->add_setting( 'betterdocs_search_result_max_width', [ | |
| 1332 | + 'default' => $this->defaults['betterdocs_search_result_max_width'], | |
| 1333 | + 'capability' => 'edit_theme_options', | |
| 1334 | + 'transport' => 'postMessage', | |
| 1335 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1656 | 1336 | |
| 1657 | - ] | |
| 1658 | - ); | |
| 1337 | + ] ); | |
| 1659 | 1338 | |
| 1660 | - $this->customizer->add_control( | |
| 1661 | - new DimensionControl( | |
| 1662 | - $this->customizer, | |
| 1663 | - 'betterdocs_live_search_margin_bottom', | |
| 1664 | - [ | |
| 1665 | - 'type' => 'betterdocs-dimension', | |
| 1666 | - 'section' => 'betterdocs_live_search_settings', | |
| 1667 | - 'settings' => 'betterdocs_live_search_margin_bottom', | |
| 1668 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 1669 | - 'input_attrs' => [ | |
| 1670 | - 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 1671 | - ], | |
| 1672 | - 'priority' => 518 | |
| 1673 | - ] | |
| 1674 | - ) | |
| 1675 | - ); | |
| 1339 | + $this->customizer->add_control( new RangeValueControl( | |
| 1340 | + $this->customizer, 'betterdocs_search_result_max_width', [ | |
| 1341 | + 'type' => 'betterdocs-range-value', | |
| 1342 | + 'section' => 'betterdocs_live_search_settings', | |
| 1343 | + 'settings' => 'betterdocs_search_result_max_width', | |
| 1344 | + 'label' => __( 'Search Result Box Maximum Width', 'betterdocs' ), | |
| 1345 | + 'input_attrs' => [ | |
| 1346 | + 'min' => 0, | |
| 1347 | + 'max' => 1000, | |
| 1348 | + 'step' => 1, | |
| 1349 | + 'suffix' => 'px' //optional suffix | |
| 1350 | + ], | |
| 1351 | + 'priority' => 547 | |
| 1352 | + ] ) | |
| 1353 | + ); | |
| 1354 | + } | |
| 1676 | 1355 | |
| 1677 | - $this->customizer->add_setting( | |
| 1678 | - 'betterdocs_live_search_margin_left', | |
| 1679 | - [ | |
| 1680 | - 'default' => $this->defaults['betterdocs_live_search_margin_left'], | |
| 1681 | - 'capability' => 'edit_theme_options', | |
| 1682 | - 'transport' => 'postMessage', | |
| 1683 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1684 | - ] | |
| 1685 | - ); | |
| 1356 | + public function result_background_color() { | |
| 1357 | + $this->customizer->add_setting( 'betterdocs_search_result_background_color', [ | |
| 1358 | + 'default' => $this->defaults['betterdocs_search_result_background_color'], | |
| 1359 | + 'capability' => 'edit_theme_options', | |
| 1360 | + 'transport' => 'postMessage', | |
| 1361 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1362 | + ] ); | |
| 1686 | 1363 | |
| 1687 | - $this->customizer->add_control( | |
| 1688 | - new DimensionControl( | |
| 1689 | - $this->customizer, | |
| 1690 | - 'betterdocs_live_search_margin_left', | |
| 1691 | - [ | |
| 1692 | - 'type' => 'betterdocs-dimension', | |
| 1693 | - 'section' => 'betterdocs_live_search_settings', | |
| 1694 | - 'settings' => 'betterdocs_live_search_margin_left', | |
| 1695 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 1696 | - 'input_attrs' => [ | |
| 1697 | - 'class' => 'betterdocs_live_search_margin betterdocs-dimension' | |
| 1698 | - ], | |
| 1699 | - 'priority' => 518 | |
| 1700 | - ] | |
| 1701 | - ) | |
| 1702 | - ); | |
| 1703 | - } | |
| 1364 | + $this->customizer->add_control( | |
| 1365 | + new AlphaColorControl( | |
| 1366 | + $this->customizer, | |
| 1367 | + 'betterdocs_search_result_background_color', | |
| 1368 | + [ | |
| 1369 | + 'label' => __( 'Search Result Box Background Color', 'betterdocs' ), | |
| 1370 | + 'section' => 'betterdocs_live_search_settings', | |
| 1371 | + 'settings' => 'betterdocs_search_result_background_color', | |
| 1372 | + 'priority' => 548 | |
| 1373 | + ] | |
| 1374 | + ) | |
| 1375 | + ); | |
| 1376 | + } | |
| 1704 | 1377 | |
| 1705 | - public function search_margin_layout_2() { | |
| 1706 | - $this->customizer->add_setting( | |
| 1707 | - 'betterdocs_live_search_margin_layout_2', | |
| 1708 | - [ | |
| 1709 | - 'default' => $this->defaults['betterdocs_live_search_margin_layout_2'], | |
| 1710 | - 'capability' => 'edit_theme_options', | |
| 1711 | - 'transport' => 'postMessage', | |
| 1712 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1713 | - ] | |
| 1714 | - ); | |
| 1378 | + public function result_border_color() { | |
| 1379 | + $this->customizer->add_setting( 'betterdocs_search_result_border_color', [ | |
| 1380 | + 'default' => $this->defaults['betterdocs_search_result_border_color'], | |
| 1381 | + 'capability' => 'edit_theme_options', | |
| 1382 | + 'transport' => 'postMessage', | |
| 1383 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1384 | + ] ); | |
| 1715 | 1385 | |
| 1716 | - $this->customizer->add_control( | |
| 1717 | - new TitleControl( | |
| 1718 | - $this->customizer, | |
| 1719 | - 'betterdocs_live_search_margin_layout_2', | |
| 1720 | - [ | |
| 1721 | - 'type' => 'betterdocs-title', | |
| 1722 | - 'section' => 'betterdocs_live_search_settings', | |
| 1723 | - 'settings' => 'betterdocs_live_search_margin_layout_2', | |
| 1724 | - 'label' => __( 'Margin', 'betterdocs' ), | |
| 1725 | - 'input_attrs' => [ | |
| 1726 | - 'id' => 'betterdocs_live_search_margin_layout_2', | |
| 1727 | - 'class' => 'betterdocs-dimension' | |
| 1728 | - ], | |
| 1729 | - 'priority' => 518 | |
| 1730 | - ] | |
| 1731 | - ) | |
| 1732 | - ); | |
| 1386 | + $this->customizer->add_control( | |
| 1387 | + new AlphaColorControl( | |
| 1388 | + $this->customizer, | |
| 1389 | + 'betterdocs_search_result_border_color', | |
| 1390 | + [ | |
| 1391 | + 'label' => __( 'Search Result Box Border Color', 'betterdocs' ), | |
| 1392 | + 'section' => 'betterdocs_live_search_settings', | |
| 1393 | + 'settings' => 'betterdocs_search_result_border_color', | |
| 1394 | + 'priority' => 549 | |
| 1395 | + ] | |
| 1396 | + ) | |
| 1397 | + ); | |
| 1398 | + } | |
| 1733 | 1399 | |
| 1734 | - $this->customizer->add_setting( | |
| 1735 | - 'betterdocs_live_search_margin_top_layout_2', | |
| 1736 | - [ | |
| 1737 | - 'default' => $this->defaults['betterdocs_live_search_margin_top_layout_2'], | |
| 1738 | - 'capability' => 'edit_theme_options', | |
| 1739 | - 'transport' => 'postMessage', | |
| 1740 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1741 | - ] | |
| 1742 | - ); | |
| 1400 | + public function result_item_font_size() { | |
| 1401 | + $this->customizer->add_setting( 'betterdocs_search_result_item_font_size', [ | |
| 1402 | + 'default' => $this->defaults['betterdocs_search_result_item_font_size'], | |
| 1403 | + 'capability' => 'edit_theme_options', | |
| 1404 | + 'transport' => 'postMessage', | |
| 1405 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1743 | 1406 | |
| 1744 | - $this->customizer->add_control( | |
| 1745 | - new DimensionControl( | |
| 1746 | - $this->customizer, | |
| 1747 | - 'betterdocs_live_search_margin_top_layout_2', | |
| 1748 | - [ | |
| 1749 | - 'type' => 'betterdocs-dimension', | |
| 1750 | - 'section' => 'betterdocs_live_search_settings', | |
| 1751 | - 'settings' => 'betterdocs_live_search_margin_top_layout_2', | |
| 1752 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 1753 | - 'input_attrs' => [ | |
| 1754 | - 'class' => 'betterdocs_live_search_margin_layout_2 betterdocs-dimension' | |
| 1755 | - ], | |
| 1756 | - 'priority' => 518 | |
| 1757 | - ] | |
| 1758 | - ) | |
| 1759 | - ); | |
| 1407 | + ] ); | |
| 1760 | 1408 | |
| 1761 | - $this->customizer->add_setting( | |
| 1762 | - 'betterdocs_live_search_margin_bottom_layout_2', | |
| 1763 | - [ | |
| 1764 | - 'default' => $this->defaults['betterdocs_live_search_margin_bottom_layout_2'], | |
| 1765 | - 'capability' => 'edit_theme_options', | |
| 1766 | - 'transport' => 'postMessage', | |
| 1767 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1409 | + $this->customizer->add_control( new RangeValueControl( | |
| 1410 | + $this->customizer, 'betterdocs_search_result_item_font_size', [ | |
| 1411 | + 'type' => 'betterdocs-range-value', | |
| 1412 | + 'section' => 'betterdocs_live_search_settings', | |
| 1413 | + 'settings' => 'betterdocs_search_result_item_font_size', | |
| 1414 | + 'label' => __( 'Search Result Item Font Size', 'betterdocs' ), | |
| 1415 | + 'input_attrs' => [ | |
| 1416 | + 'class' => '', | |
| 1417 | + 'min' => 0, | |
| 1418 | + 'max' => 50, | |
| 1419 | + 'step' => 1, | |
| 1420 | + 'suffix' => 'px' //optional suffix | |
| 1421 | + ], | |
| 1422 | + 'priority' => 550 | |
| 1423 | + ] ) | |
| 1424 | + ); | |
| 1425 | + } | |
| 1768 | 1426 | |
| 1769 | - ] | |
| 1770 | - ); | |
| 1427 | + public function result_item_font_color() { | |
| 1428 | + $this->customizer->add_setting( 'betterdocs_search_result_item_font_color', [ | |
| 1429 | + 'default' => $this->defaults['betterdocs_search_result_item_font_color'], | |
| 1430 | + 'capability' => 'edit_theme_options', | |
| 1431 | + 'transport' => 'postMessage', | |
| 1432 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1433 | + ] ); | |
| 1771 | 1434 | |
| 1772 | - $this->customizer->add_control( | |
| 1773 | - new DimensionControl( | |
| 1774 | - $this->customizer, | |
| 1775 | - 'betterdocs_live_search_margin_bottom_layout_2', | |
| 1776 | - [ | |
| 1777 | - 'type' => 'betterdocs-dimension', | |
| 1778 | - 'section' => 'betterdocs_live_search_settings', | |
| 1779 | - 'settings' => 'betterdocs_live_search_margin_bottom_layout_2', | |
| 1780 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 1781 | - 'input_attrs' => [ | |
| 1782 | - 'class' => 'betterdocs_live_search_margin_layout_2 betterdocs-dimension' | |
| 1783 | - ], | |
| 1784 | - 'priority' => 518 | |
| 1785 | - ] | |
| 1786 | - ) | |
| 1787 | - ); | |
| 1788 | - } | |
| 1435 | + $this->customizer->add_control( | |
| 1436 | + new AlphaColorControl( | |
| 1437 | + $this->customizer, | |
| 1438 | + 'betterdocs_search_result_item_font_color', | |
| 1439 | + [ | |
| 1440 | + 'label' => __( 'Search Result Item Font Color', 'betterdocs' ), | |
| 1441 | + 'section' => 'betterdocs_live_search_settings', | |
| 1442 | + 'settings' => 'betterdocs_search_result_item_font_color', | |
| 1443 | + 'priority' => 551 | |
| 1444 | + ] | |
| 1445 | + ) | |
| 1446 | + ); | |
| 1447 | + } | |
| 1789 | 1448 | |
| 1790 | - public function search_padding() { | |
| 1791 | - $this->customizer->add_setting( | |
| 1792 | - 'betterdocs_live_search_padding', | |
| 1793 | - [ | |
| 1794 | - 'default' => $this->defaults['betterdocs_live_search_padding'], | |
| 1795 | - 'capability' => 'edit_theme_options', | |
| 1796 | - 'transport' => 'postMessage', | |
| 1797 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1798 | - ] | |
| 1799 | - ); | |
| 1449 | + public function result_item_cat_font_color() { | |
| 1450 | + $this->customizer->add_setting( 'betterdocs_search_result_item_cat_font_color', [ | |
| 1451 | + 'default' => $this->defaults['betterdocs_search_result_item_cat_font_color'], | |
| 1452 | + 'capability' => 'edit_theme_options', | |
| 1453 | + 'transport' => 'postMessage', | |
| 1454 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1455 | + ] ); | |
| 1800 | 1456 | |
| 1801 | - $this->customizer->add_control( | |
| 1802 | - new TitleControl( | |
| 1803 | - $this->customizer, | |
| 1804 | - 'betterdocs_live_search_padding', | |
| 1805 | - [ | |
| 1806 | - 'type' => 'betterdocs-title', | |
| 1807 | - 'section' => 'betterdocs_live_search_settings', | |
| 1808 | - 'settings' => 'betterdocs_live_search_padding', | |
| 1809 | - 'label' => __( 'Padding', 'betterdocs' ), | |
| 1810 | - 'input_attrs' => [ | |
| 1811 | - 'id' => 'betterdocs_live_search_padding', | |
| 1812 | - 'class' => 'betterdocs-dimension' | |
| 1813 | - ], | |
| 1814 | - 'priority' => 519 | |
| 1815 | - ] | |
| 1816 | - ) | |
| 1817 | - ); | |
| 1457 | + $this->customizer->add_control( | |
| 1458 | + new AlphaColorControl( | |
| 1459 | + $this->customizer, | |
| 1460 | + 'betterdocs_search_result_item_cat_font_color', | |
| 1461 | + [ | |
| 1462 | + 'label' => __( 'Search Result Item Category Font Color', 'betterdocs' ), | |
| 1463 | + 'section' => 'betterdocs_live_search_settings', | |
| 1464 | + 'settings' => 'betterdocs_search_result_item_cat_font_color', | |
| 1465 | + 'priority' => 552 | |
| 1466 | + ] | |
| 1467 | + ) | |
| 1468 | + ); | |
| 1469 | + } | |
| 1818 | 1470 | |
| 1819 | - $this->customizer->add_setting( | |
| 1820 | - 'betterdocs_live_search_padding_top', | |
| 1821 | - [ | |
| 1822 | - 'default' => $this->defaults['betterdocs_live_search_padding_top'], | |
| 1823 | - 'capability' => 'edit_theme_options', | |
| 1824 | - 'transport' => 'postMessage', | |
| 1825 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1826 | - ] | |
| 1827 | - ); | |
| 1471 | + public function result_item_padding() { | |
| 1472 | + $this->customizer->add_setting( 'betterdocs_search_result_item_padding', [ | |
| 1473 | + 'default' => $this->defaults['betterdocs_search_result_item_padding'], | |
| 1474 | + 'capability' => 'edit_theme_options', | |
| 1475 | + 'transport' => 'postMessage', | |
| 1476 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1828 | 1477 | |
| 1829 | - $this->customizer->add_control( | |
| 1830 | - new DimensionControl( | |
| 1831 | - $this->customizer, | |
| 1832 | - 'betterdocs_live_search_padding_top', | |
| 1833 | - [ | |
| 1834 | - 'type' => 'betterdocs-dimension', | |
| 1835 | - 'section' => 'betterdocs_live_search_settings', | |
| 1836 | - 'settings' => 'betterdocs_live_search_padding_top', | |
| 1837 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 1838 | - 'input_attrs' => [ | |
| 1839 | - 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 1840 | - ], | |
| 1841 | - 'priority' => 519 | |
| 1842 | - ] | |
| 1843 | - ) | |
| 1844 | - ); | |
| 1478 | + ] ); | |
| 1845 | 1479 | |
| 1846 | - $this->customizer->add_setting( | |
| 1847 | - 'betterdocs_live_search_padding_right', | |
| 1848 | - [ | |
| 1849 | - 'default' => $this->defaults['betterdocs_live_search_padding_right'], | |
| 1850 | - 'capability' => 'edit_theme_options', | |
| 1851 | - 'transport' => 'postMessage', | |
| 1852 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1480 | + $this->customizer->add_control( new TitleControl( | |
| 1481 | + $this->customizer, 'betterdocs_search_result_item_padding', [ | |
| 1482 | + 'type' => 'betterdocs-title', | |
| 1483 | + 'section' => 'betterdocs_live_search_settings', | |
| 1484 | + 'settings' => 'betterdocs_search_result_item_padding', | |
| 1485 | + 'label' => __( 'Search Result Item Padding', 'betterdocs' ), | |
| 1486 | + 'input_attrs' => [ | |
| 1487 | + 'id' => 'betterdocs_search_result_item_padding', | |
| 1488 | + 'class' => 'betterdocs-dimension' | |
| 1489 | + ], | |
| 1490 | + 'priority' => 553 | |
| 1491 | + ] ) | |
| 1492 | + ); | |
| 1853 | 1493 | |
| 1854 | - ] | |
| 1855 | - ); | |
| 1494 | + $this->customizer->add_setting( 'betterdocs_search_result_item_padding_top', [ | |
| 1495 | + 'default' => $this->defaults['betterdocs_search_result_item_padding_top'], | |
| 1496 | + 'capability' => 'edit_theme_options', | |
| 1497 | + 'transport' => 'postMessage', | |
| 1498 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1499 | + ] ); | |
| 1856 | 1500 | |
| 1857 | - $this->customizer->add_control( | |
| 1858 | - new DimensionControl( | |
| 1859 | - $this->customizer, | |
| 1860 | - 'betterdocs_live_search_padding_right', | |
| 1861 | - [ | |
| 1862 | - 'type' => 'betterdocs-dimension', | |
| 1863 | - 'section' => 'betterdocs_live_search_settings', | |
| 1864 | - 'settings' => 'betterdocs_live_search_padding_right', | |
| 1865 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 1866 | - 'input_attrs' => [ | |
| 1867 | - 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 1868 | - ], | |
| 1869 | - 'priority' => 519 | |
| 1870 | - ] | |
| 1871 | - ) | |
| 1872 | - ); | |
| 1501 | + $this->customizer->add_control( new DimensionControl( | |
| 1502 | + $this->customizer, 'betterdocs_search_result_item_padding_top', [ | |
| 1503 | + 'type' => 'betterdocs-dimension', | |
| 1504 | + 'section' => 'betterdocs_live_search_settings', | |
| 1505 | + 'settings' => 'betterdocs_search_result_item_padding_top', | |
| 1506 | + 'label' => __( 'Top', 'betterdocs' ), | |
| 1507 | + 'input_attrs' => [ | |
| 1508 | + 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 1509 | + ], | |
| 1510 | + 'priority' => 553 | |
| 1511 | + ] ) | |
| 1512 | + ); | |
| 1873 | 1513 | |
| 1874 | - $this->customizer->add_setting( | |
| 1875 | - 'betterdocs_live_search_padding_bottom', | |
| 1876 | - [ | |
| 1877 | - 'default' => $this->defaults['betterdocs_live_search_padding_bottom'], | |
| 1878 | - 'capability' => 'edit_theme_options', | |
| 1879 | - 'transport' => 'postMessage', | |
| 1880 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1881 | - ] | |
| 1882 | - ); | |
| 1514 | + $this->customizer->add_setting( 'betterdocs_search_result_item_padding_right', [ | |
| 1515 | + 'default' => $this->defaults['betterdocs_search_result_item_padding_right'], | |
| 1516 | + 'capability' => 'edit_theme_options', | |
| 1517 | + 'transport' => 'postMessage', | |
| 1518 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1883 | 1519 | |
| 1884 | - $this->customizer->add_control( | |
| 1885 | - new DimensionControl( | |
| 1886 | - $this->customizer, | |
| 1887 | - 'betterdocs_live_search_padding_bottom', | |
| 1888 | - [ | |
| 1889 | - 'type' => 'betterdocs-dimension', | |
| 1890 | - 'section' => 'betterdocs_live_search_settings', | |
| 1891 | - 'settings' => 'betterdocs_live_search_padding_bottom', | |
| 1892 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 1893 | - 'input_attrs' => [ | |
| 1894 | - 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 1895 | - ], | |
| 1896 | - 'priority' => 519 | |
| 1897 | - ] | |
| 1898 | - ) | |
| 1899 | - ); | |
| 1520 | + ] ); | |
| 1900 | 1521 | |
| 1901 | - $this->customizer->add_setting( | |
| 1902 | - 'betterdocs_live_search_padding_left', | |
| 1903 | - [ | |
| 1904 | - 'default' => $this->defaults['betterdocs_live_search_padding_left'], | |
| 1905 | - 'capability' => 'edit_theme_options', | |
| 1906 | - 'transport' => 'postMessage', | |
| 1907 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1522 | + $this->customizer->add_control( new DimensionControl( | |
| 1523 | + $this->customizer, 'betterdocs_search_result_item_padding_right', [ | |
| 1524 | + 'type' => 'betterdocs-dimension', | |
| 1525 | + 'section' => 'betterdocs_live_search_settings', | |
| 1526 | + 'settings' => 'betterdocs_search_result_item_padding_right', | |
| 1527 | + 'label' => __( 'Right', 'betterdocs' ), | |
| 1528 | + 'input_attrs' => [ | |
| 1529 | + 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 1530 | + ], | |
| 1531 | + 'priority' => 553 | |
| 1532 | + ] ) | |
| 1533 | + ); | |
| 1908 | 1534 | |
| 1909 | - ] | |
| 1910 | - ); | |
| 1535 | + $this->customizer->add_setting( 'betterdocs_search_result_item_padding_bottom', [ | |
| 1536 | + 'default' => $this->defaults['betterdocs_search_result_item_padding_bottom'], | |
| 1537 | + 'capability' => 'edit_theme_options', | |
| 1538 | + 'transport' => 'postMessage', | |
| 1539 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1911 | 1540 | |
| 1912 | - $this->customizer->add_control( | |
| 1913 | - new DimensionControl( | |
| 1914 | - $this->customizer, | |
| 1915 | - 'betterdocs_live_search_padding_left', | |
| 1916 | - [ | |
| 1917 | - 'type' => 'betterdocs-dimension', | |
| 1918 | - 'section' => 'betterdocs_live_search_settings', | |
| 1919 | - 'settings' => 'betterdocs_live_search_padding_left', | |
| 1920 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 1921 | - 'input_attrs' => [ | |
| 1922 | - 'class' => 'betterdocs_live_search_padding betterdocs-dimension' | |
| 1923 | - ], | |
| 1924 | - 'priority' => 519 | |
| 1925 | - ] | |
| 1926 | - ) | |
| 1927 | - ); | |
| 1928 | - } | |
| 1541 | + ] ); | |
| 1929 | 1542 | |
| 1930 | - public function search_padding_layout_2() { | |
| 1931 | - $this->customizer->add_setting( | |
| 1932 | - 'betterdocs_live_search_padding_layout_2', | |
| 1933 | - [ | |
| 1934 | - 'default' => $this->defaults['betterdocs_live_search_padding_layout_2'], | |
| 1935 | - 'capability' => 'edit_theme_options', | |
| 1936 | - 'transport' => 'postMessage', | |
| 1937 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1938 | - ] | |
| 1939 | - ); | |
| 1543 | + $this->customizer->add_control( new DimensionControl( | |
| 1544 | + $this->customizer, 'betterdocs_search_result_item_padding_bottom', [ | |
| 1545 | + 'type' => 'betterdocs-dimension', | |
| 1546 | + 'section' => 'betterdocs_live_search_settings', | |
| 1547 | + 'settings' => 'betterdocs_search_result_item_padding_bottom', | |
| 1548 | + 'label' => __( 'Bottom', 'betterdocs' ), | |
| 1549 | + 'input_attrs' => [ | |
| 1550 | + 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 1551 | + ], | |
| 1552 | + 'priority' => 553 | |
| 1553 | + ] ) | |
| 1554 | + ); | |
| 1940 | 1555 | |
| 1941 | - $this->customizer->add_control( | |
| 1942 | - new TitleControl( | |
| 1943 | - $this->customizer, | |
| 1944 | - 'betterdocs_live_search_padding_layout_2', | |
| 1945 | - [ | |
| 1946 | - 'type' => 'betterdocs-title', | |
| 1947 | - 'section' => 'betterdocs_live_search_settings', | |
| 1948 | - 'settings' => 'betterdocs_live_search_padding_layout_2', | |
| 1949 | - 'label' => __( 'Padding', 'betterdocs' ), | |
| 1950 | - 'input_attrs' => [ | |
| 1951 | - 'id' => 'betterdocs_live_search_padding_layout_2', | |
| 1952 | - 'class' => 'betterdocs-dimension' | |
| 1953 | - ], | |
| 1954 | - 'priority' => 519 | |
| 1955 | - ] | |
| 1956 | - ) | |
| 1957 | - ); | |
| 1556 | + $this->customizer->add_setting( 'betterdocs_search_result_item_padding_left', [ | |
| 1557 | + 'default' => $this->defaults['betterdocs_search_result_item_padding_left'], | |
| 1558 | + 'capability' => 'edit_theme_options', | |
| 1559 | + 'transport' => 'postMessage', | |
| 1560 | + 'sanitize_callback' => [$this->sanitizer, 'integer'] | |
| 1958 | 1561 | |
| 1959 | - $this->customizer->add_setting( | |
| 1960 | - 'betterdocs_live_search_padding_top_layout_2', | |
| 1961 | - [ | |
| 1962 | - 'default' => $this->defaults['betterdocs_live_search_padding_top_layout_2'], | |
| 1963 | - 'capability' => 'edit_theme_options', | |
| 1964 | - 'transport' => 'postMessage', | |
| 1965 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1966 | - ] | |
| 1967 | - ); | |
| 1562 | + ] ); | |
| 1968 | 1563 | |
| 1969 | - $this->customizer->add_control( | |
| 1970 | - new DimensionControl( | |
| 1971 | - $this->customizer, | |
| 1972 | - 'betterdocs_live_search_padding_top_layout_2', | |
| 1973 | - [ | |
| 1974 | - 'type' => 'betterdocs-dimension', | |
| 1975 | - 'section' => 'betterdocs_live_search_settings', | |
| 1976 | - 'settings' => 'betterdocs_live_search_padding_top_layout_2', | |
| 1977 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 1978 | - 'input_attrs' => [ | |
| 1979 | - 'class' => 'betterdocs_live_search_padding_layout_2 betterdocs-dimension' | |
| 1980 | - ], | |
| 1981 | - 'priority' => 519 | |
| 1982 | - ] | |
| 1983 | - ) | |
| 1984 | - ); | |
| 1564 | + $this->customizer->add_control( new DimensionControl( | |
| 1565 | + $this->customizer, 'betterdocs_search_result_item_padding_left', [ | |
| 1566 | + 'type' => 'betterdocs-dimension', | |
| 1567 | + 'section' => 'betterdocs_live_search_settings', | |
| 1568 | + 'settings' => 'betterdocs_search_result_item_padding_left', | |
| 1569 | + 'label' => __( 'Left', 'betterdocs' ), | |
| 1570 | + 'input_attrs' => [ | |
| 1571 | + 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 1572 | + ], | |
| 1573 | + 'priority' => 553 | |
| 1574 | + ] ) | |
| 1575 | + ); | |
| 1576 | + } | |
| 1985 | 1577 | |
| 1986 | - $this->customizer->add_setting( | |
| 1987 | - 'betterdocs_live_search_padding_right_layout_2', | |
| 1988 | - [ | |
| 1989 | - 'default' => $this->defaults['betterdocs_live_search_padding_right_layout_2'], | |
| 1990 | - 'capability' => 'edit_theme_options', | |
| 1991 | - 'transport' => 'postMessage', | |
| 1992 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1578 | + public function result_item_border_color() { | |
| 1579 | + $this->customizer->add_setting( 'betterdocs_search_result_item_border_color', [ | |
| 1580 | + 'default' => $this->defaults['betterdocs_search_result_item_border_color'], | |
| 1581 | + 'capability' => 'edit_theme_options', | |
| 1582 | + 'transport' => 'postMessage', | |
| 1583 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1584 | + ] ); | |
| 1993 | 1585 | |
| 1994 | - ] | |
| 1995 | - ); | |
| 1586 | + $this->customizer->add_control( | |
| 1587 | + new AlphaColorControl( | |
| 1588 | + $this->customizer, | |
| 1589 | + 'betterdocs_search_result_item_border_color', | |
| 1590 | + [ | |
| 1591 | + 'label' => __( 'Search Result Item Border Color', 'betterdocs' ), | |
| 1592 | + 'section' => 'betterdocs_live_search_settings', | |
| 1593 | + 'settings' => 'betterdocs_search_result_item_border_color', | |
| 1594 | + 'priority' => 558 | |
| 1595 | + ] | |
| 1596 | + ) | |
| 1597 | + ); | |
| 1598 | + } | |
| 1996 | 1599 | |
| 1997 | - $this->customizer->add_control( | |
| 1998 | - new DimensionControl( | |
| 1999 | - $this->customizer, | |
| 2000 | - 'betterdocs_live_search_padding_right_layout_2', | |
| 2001 | - [ | |
| 2002 | - 'type' => 'betterdocs-dimension', | |
| 2003 | - 'section' => 'betterdocs_live_search_settings', | |
| 2004 | - 'settings' => 'betterdocs_live_search_padding_right_layout_2', | |
| 2005 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 2006 | - 'input_attrs' => [ | |
| 2007 | - 'class' => 'betterdocs_live_search_padding_layout_2 betterdocs-dimension' | |
| 2008 | - ], | |
| 2009 | - 'priority' => 519 | |
| 2010 | - ] | |
| 2011 | - ) | |
| 2012 | - ); | |
| 1600 | + public function result_item_hover_font_color() { | |
| 1601 | + $this->customizer->add_setting( 'betterdocs_search_result_item_hover_font_color', [ | |
| 1602 | + 'default' => $this->defaults['betterdocs_search_result_item_hover_font_color'], | |
| 1603 | + 'capability' => 'edit_theme_options', | |
| 1604 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1605 | + ] ); | |
| 2013 | 1606 | |
| 2014 | - $this->customizer->add_setting( | |
| 2015 | - 'betterdocs_live_search_padding_bottom_layout_2', | |
| 2016 | - [ | |
| 2017 | - 'default' => $this->defaults['betterdocs_live_search_padding_bottom_layout_2'], | |
| 2018 | - 'capability' => 'edit_theme_options', | |
| 2019 | - 'transport' => 'postMessage', | |
| 2020 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2021 | - ] | |
| 2022 | - ); | |
| 1607 | + $this->customizer->add_control( | |
| 1608 | + new AlphaColorControl( | |
| 1609 | + $this->customizer, | |
| 1610 | + 'betterdocs_search_result_item_hover_font_color', | |
| 1611 | + [ | |
| 1612 | + 'label' => __( 'Search Result Item Font Hover Color', 'betterdocs' ), | |
| 1613 | + 'section' => 'betterdocs_live_search_settings', | |
| 1614 | + 'settings' => 'betterdocs_search_result_item_hover_font_color', | |
| 1615 | + 'priority' => 559 | |
| 1616 | + ] | |
| 1617 | + ) | |
| 1618 | + ); | |
| 1619 | + } | |
| 2023 | 1620 | |
| 2024 | - $this->customizer->add_control( | |
| 2025 | - new DimensionControl( | |
| 2026 | - $this->customizer, | |
| 2027 | - 'betterdocs_live_search_padding_bottom_layout_2', | |
| 2028 | - [ | |
| 2029 | - 'type' => 'betterdocs-dimension', | |
| 2030 | - 'section' => 'betterdocs_live_search_settings', | |
| 2031 | - 'settings' => 'betterdocs_live_search_padding_bottom_layout_2', | |
| 2032 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 2033 | - 'input_attrs' => [ | |
| 2034 | - 'class' => 'betterdocs_live_search_padding_layout_2 betterdocs-dimension' | |
| 2035 | - ], | |
| 2036 | - 'priority' => 519 | |
| 2037 | - ] | |
| 2038 | - ) | |
| 2039 | - ); | |
| 1621 | + public function result_item_hover_background_color() { | |
| 1622 | + $this->customizer->add_setting( 'betterdocs_search_result_item_hover_background_color', [ | |
| 1623 | + 'default' => $this->defaults['betterdocs_search_result_item_hover_background_color'], | |
| 1624 | + 'sanitize_callback' => [$this->sanitizer, 'rgba'] | |
| 1625 | + ] ); | |
| 2040 | 1626 | |
| 2041 | - $this->customizer->add_setting( | |
| 2042 | - 'betterdocs_live_search_padding_left_layout_2', | |
| 2043 | - [ | |
| 2044 | - 'default' => $this->defaults['betterdocs_live_search_padding_left_layout_2'], | |
| 2045 | - 'capability' => 'edit_theme_options', | |
| 2046 | - 'transport' => 'postMessage', | |
| 2047 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2048 | - | |
| 2049 | - ] | |
| 2050 | - ); | |
| 2051 | - | |
| 2052 | - $this->customizer->add_control( | |
| 2053 | - new DimensionControl( | |
| 2054 | - $this->customizer, | |
| 2055 | - 'betterdocs_live_search_padding_left_layout_2', | |
| 2056 | - [ | |
| 2057 | - 'type' => 'betterdocs-dimension', | |
| 2058 | - 'section' => 'betterdocs_live_search_settings', | |
| 2059 | - 'settings' => 'betterdocs_live_search_padding_left_layout_2', | |
| 2060 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 2061 | - 'input_attrs' => [ | |
| 2062 | - 'class' => 'betterdocs_live_search_padding_layout_2 betterdocs-dimension' | |
| 2063 | - ], | |
| 2064 | - 'priority' => 519 | |
| 2065 | - ] | |
| 2066 | - ) | |
| 2067 | - ); | |
| 2068 | - } | |
| 2069 | - | |
| 2070 | - public function field_settings() { | |
| 2071 | - $this->customizer->add_setting( | |
| 2072 | - 'betterdocs_search_field_settings', | |
| 2073 | - [ | |
| 2074 | - 'default' => $this->defaults['betterdocs_search_field_settings'], | |
| 2075 | - 'sanitize_callback' => 'esc_html' | |
| 2076 | - ] | |
| 2077 | - ); | |
| 2078 | - | |
| 2079 | - $this->customizer->add_control( | |
| 2080 | - new SeparatorControl( | |
| 2081 | - $this->customizer, | |
| 2082 | - 'betterdocs_search_field_settings', | |
| 2083 | - [ | |
| 2084 | - 'label' => __( 'Search Field Settings', 'betterdocs' ), | |
| 2085 | - 'settings' => 'betterdocs_search_field_settings', | |
| 2086 | - 'section' => 'betterdocs_live_search_settings', | |
| 2087 | - 'priority' => 530 | |
| 2088 | - ] | |
| 2089 | - ) | |
| 2090 | - ); | |
| 2091 | - } | |
| 2092 | - | |
| 2093 | - public function field_settings_layout_2() { | |
| 2094 | - $this->customizer->add_setting( | |
| 2095 | - 'betterdocs_search_field_settings_layout_2', | |
| 2096 | - [ | |
| 2097 | - 'default' => $this->defaults['betterdocs_search_field_settings_layout_2'], | |
| 2098 | - 'sanitize_callback' => 'esc_html' | |
| 2099 | - ] | |
| 2100 | - ); | |
| 2101 | - | |
| 2102 | - $this->customizer->add_control( | |
| 2103 | - new SeparatorControl( | |
| 2104 | - $this->customizer, | |
| 2105 | - 'betterdocs_search_field_settings_layout_2', | |
| 2106 | - [ | |
| 2107 | - 'label' => __( 'Search Field Settings', 'betterdocs' ), | |
| 2108 | - 'settings' => 'betterdocs_search_field_settings_layout_2', | |
| 2109 | - 'section' => 'betterdocs_live_search_settings', | |
| 2110 | - 'priority' => 530 | |
| 2111 | - ] | |
| 2112 | - ) | |
| 2113 | - ); | |
| 2114 | - } | |
| 2115 | - | |
| 2116 | - | |
| 2117 | - public function field_background_color() { | |
| 2118 | - $this->customizer->add_setting( | |
| 2119 | - 'betterdocs_search_field_background_color', | |
| 2120 | - [ | |
| 2121 | - 'default' => $this->defaults['betterdocs_search_field_background_color'], | |
| 2122 | - 'capability' => 'edit_theme_options', | |
| 2123 | - 'transport' => 'postMessage', | |
| 2124 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2125 | - ] | |
| 2126 | - ); | |
| 2127 | - | |
| 2128 | - $this->customizer->add_control( | |
| 2129 | - new AlphaColorControl( | |
| 2130 | - $this->customizer, | |
| 2131 | - 'betterdocs_search_field_background_color', | |
| 2132 | - [ | |
| 2133 | - 'label' => __( 'Search Field Background Color', 'betterdocs' ), | |
| 2134 | - 'section' => 'betterdocs_live_search_settings', | |
| 2135 | - 'settings' => 'betterdocs_search_field_background_color', | |
| 2136 | - 'priority' => 531 | |
| 2137 | - ] | |
| 2138 | - ) | |
| 2139 | - ); | |
| 2140 | - } | |
| 2141 | - | |
| 2142 | - public function field_background_color_layout_2() { | |
| 2143 | - $this->customizer->add_setting( | |
| 2144 | - 'betterdocs_search_field_background_color_layout_2', | |
| 2145 | - [ | |
| 2146 | - 'default' => $this->defaults['betterdocs_search_field_background_color_layout_2'], | |
| 2147 | - 'capability' => 'edit_theme_options', | |
| 2148 | - 'transport' => 'postMessage', | |
| 2149 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2150 | - ] | |
| 2151 | - ); | |
| 2152 | - | |
| 2153 | - $this->customizer->add_control( | |
| 2154 | - new AlphaColorControl( | |
| 2155 | - $this->customizer, | |
| 2156 | - 'betterdocs_search_field_background_color_layout_2', | |
| 2157 | - [ | |
| 2158 | - 'label' => __( 'Search Field Background Color', 'betterdocs' ), | |
| 2159 | - 'section' => 'betterdocs_live_search_settings', | |
| 2160 | - 'settings' => 'betterdocs_search_field_background_color_layout_2', | |
| 2161 | - 'priority' => 531 | |
| 2162 | - ] | |
| 2163 | - ) | |
| 2164 | - ); | |
| 2165 | - } | |
| 2166 | - | |
| 2167 | - public function field_font_size() { | |
| 2168 | - $this->customizer->add_setting( | |
| 2169 | - 'betterdocs_search_field_font_size', | |
| 2170 | - [ | |
| 2171 | - 'default' => $this->defaults['betterdocs_search_field_font_size'], | |
| 2172 | - 'capability' => 'edit_theme_options', | |
| 2173 | - 'transport' => 'postMessage', | |
| 2174 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2175 | - | |
| 2176 | - ] | |
| 2177 | - ); | |
| 2178 | - | |
| 2179 | - $this->customizer->add_control( | |
| 2180 | - new RangeValueControl( | |
| 2181 | - $this->customizer, | |
| 2182 | - 'betterdocs_search_field_font_size', | |
| 2183 | - [ | |
| 2184 | - 'type' => 'betterdocs-range-value', | |
| 2185 | - 'section' => 'betterdocs_live_search_settings', | |
| 2186 | - 'settings' => 'betterdocs_search_field_font_size', | |
| 2187 | - 'label' => __( 'Search Field Font Size', 'betterdocs' ), | |
| 2188 | - 'input_attrs' => [ | |
| 2189 | - 'class' => '', | |
| 2190 | - 'min' => 0, | |
| 2191 | - 'max' => 50, | |
| 2192 | - 'step' => 1, | |
| 2193 | - 'suffix' => 'px' //optional suffix | |
| 2194 | - ], | |
| 2195 | - 'priority' => 532 | |
| 2196 | - ] | |
| 2197 | - ) | |
| 2198 | - ); | |
| 2199 | - } | |
| 2200 | - | |
| 2201 | - public function field_color() { | |
| 2202 | - $this->customizer->add_setting( | |
| 2203 | - 'betterdocs_search_field_color', | |
| 2204 | - [ | |
| 2205 | - 'default' => $this->defaults['betterdocs_search_field_color'], | |
| 2206 | - 'capability' => 'edit_theme_options', | |
| 2207 | - 'transport' => 'postMessage', | |
| 2208 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2209 | - ] | |
| 2210 | - ); | |
| 2211 | - | |
| 2212 | - $this->customizer->add_control( | |
| 2213 | - new AlphaColorControl( | |
| 2214 | - $this->customizer, | |
| 2215 | - 'betterdocs_search_field_color', | |
| 2216 | - [ | |
| 2217 | - 'label' => __( 'Search Text Color', 'betterdocs' ), | |
| 2218 | - 'section' => 'betterdocs_live_search_settings', | |
| 2219 | - 'settings' => 'betterdocs_search_field_color', | |
| 2220 | - 'priority' => 533 | |
| 2221 | - ] | |
| 2222 | - ) | |
| 2223 | - ); | |
| 2224 | - } | |
| 2225 | - | |
| 2226 | - public function placeholder_color() { | |
| 2227 | - $this->customizer->add_setting( | |
| 2228 | - 'betterdocs_search_placeholder_color', | |
| 2229 | - [ | |
| 2230 | - 'default' => $this->defaults['betterdocs_search_placeholder_color'], | |
| 2231 | - 'capability' => 'edit_theme_options', | |
| 2232 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2233 | - ] | |
| 2234 | - ); | |
| 2235 | - | |
| 2236 | - $this->customizer->add_control( | |
| 2237 | - new AlphaColorControl( | |
| 2238 | - $this->customizer, | |
| 2239 | - 'betterdocs_search_placeholder_color', | |
| 2240 | - [ | |
| 2241 | - 'label' => __( 'Search Placeholder Color', 'betterdocs' ), | |
| 2242 | - 'section' => 'betterdocs_live_search_settings', | |
| 2243 | - 'settings' => 'betterdocs_search_placeholder_color', | |
| 2244 | - 'priority' => 533 | |
| 2245 | - ] | |
| 2246 | - ) | |
| 2247 | - ); | |
| 2248 | - } | |
| 2249 | - | |
| 2250 | - public function placeholder_color_layout_2() { | |
| 2251 | - $this->customizer->add_setting( | |
| 2252 | - 'betterdocs_search_placeholder_color_layout_2', | |
| 2253 | - [ | |
| 2254 | - 'default' => $this->defaults['betterdocs_search_placeholder_color_layout_2'], | |
| 2255 | - 'capability' => 'edit_theme_options', | |
| 2256 | - 'transport' => 'postMessage', | |
| 2257 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2258 | - ] | |
| 2259 | - ); | |
| 2260 | - | |
| 2261 | - $this->customizer->add_control( | |
| 2262 | - new AlphaColorControl( | |
| 2263 | - $this->customizer, | |
| 2264 | - 'betterdocs_search_placeholder_color_layout_2', | |
| 2265 | - [ | |
| 2266 | - 'label' => __( 'Search Placeholder Color', 'betterdocs' ), | |
| 2267 | - 'section' => 'betterdocs_live_search_settings', | |
| 2268 | - 'settings' => 'betterdocs_search_placeholder_color_layout_2', | |
| 2269 | - 'priority' => 533 | |
| 2270 | - ] | |
| 2271 | - ) | |
| 2272 | - ); | |
| 2273 | - } | |
| 2274 | - | |
| 2275 | - public function field_padding() { | |
| 2276 | - $this->customizer->add_setting( | |
| 2277 | - 'betterdocs_search_field_padding', | |
| 2278 | - [ | |
| 2279 | - 'default' => $this->defaults['betterdocs_search_field_padding'], | |
| 2280 | - 'capability' => 'edit_theme_options', | |
| 2281 | - 'transport' => 'postMessage', | |
| 2282 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2283 | - | |
| 2284 | - ] | |
| 2285 | - ); | |
| 2286 | - | |
| 2287 | - $this->customizer->add_control( | |
| 2288 | - new TitleControl( | |
| 2289 | - $this->customizer, | |
| 2290 | - 'betterdocs_search_field_padding', | |
| 2291 | - [ | |
| 2292 | - 'type' => 'betterdocs-title', | |
| 2293 | - 'section' => 'betterdocs_live_search_settings', | |
| 2294 | - 'settings' => 'betterdocs_search_field_padding', | |
| 2295 | - 'label' => __( 'Search Field Padding', 'betterdocs' ), | |
| 2296 | - 'input_attrs' => [ | |
| 2297 | - 'id' => 'betterdocs_search_field_padding', | |
| 2298 | - 'class' => 'betterdocs-dimension' | |
| 2299 | - ], | |
| 2300 | - 'priority' => 534 | |
| 2301 | - ] | |
| 2302 | - ) | |
| 2303 | - ); | |
| 2304 | - | |
| 2305 | - $this->customizer->add_setting( | |
| 2306 | - 'betterdocs_search_field_padding_top', | |
| 2307 | - [ | |
| 2308 | - 'default' => $this->defaults['betterdocs_search_field_padding_top'], | |
| 2309 | - 'capability' => 'edit_theme_options', | |
| 2310 | - 'transport' => 'postMessage', | |
| 2311 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2312 | - ] | |
| 2313 | - ); | |
| 2314 | - | |
| 2315 | - $this->customizer->add_control( | |
| 2316 | - new DimensionControl( | |
| 2317 | - $this->customizer, | |
| 2318 | - 'betterdocs_search_field_padding_top', | |
| 2319 | - [ | |
| 2320 | - 'type' => 'betterdocs-dimension', | |
| 2321 | - 'section' => 'betterdocs_live_search_settings', | |
| 2322 | - 'settings' => 'betterdocs_search_field_padding_top', | |
| 2323 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 2324 | - 'input_attrs' => [ | |
| 2325 | - 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 2326 | - ], | |
| 2327 | - 'priority' => 534 | |
| 2328 | - ] | |
| 2329 | - ) | |
| 2330 | - ); | |
| 2331 | - | |
| 2332 | - $this->customizer->add_setting( | |
| 2333 | - 'betterdocs_search_field_padding_right', | |
| 2334 | - [ | |
| 2335 | - 'default' => $this->defaults['betterdocs_search_field_padding_right'], | |
| 2336 | - 'capability' => 'edit_theme_options', | |
| 2337 | - 'transport' => 'postMessage', | |
| 2338 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2339 | - | |
| 2340 | - ] | |
| 2341 | - ); | |
| 2342 | - | |
| 2343 | - $this->customizer->add_control( | |
| 2344 | - new DimensionControl( | |
| 2345 | - $this->customizer, | |
| 2346 | - 'betterdocs_search_field_padding_right', | |
| 2347 | - [ | |
| 2348 | - 'type' => 'betterdocs-dimension', | |
| 2349 | - 'section' => 'betterdocs_live_search_settings', | |
| 2350 | - 'settings' => 'betterdocs_search_field_padding_right', | |
| 2351 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 2352 | - 'input_attrs' => [ | |
| 2353 | - 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 2354 | - ], | |
| 2355 | - 'priority' => 534 | |
| 2356 | - ] | |
| 2357 | - ) | |
| 2358 | - ); | |
| 2359 | - | |
| 2360 | - $this->customizer->add_setting( | |
| 2361 | - 'betterdocs_search_field_padding_bottom', | |
| 2362 | - [ | |
| 2363 | - 'default' => $this->defaults['betterdocs_search_field_padding_bottom'], | |
| 2364 | - 'capability' => 'edit_theme_options', | |
| 2365 | - 'transport' => 'postMessage', | |
| 2366 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2367 | - | |
| 2368 | - ] | |
| 2369 | - ); | |
| 2370 | - | |
| 2371 | - $this->customizer->add_control( | |
| 2372 | - new DimensionControl( | |
| 2373 | - $this->customizer, | |
| 2374 | - 'betterdocs_search_field_padding_bottom', | |
| 2375 | - [ | |
| 2376 | - 'type' => 'betterdocs-dimension', | |
| 2377 | - 'section' => 'betterdocs_live_search_settings', | |
| 2378 | - 'settings' => 'betterdocs_search_field_padding_bottom', | |
| 2379 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 2380 | - 'input_attrs' => [ | |
| 2381 | - 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 2382 | - ], | |
| 2383 | - 'priority' => 534 | |
| 2384 | - ] | |
| 2385 | - ) | |
| 2386 | - ); | |
| 2387 | - | |
| 2388 | - $this->customizer->add_setting( | |
| 2389 | - 'betterdocs_search_field_padding_left', | |
| 2390 | - [ | |
| 2391 | - 'default' => $this->defaults['betterdocs_search_field_padding_left'], | |
| 2392 | - 'capability' => 'edit_theme_options', | |
| 2393 | - 'transport' => 'postMessage', | |
| 2394 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2395 | - | |
| 2396 | - ] | |
| 2397 | - ); | |
| 2398 | - | |
| 2399 | - $this->customizer->add_control( | |
| 2400 | - new DimensionControl( | |
| 2401 | - $this->customizer, | |
| 2402 | - 'betterdocs_search_field_padding_left', | |
| 2403 | - [ | |
| 2404 | - 'type' => 'betterdocs-dimension', | |
| 2405 | - 'section' => 'betterdocs_live_search_settings', | |
| 2406 | - 'settings' => 'betterdocs_search_field_padding_left', | |
| 2407 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 2408 | - 'input_attrs' => [ | |
| 2409 | - 'class' => 'betterdocs_search_field_padding betterdocs-dimension' | |
| 2410 | - ], | |
| 2411 | - 'priority' => 534 | |
| 2412 | - ] | |
| 2413 | - ) | |
| 2414 | - ); | |
| 2415 | - } | |
| 2416 | - | |
| 2417 | - public function field_padding_layout_2() { | |
| 2418 | - $this->customizer->add_setting( | |
| 2419 | - 'betterdocs_search_field_padding_layout_2', | |
| 2420 | - [ | |
| 2421 | - 'default' => $this->defaults['betterdocs_search_field_padding_layout_2'], | |
| 2422 | - 'capability' => 'edit_theme_options', | |
| 2423 | - 'transport' => 'postMessage', | |
| 2424 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2425 | - | |
| 2426 | - ] | |
| 2427 | - ); | |
| 2428 | - | |
| 2429 | - $this->customizer->add_control( | |
| 2430 | - new TitleControl( | |
| 2431 | - $this->customizer, | |
| 2432 | - 'betterdocs_search_field_padding_layout_2', | |
| 2433 | - [ | |
| 2434 | - 'type' => 'betterdocs-title', | |
| 2435 | - 'section' => 'betterdocs_live_search_settings', | |
| 2436 | - 'settings' => 'betterdocs_search_field_padding_layout_2', | |
| 2437 | - 'label' => __( 'Search Field Padding', 'betterdocs' ), | |
| 2438 | - 'input_attrs' => [ | |
| 2439 | - 'id' => 'betterdocs_search_field_padding_layout_2', | |
| 2440 | - 'class' => 'betterdocs-dimension' | |
| 2441 | - ], | |
| 2442 | - 'priority' => 534 | |
| 2443 | - ] | |
| 2444 | - ) | |
| 2445 | - ); | |
| 2446 | - | |
| 2447 | - $this->customizer->add_setting( | |
| 2448 | - 'betterdocs_search_field_padding_top_layout_2', | |
| 2449 | - [ | |
| 2450 | - 'default' => $this->defaults['betterdocs_search_field_padding_top_layout_2'], | |
| 2451 | - 'capability' => 'edit_theme_options', | |
| 2452 | - 'transport' => 'postMessage', | |
| 2453 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2454 | - ] | |
| 2455 | - ); | |
| 2456 | - | |
| 2457 | - $this->customizer->add_control( | |
| 2458 | - new DimensionControl( | |
| 2459 | - $this->customizer, | |
| 2460 | - 'betterdocs_search_field_padding_top_layout_2', | |
| 2461 | - [ | |
| 2462 | - 'type' => 'betterdocs-dimension', | |
| 2463 | - 'section' => 'betterdocs_live_search_settings', | |
| 2464 | - 'settings' => 'betterdocs_search_field_padding_top_layout_2', | |
| 2465 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 2466 | - 'input_attrs' => [ | |
| 2467 | - 'class' => 'betterdocs_search_field_padding_layout_2 betterdocs-dimension' | |
| 2468 | - ], | |
| 2469 | - 'priority' => 534 | |
| 2470 | - ] | |
| 2471 | - ) | |
| 2472 | - ); | |
| 2473 | - | |
| 2474 | - $this->customizer->add_setting( | |
| 2475 | - 'betterdocs_search_field_padding_right_layout_2', | |
| 2476 | - [ | |
| 2477 | - 'default' => $this->defaults['betterdocs_search_field_padding_right_layout_2'], | |
| 2478 | - 'capability' => 'edit_theme_options', | |
| 2479 | - 'transport' => 'postMessage', | |
| 2480 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2481 | - | |
| 2482 | - ] | |
| 2483 | - ); | |
| 2484 | - | |
| 2485 | - $this->customizer->add_control( | |
| 2486 | - new DimensionControl( | |
| 2487 | - $this->customizer, | |
| 2488 | - 'betterdocs_search_field_padding_right_layout_2', | |
| 2489 | - [ | |
| 2490 | - 'type' => 'betterdocs-dimension', | |
| 2491 | - 'section' => 'betterdocs_live_search_settings', | |
| 2492 | - 'settings' => 'betterdocs_search_field_padding_right_layout_2', | |
| 2493 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 2494 | - 'input_attrs' => [ | |
| 2495 | - 'class' => 'betterdocs_search_field_padding_layout_2 betterdocs-dimension' | |
| 2496 | - ], | |
| 2497 | - 'priority' => 534 | |
| 2498 | - ] | |
| 2499 | - ) | |
| 2500 | - ); | |
| 2501 | - | |
| 2502 | - $this->customizer->add_setting( | |
| 2503 | - 'betterdocs_search_field_padding_bottom_layout_2', | |
| 2504 | - [ | |
| 2505 | - 'default' => $this->defaults['betterdocs_search_field_padding_bottom_layout_2'], | |
| 2506 | - 'capability' => 'edit_theme_options', | |
| 2507 | - 'transport' => 'postMessage', | |
| 2508 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2509 | - | |
| 2510 | - ] | |
| 2511 | - ); | |
| 2512 | - | |
| 2513 | - $this->customizer->add_control( | |
| 2514 | - new DimensionControl( | |
| 2515 | - $this->customizer, | |
| 2516 | - 'betterdocs_search_field_padding_bottom_layout_2', | |
| 2517 | - [ | |
| 2518 | - 'type' => 'betterdocs-dimension', | |
| 2519 | - 'section' => 'betterdocs_live_search_settings', | |
| 2520 | - 'settings' => 'betterdocs_search_field_padding_bottom_layout_2', | |
| 2521 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 2522 | - 'input_attrs' => [ | |
| 2523 | - 'class' => 'betterdocs_search_field_padding_layout_2 betterdocs-dimension' | |
| 2524 | - ], | |
| 2525 | - 'priority' => 534 | |
| 2526 | - ] | |
| 2527 | - ) | |
| 2528 | - ); | |
| 2529 | - | |
| 2530 | - $this->customizer->add_setting( | |
| 2531 | - 'betterdocs_search_field_padding_left_layout_2', | |
| 2532 | - [ | |
| 2533 | - 'default' => $this->defaults['betterdocs_search_field_padding_left_layout_2'], | |
| 2534 | - 'capability' => 'edit_theme_options', | |
| 2535 | - 'transport' => 'postMessage', | |
| 2536 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2537 | - | |
| 2538 | - ] | |
| 2539 | - ); | |
| 2540 | - | |
| 2541 | - $this->customizer->add_control( | |
| 2542 | - new DimensionControl( | |
| 2543 | - $this->customizer, | |
| 2544 | - 'betterdocs_search_field_padding_left_layout_2', | |
| 2545 | - [ | |
| 2546 | - 'type' => 'betterdocs-dimension', | |
| 2547 | - 'section' => 'betterdocs_live_search_settings', | |
| 2548 | - 'settings' => 'betterdocs_search_field_padding_left_layout_2', | |
| 2549 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 2550 | - 'input_attrs' => [ | |
| 2551 | - 'class' => 'betterdocs_search_field_padding_layout_2 betterdocs-dimension' | |
| 2552 | - ], | |
| 2553 | - 'priority' => 534 | |
| 2554 | - ] | |
| 2555 | - ) | |
| 2556 | - ); | |
| 2557 | - } | |
| 2558 | - | |
| 2559 | - // public function search_button_settings_layout_2() { | |
| 2560 | - // $this->customizer->add_setting( 'betterdocs_search_button_section_layout_2', [ | |
| 2561 | - // 'default' => $this->defaults['betterdocs_search_button_section_layout_2'], | |
| 2562 | - // 'sanitize_callback' => 'esc_html' | |
| 2563 | - // ] ); | |
| 2564 | - | |
| 2565 | - // $this->customizer->add_control( new SeparatorControl( | |
| 2566 | - // $this->customizer, 'betterdocs_search_button_section_layout_2', [ | |
| 2567 | - // 'label' => esc_html__( 'Search Button Settings', 'betterdocs' ), | |
| 2568 | - // 'settings' => 'betterdocs_search_button_section_layout_2', | |
| 2569 | - // 'section' => 'betterdocs_live_search_settings', | |
| 2570 | - // 'priority' => 576 | |
| 2571 | - // ] | |
| 2572 | - // ) ); | |
| 2573 | - // } | |
| 2574 | - | |
| 2575 | - public function search_button_font_size_layout_2() { | |
| 2576 | - $this->customizer->add_setting( | |
| 2577 | - 'betterdocs_new_search_button_font_size_layout_2', | |
| 2578 | - [ | |
| 2579 | - 'default' => $this->defaults['betterdocs_new_search_button_font_size_layout_2'], | |
| 2580 | - 'capability' => 'edit_theme_options', | |
| 2581 | - 'transport' => 'postMessage', | |
| 2582 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2583 | - | |
| 2584 | - ] | |
| 2585 | - ); | |
| 2586 | - | |
| 2587 | - $this->customizer->add_control( | |
| 2588 | - new RangeValueControl( | |
| 2589 | - $this->customizer, | |
| 2590 | - 'betterdocs_new_search_button_font_size_layout_2', | |
| 2591 | - [ | |
| 2592 | - 'type' => 'betterdocs-range-value', | |
| 2593 | - 'section' => 'betterdocs_live_search_settings', | |
| 2594 | - 'settings' => 'betterdocs_new_search_button_font_size_layout_2', | |
| 2595 | - 'label' => esc_html__( 'Font Size', 'betterdocs' ), | |
| 2596 | - 'input_attrs' => [ | |
| 2597 | - 'class' => '', | |
| 2598 | - 'min' => 0, | |
| 2599 | - 'max' => 200, | |
| 2600 | - 'step' => 1, | |
| 2601 | - 'suffix' => 'px' //optional suffix | |
| 2602 | - ], | |
| 2603 | - 'priority' => 578 | |
| 2604 | - ] | |
| 2605 | - ) | |
| 2606 | - ); | |
| 2607 | - } | |
| 2608 | - | |
| 2609 | - public function search_button_font_weight_layout_2() { | |
| 2610 | - //Search Button Font Weight | |
| 2611 | - $this->customizer->add_setting( | |
| 2612 | - 'betterdocs_new_search_button_font_weight_layout_2', | |
| 2613 | - [ | |
| 2614 | - 'default' => $this->defaults['betterdocs_new_search_button_font_weight_layout_2'], | |
| 2615 | - 'capability' => 'edit_theme_options', | |
| 2616 | - 'transport' => 'postMessage', | |
| 2617 | - 'sanitize_callback' => [ $this->sanitizer, 'choices' ] | |
| 2618 | - ] | |
| 2619 | - ); | |
| 2620 | - | |
| 2621 | - $this->customizer->add_control( | |
| 2622 | - new WP_Customize_Control( | |
| 2623 | - $this->customizer, | |
| 2624 | - 'betterdocs_new_search_button_font_weight_layout_2', | |
| 2625 | - [ | |
| 2626 | - 'label' => esc_html__( 'Font Weight', 'betterdocs' ), | |
| 2627 | - 'section' => 'betterdocs_live_search_settings', | |
| 2628 | - 'settings' => 'betterdocs_new_search_button_font_weight_layout_2', | |
| 2629 | - 'type' => 'select', | |
| 2630 | - 'choices' => [ | |
| 2631 | - '100' => '100', | |
| 2632 | - '200' => '200', | |
| 2633 | - '300' => '300', | |
| 2634 | - '400' => '400', | |
| 2635 | - '500' => '500', | |
| 2636 | - '600' => '600', | |
| 2637 | - '700' => '700', | |
| 2638 | - '800' => '800', | |
| 2639 | - '900' => '900' | |
| 2640 | - ], | |
| 2641 | - 'priority' => 579 | |
| 2642 | - ] | |
| 2643 | - ) | |
| 2644 | - ); | |
| 2645 | - } | |
| 2646 | - | |
| 2647 | - public function search_button_text_transform_layout_2() { | |
| 2648 | - //Search Button Text Transform | |
| 2649 | - $this->customizer->add_setting( | |
| 2650 | - 'betterdocs_new_search_button_text_transform_layout_2', | |
| 2651 | - [ | |
| 2652 | - 'default' => $this->defaults['betterdocs_new_search_button_text_transform_layout_2'], | |
| 2653 | - 'capability' => 'edit_theme_options', | |
| 2654 | - 'transport' => 'postMessage', | |
| 2655 | - 'sanitize_callback' => [ $this->sanitizer, 'choices' ] | |
| 2656 | - ] | |
| 2657 | - ); | |
| 2658 | - | |
| 2659 | - $this->customizer->add_control( | |
| 2660 | - new WP_Customize_Control( | |
| 2661 | - $this->customizer, | |
| 2662 | - 'betterdocs_new_search_button_text_transform_layout_2', | |
| 2663 | - [ | |
| 2664 | - 'label' => esc_html__( 'Font Text Transform', 'betterdocs' ), | |
| 2665 | - 'section' => 'betterdocs_live_search_settings', | |
| 2666 | - 'settings' => 'betterdocs_new_search_button_text_transform_layout_2', | |
| 2667 | - 'type' => 'select', | |
| 2668 | - 'choices' => [ | |
| 2669 | - 'none' => 'none', | |
| 2670 | - 'capitalize' => 'capitalize', | |
| 2671 | - 'uppercase' => 'uppercase', | |
| 2672 | - 'lowercase' => 'lowercase', | |
| 2673 | - 'initial' => 'initial', | |
| 2674 | - 'inherit' => 'inherit' | |
| 2675 | - ], | |
| 2676 | - 'priority' => 580 | |
| 2677 | - ] | |
| 2678 | - ) | |
| 2679 | - ); | |
| 2680 | - } | |
| 2681 | - | |
| 2682 | - public function search_button_text_color_layout_2() { | |
| 2683 | - // Search Button Text Color | |
| 2684 | - $this->customizer->add_setting( | |
| 2685 | - 'betterdocs_search_button_text_color_layout_2', | |
| 2686 | - [ | |
| 2687 | - 'default' => $this->defaults['betterdocs_search_button_text_color_layout_2'], | |
| 2688 | - 'capability' => 'edit_theme_options', | |
| 2689 | - 'transport' => 'postMessage', | |
| 2690 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2691 | - ] | |
| 2692 | - ); | |
| 2693 | - | |
| 2694 | - $this->customizer->add_control( | |
| 2695 | - new AlphaColorControl( | |
| 2696 | - $this->customizer, | |
| 2697 | - 'betterdocs_search_button_text_color_layout_2', | |
| 2698 | - [ | |
| 2699 | - 'label' => esc_html__( 'Text Color', 'betterdocs' ), | |
| 2700 | - 'section' => 'betterdocs_live_search_settings', | |
| 2701 | - 'settings' => 'betterdocs_search_button_text_color_layout_2', | |
| 2702 | - 'priority' => 582 | |
| 2703 | - ] | |
| 2704 | - ) | |
| 2705 | - ); | |
| 2706 | - } | |
| 2707 | - | |
| 2708 | - public function search_button_background_color_layout_2() { | |
| 2709 | - // Search Button Background Color | |
| 2710 | - $this->customizer->add_setting( | |
| 2711 | - 'betterdocs_search_button_background_color_layout_2', | |
| 2712 | - [ | |
| 2713 | - 'default' => $this->defaults['betterdocs_search_button_background_color_layout_2'], | |
| 2714 | - 'capability' => 'edit_theme_options', | |
| 2715 | - 'transport' => 'postMessage', | |
| 2716 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2717 | - ] | |
| 2718 | - ); | |
| 2719 | - | |
| 2720 | - $this->customizer->add_control( | |
| 2721 | - new AlphaColorControl( | |
| 2722 | - $this->customizer, | |
| 2723 | - 'betterdocs_search_button_background_color_layout_2', | |
| 2724 | - [ | |
| 2725 | - 'label' => esc_html__( 'Background Color', 'betterdocs' ), | |
| 2726 | - 'section' => 'betterdocs_live_search_settings', | |
| 2727 | - 'settings' => 'betterdocs_search_button_background_color_layout_2', | |
| 2728 | - 'priority' => 583 | |
| 2729 | - ] | |
| 2730 | - ) | |
| 2731 | - ); | |
| 2732 | - } | |
| 2733 | - | |
| 2734 | - public function search_button_background_color_hover_layout_2() { | |
| 2735 | - $this->customizer->add_setting( | |
| 2736 | - 'betterdocs_search_button_background_color_hover_layout_2', | |
| 2737 | - [ | |
| 2738 | - 'default' => $this->defaults['betterdocs_search_button_background_color_hover_layout_2'], | |
| 2739 | - 'capability' => 'edit_theme_options', | |
| 2740 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2741 | - ] | |
| 2742 | - ); | |
| 2743 | - | |
| 2744 | - $this->customizer->add_control( | |
| 2745 | - new AlphaColorControl( | |
| 2746 | - $this->customizer, | |
| 2747 | - 'betterdocs_search_button_background_color_hover_layout_2', | |
| 2748 | - [ | |
| 2749 | - 'label' => esc_html__( 'Background Hover Color', 'betterdocs' ), | |
| 2750 | - 'section' => 'betterdocs_live_search_settings', | |
| 2751 | - 'settings' => 'betterdocs_search_button_background_color_hover_layout_2', | |
| 2752 | - 'priority' => 583 | |
| 2753 | - ] | |
| 2754 | - ) | |
| 2755 | - ); | |
| 2756 | - } | |
| 2757 | - | |
| 2758 | - public function search_button_border_radius_layout_2() { | |
| 2759 | - $this->customizer->add_setting( | |
| 2760 | - 'betterdocs_search_button_borderr_radius_layout_2', | |
| 2761 | - [ | |
| 2762 | - 'default' => $this->defaults['betterdocs_search_button_borderr_radius_layout_2'], | |
| 2763 | - 'capability' => 'edit_theme_options', | |
| 2764 | - 'transport' => 'postMessage', | |
| 2765 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 2766 | - | |
| 2767 | - ] | |
| 2768 | - ); | |
| 2769 | - | |
| 2770 | - $this->customizer->add_control( | |
| 2771 | - new TitleControl( | |
| 2772 | - $this->customizer, | |
| 2773 | - 'betterdocs_search_button_borderr_radius_layout_2', | |
| 2774 | - [ | |
| 2775 | - 'type' => 'betterdocs-title', | |
| 2776 | - 'section' => 'betterdocs_live_search_settings', | |
| 2777 | - 'settings' => 'betterdocs_search_button_borderr_radius_layout_2', | |
| 2778 | - 'label' => esc_html__( 'Border Radius', 'betterdocs' ), | |
| 2779 | - 'input_attrs' => [ | |
| 2780 | - 'id' => 'betterdocs_search_button_borderr_radius_layout_2', | |
| 2781 | - 'class' => 'betterdocs-dimension' | |
| 2782 | - ], | |
| 2783 | - 'priority' => 584 | |
| 2784 | - ] | |
| 2785 | - ) | |
| 2786 | - ); | |
| 2787 | - } | |
| 2788 | - | |
| 2789 | - public function border_radius_top_left_layout_2() { | |
| 2790 | - $this->customizer->add_setting( | |
| 2791 | - 'betterdocs_search_button_borderr_left_top_layout_2', | |
| 2792 | - [ | |
| 2793 | - 'default' => $this->defaults['betterdocs_search_button_borderr_left_top_layout_2'], | |
| 2794 | - 'capability' => 'edit_theme_options', | |
| 2795 | - 'transport' => 'postMessage', | |
| 2796 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2797 | - ] | |
| 2798 | - ); | |
| 2799 | - | |
| 2800 | - $this->customizer->add_control( | |
| 2801 | - new DimensionControl( | |
| 2802 | - $this->customizer, | |
| 2803 | - 'betterdocs_search_button_borderr_left_top_layout_2', | |
| 2804 | - [ | |
| 2805 | - 'type' => 'betterdocs-dimension', | |
| 2806 | - 'section' => 'betterdocs_live_search_settings', | |
| 2807 | - 'settings' => 'betterdocs_search_button_borderr_left_top_layout_2', | |
| 2808 | - 'label' => esc_html__( 'Left Top', 'betterdocs' ), | |
| 2809 | - 'input_attrs' => [ | |
| 2810 | - 'class' => 'betterdocs_search_button_borderr_radius_layout_2 betterdocs-dimension' | |
| 2811 | - ], | |
| 2812 | - 'priority' => 584 | |
| 2813 | - ] | |
| 2814 | - ) | |
| 2815 | - ); | |
| 2816 | - } | |
| 2817 | - | |
| 2818 | - public function border_radius_top_right_layout_2() { | |
| 2819 | - $this->customizer->add_setting( | |
| 2820 | - 'betterdocs_search_button_borderr_right_top_layout_2', | |
| 2821 | - [ | |
| 2822 | - 'default' => $this->defaults['betterdocs_search_button_borderr_right_top_layout_2'], | |
| 2823 | - 'capability' => 'edit_theme_options', | |
| 2824 | - 'transport' => 'postMessage', | |
| 2825 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2826 | - ] | |
| 2827 | - ); | |
| 2828 | - | |
| 2829 | - $this->customizer->add_control( | |
| 2830 | - new DimensionControl( | |
| 2831 | - $this->customizer, | |
| 2832 | - 'betterdocs_search_button_borderr_right_top_layout_2', | |
| 2833 | - [ | |
| 2834 | - 'type' => 'betterdocs-dimension', | |
| 2835 | - 'section' => 'betterdocs_live_search_settings', | |
| 2836 | - 'settings' => 'betterdocs_search_button_borderr_right_top_layout_2', | |
| 2837 | - 'label' => esc_html__( 'Right Top', 'betterdocs' ), | |
| 2838 | - 'input_attrs' => [ | |
| 2839 | - 'class' => 'betterdocs_search_button_borderr_radius_layout_2 betterdocs-dimension' | |
| 2840 | - ], | |
| 2841 | - 'priority' => 584 | |
| 2842 | - ] | |
| 2843 | - ) | |
| 2844 | - ); | |
| 2845 | - } | |
| 2846 | - | |
| 2847 | - public function border_radius_bottom_left_layout_2() { | |
| 2848 | - $this->customizer->add_setting( | |
| 2849 | - 'betterdocs_search_button_borderr_left_bottom_layout_2', | |
| 2850 | - [ | |
| 2851 | - 'default' => $this->defaults['betterdocs_search_button_borderr_left_bottom_layout_2'], | |
| 2852 | - 'capability' => 'edit_theme_options', | |
| 2853 | - 'transport' => 'postMessage', | |
| 2854 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2855 | - ] | |
| 2856 | - ); | |
| 2857 | - | |
| 2858 | - $this->customizer->add_control( | |
| 2859 | - new DimensionControl( | |
| 2860 | - $this->customizer, | |
| 2861 | - 'betterdocs_search_button_borderr_left_bottom_layout_2', | |
| 2862 | - [ | |
| 2863 | - 'type' => 'betterdocs-dimension', | |
| 2864 | - 'section' => 'betterdocs_live_search_settings', | |
| 2865 | - 'settings' => 'betterdocs_search_button_borderr_left_bottom_layout_2', | |
| 2866 | - 'label' => esc_html__( 'Left Bottom', 'betterdocs' ), | |
| 2867 | - 'input_attrs' => [ | |
| 2868 | - 'class' => 'betterdocs_search_button_borderr_radius_layout_2 betterdocs-dimension' | |
| 2869 | - ], | |
| 2870 | - 'priority' => 584 | |
| 2871 | - ] | |
| 2872 | - ) | |
| 2873 | - ); | |
| 2874 | - } | |
| 2875 | - | |
| 2876 | - public function border_radius_bottom_right_layout_2() { | |
| 2877 | - $this->customizer->add_setting( | |
| 2878 | - 'betterdocs_search_button_borderr_right_bottom_layout_2', | |
| 2879 | - [ | |
| 2880 | - 'default' => $this->defaults['betterdocs_search_button_borderr_right_bottom_layout_2'], | |
| 2881 | - 'capability' => 'edit_theme_options', | |
| 2882 | - 'transport' => 'postMessage', | |
| 2883 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2884 | - ] | |
| 2885 | - ); | |
| 2886 | - | |
| 2887 | - $this->customizer->add_control( | |
| 2888 | - new DimensionControl( | |
| 2889 | - $this->customizer, | |
| 2890 | - 'betterdocs_search_button_borderr_right_bottom_layout_2', | |
| 2891 | - [ | |
| 2892 | - 'type' => 'betterdocs-dimension', | |
| 2893 | - 'section' => 'betterdocs_live_search_settings', | |
| 2894 | - 'settings' => 'betterdocs_search_button_borderr_right_bottom_layout_2', | |
| 2895 | - 'label' => esc_html__( 'Right Bottom', 'betterdocs' ), | |
| 2896 | - 'input_attrs' => [ | |
| 2897 | - 'class' => 'betterdocs_search_button_borderr_radius_layout_2 betterdocs-dimension' | |
| 2898 | - ], | |
| 2899 | - 'priority' => 584 | |
| 2900 | - ] | |
| 2901 | - ) | |
| 2902 | - ); | |
| 2903 | - } | |
| 2904 | - | |
| 2905 | - public function button_padding_layout_2() { | |
| 2906 | - $this->customizer->add_setting( | |
| 2907 | - 'betterdocs_search_button_padding_layout_2', | |
| 2908 | - [ | |
| 2909 | - 'default' => $this->defaults['betterdocs_search_button_padding_layout_2'], | |
| 2910 | - 'capability' => 'edit_theme_options', | |
| 2911 | - 'transport' => 'postMessage', | |
| 2912 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2913 | - | |
| 2914 | - ] | |
| 2915 | - ); | |
| 2916 | - | |
| 2917 | - $this->customizer->add_control( | |
| 2918 | - new TitleControl( | |
| 2919 | - $this->customizer, | |
| 2920 | - 'betterdocs_search_button_padding_layout_2', | |
| 2921 | - [ | |
| 2922 | - 'type' => 'betterdocs-title', | |
| 2923 | - 'section' => 'betterdocs_live_search_settings', | |
| 2924 | - 'settings' => 'betterdocs_search_button_padding_layout_2', | |
| 2925 | - 'label' => esc_html__( 'Padding', 'betterdocs' ), | |
| 2926 | - 'input_attrs' => [ | |
| 2927 | - 'id' => 'betterdocs_search_button_padding_layout_2', | |
| 2928 | - 'class' => 'betterdocs-dimension' | |
| 2929 | - ], | |
| 2930 | - 'priority' => 589 | |
| 2931 | - ] | |
| 2932 | - ) | |
| 2933 | - ); | |
| 2934 | - } | |
| 2935 | - | |
| 2936 | - public function button_padding_top_layout_2() { | |
| 2937 | - $this->customizer->add_setting( | |
| 2938 | - 'betterdocs_search_button_padding_top_layout_2', | |
| 2939 | - apply_filters( | |
| 2940 | - 'betterdocs_search_button_padding_top_layout_2', | |
| 2941 | - [ | |
| 2942 | - 'default' => $this->defaults['betterdocs_search_button_padding_top_layout_2'], | |
| 2943 | - 'capability' => 'edit_theme_options', | |
| 2944 | - 'transport' => 'postMessage', | |
| 2945 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2946 | - ] | |
| 2947 | - ) | |
| 2948 | - ); | |
| 2949 | - | |
| 2950 | - $this->customizer->add_control( | |
| 2951 | - new DimensionControl( | |
| 2952 | - $this->customizer, | |
| 2953 | - 'betterdocs_search_button_padding_top_layout_2', | |
| 2954 | - [ | |
| 2955 | - 'type' => 'betterdocs-dimension', | |
| 2956 | - 'section' => 'betterdocs_live_search_settings', | |
| 2957 | - 'settings' => 'betterdocs_search_button_padding_top_layout_2', | |
| 2958 | - 'label' => esc_html__( 'Top', 'betterdocs' ), | |
| 2959 | - 'input_attrs' => [ | |
| 2960 | - 'class' => 'betterdocs_search_button_padding betterdocs-dimension' | |
| 2961 | - ], | |
| 2962 | - 'priority' => 589 | |
| 2963 | - ] | |
| 2964 | - ) | |
| 2965 | - ); | |
| 2966 | - } | |
| 2967 | - | |
| 2968 | - public function button_padding_right_layout_2() { | |
| 2969 | - $this->customizer->add_setting( | |
| 2970 | - 'betterdocs_search_button_padding_right_layout_2', | |
| 2971 | - apply_filters( | |
| 2972 | - 'betterdocs_search_button_padding_right_layout_2', | |
| 2973 | - [ | |
| 2974 | - 'default' => $this->defaults['betterdocs_search_button_padding_right_layout_2'], | |
| 2975 | - 'capability' => 'edit_theme_options', | |
| 2976 | - 'transport' => 'postMessage', | |
| 2977 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 2978 | - ] | |
| 2979 | - ) | |
| 2980 | - ); | |
| 2981 | - | |
| 2982 | - $this->customizer->add_control( | |
| 2983 | - new DimensionControl( | |
| 2984 | - $this->customizer, | |
| 2985 | - 'betterdocs_search_button_padding_right_layout_2', | |
| 2986 | - [ | |
| 2987 | - 'type' => 'betterdocs-dimension', | |
| 2988 | - 'section' => 'betterdocs_live_search_settings', | |
| 2989 | - 'settings' => 'betterdocs_search_button_padding_right_layout_2', | |
| 2990 | - 'label' => esc_html__( 'Right', 'betterdocs' ), | |
| 2991 | - 'input_attrs' => [ | |
| 2992 | - 'class' => 'betterdocs_search_button_padding_layout_2 betterdocs-dimension' | |
| 2993 | - ], | |
| 2994 | - 'priority' => 589 | |
| 2995 | - ] | |
| 2996 | - ) | |
| 2997 | - ); | |
| 2998 | - } | |
| 2999 | - | |
| 3000 | - public function button_padding_bottom_layout_2() { | |
| 3001 | - $this->customizer->add_setting( | |
| 3002 | - 'betterdocs_search_button_padding_bottom_layout_2', | |
| 3003 | - apply_filters( | |
| 3004 | - 'betterdocs_search_button_padding_bottom_layout_2', | |
| 3005 | - [ | |
| 3006 | - 'default' => $this->defaults['betterdocs_search_button_padding_bottom_layout_2'], | |
| 3007 | - 'capability' => 'edit_theme_options', | |
| 3008 | - 'transport' => 'postMessage', | |
| 3009 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3010 | - ] | |
| 3011 | - ) | |
| 3012 | - ); | |
| 3013 | - | |
| 3014 | - $this->customizer->add_control( | |
| 3015 | - new DimensionControl( | |
| 3016 | - $this->customizer, | |
| 3017 | - 'betterdocs_search_button_padding_bottom_layout_2', | |
| 3018 | - [ | |
| 3019 | - 'type' => 'betterdocs-dimension', | |
| 3020 | - 'section' => 'betterdocs_live_search_settings', | |
| 3021 | - 'settings' => 'betterdocs_search_button_padding_bottom_layout_2', | |
| 3022 | - 'label' => esc_html__( 'Bottom', 'betterdocs' ), | |
| 3023 | - 'input_attrs' => [ | |
| 3024 | - 'class' => 'betterdocs_search_button_padding betterdocs-dimension' | |
| 3025 | - ], | |
| 3026 | - 'priority' => 589 | |
| 3027 | - ] | |
| 3028 | - ) | |
| 3029 | - ); | |
| 3030 | - } | |
| 3031 | - | |
| 3032 | - public function button_padding_left_layout_2() { | |
| 3033 | - $this->customizer->add_setting( | |
| 3034 | - 'betterdocs_search_button_padding_left_layout_2', | |
| 3035 | - [ | |
| 3036 | - 'default' => $this->defaults['betterdocs_search_button_padding_left_layout_2'], | |
| 3037 | - 'capability' => 'edit_theme_options', | |
| 3038 | - 'transport' => 'postMessage', | |
| 3039 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3040 | - ] | |
| 3041 | - ); | |
| 3042 | - | |
| 3043 | - $this->customizer->add_control( | |
| 3044 | - new DimensionControl( | |
| 3045 | - $this->customizer, | |
| 3046 | - 'betterdocs_search_button_padding_left_layout_2', | |
| 3047 | - [ | |
| 3048 | - 'type' => 'betterdocs-dimension', | |
| 3049 | - 'section' => 'betterdocs_live_search_settings', | |
| 3050 | - 'settings' => 'betterdocs_search_button_padding_left_layout_2', | |
| 3051 | - 'label' => esc_html__( 'Left', 'betterdocs' ), | |
| 3052 | - 'input_attrs' => [ | |
| 3053 | - 'class' => 'betterdocs_search_button_padding_layout_2 betterdocs-dimension' | |
| 3054 | - ], | |
| 3055 | - 'priority' => 589 | |
| 3056 | - ] | |
| 3057 | - ) | |
| 3058 | - ); | |
| 3059 | - } | |
| 3060 | - | |
| 3061 | - | |
| 3062 | - public function field_border_radius() { | |
| 3063 | - $this->customizer->add_setting( | |
| 3064 | - 'betterdocs_search_field_border_radius', | |
| 3065 | - [ | |
| 3066 | - 'default' => $this->defaults['betterdocs_search_field_border_radius'], | |
| 3067 | - 'capability' => 'edit_theme_options', | |
| 3068 | - 'transport' => 'postMessage', | |
| 3069 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3070 | - | |
| 3071 | - ] | |
| 3072 | - ); | |
| 3073 | - | |
| 3074 | - $this->customizer->add_control( | |
| 3075 | - new RangeValueControl( | |
| 3076 | - $this->customizer, | |
| 3077 | - 'betterdocs_search_field_border_radius', | |
| 3078 | - [ | |
| 3079 | - 'type' => 'betterdocs-range-value', | |
| 3080 | - 'section' => 'betterdocs_live_search_settings', | |
| 3081 | - 'settings' => 'betterdocs_search_field_border_radius', | |
| 3082 | - 'label' => __( 'Search Field Border Radius', 'betterdocs' ), | |
| 3083 | - 'input_attrs' => [ | |
| 3084 | - 'class' => '', | |
| 3085 | - 'min' => 0, | |
| 3086 | - 'max' => 100, | |
| 3087 | - 'step' => 1, | |
| 3088 | - 'suffix' => 'px' //optional suffix | |
| 3089 | - ], | |
| 3090 | - 'priority' => 539 | |
| 3091 | - ] | |
| 3092 | - ) | |
| 3093 | - ); | |
| 3094 | - } | |
| 3095 | - | |
| 3096 | - public function icon_size() { | |
| 3097 | - $this->customizer->add_setting( | |
| 3098 | - 'betterdocs_search_icon_size', | |
| 3099 | - [ | |
| 3100 | - 'default' => $this->defaults['betterdocs_search_icon_size'], | |
| 3101 | - 'capability' => 'edit_theme_options', | |
| 3102 | - 'transport' => 'postMessage', | |
| 3103 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3104 | - ] | |
| 3105 | - ); | |
| 3106 | - | |
| 3107 | - $this->customizer->add_control( | |
| 3108 | - new RangeValueControl( | |
| 3109 | - $this->customizer, | |
| 3110 | - 'betterdocs_search_icon_size', | |
| 3111 | - [ | |
| 3112 | - 'type' => 'betterdocs-range-value', | |
| 3113 | - 'section' => 'betterdocs_live_search_settings', | |
| 3114 | - 'settings' => 'betterdocs_search_icon_size', | |
| 3115 | - 'label' => __( 'Search Icon Size', 'betterdocs' ), | |
| 3116 | - 'input_attrs' => [ | |
| 3117 | - 'min' => 0, | |
| 3118 | - 'max' => 100, | |
| 3119 | - 'step' => 1, | |
| 3120 | - 'suffix' => 'px' //optional suffix | |
| 3121 | - ], | |
| 3122 | - 'priority' => 540 | |
| 3123 | - ] | |
| 3124 | - ) | |
| 3125 | - ); | |
| 3126 | - } | |
| 3127 | - | |
| 3128 | - public function icon_color() { | |
| 3129 | - $this->customizer->add_setting( | |
| 3130 | - 'betterdocs_search_icon_color', | |
| 3131 | - [ | |
| 3132 | - 'default' => $this->defaults['betterdocs_search_icon_color'], | |
| 3133 | - 'capability' => 'edit_theme_options', | |
| 3134 | - 'transport' => 'postMessage', | |
| 3135 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3136 | - ] | |
| 3137 | - ); | |
| 3138 | - | |
| 3139 | - $this->customizer->add_control( | |
| 3140 | - new AlphaColorControl( | |
| 3141 | - $this->customizer, | |
| 3142 | - 'betterdocs_search_icon_color', | |
| 3143 | - [ | |
| 3144 | - 'label' => __( 'Search Icon Color', 'betterdocs' ), | |
| 3145 | - 'section' => 'betterdocs_live_search_settings', | |
| 3146 | - 'settings' => 'betterdocs_search_icon_color', | |
| 3147 | - 'priority' => 541 | |
| 3148 | - ] | |
| 3149 | - ) | |
| 3150 | - ); | |
| 3151 | - } | |
| 3152 | - | |
| 3153 | - public function icon_hover_color() { | |
| 3154 | - $this->customizer->add_setting( | |
| 3155 | - 'betterdocs_search_icon_hover_color', | |
| 3156 | - [ | |
| 3157 | - 'default' => $this->defaults['betterdocs_search_icon_hover_color'], | |
| 3158 | - 'capability' => 'edit_theme_options', | |
| 3159 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3160 | - ] | |
| 3161 | - ); | |
| 3162 | - | |
| 3163 | - $this->customizer->add_control( | |
| 3164 | - new AlphaColorControl( | |
| 3165 | - $this->customizer, | |
| 3166 | - 'betterdocs_search_icon_hover_color', | |
| 3167 | - [ | |
| 3168 | - 'label' => __( 'Search Icon Hover Color', 'betterdocs' ), | |
| 3169 | - 'section' => 'betterdocs_live_search_settings', | |
| 3170 | - 'settings' => 'betterdocs_search_icon_hover_color', | |
| 3171 | - 'priority' => 542 | |
| 3172 | - ] | |
| 3173 | - ) | |
| 3174 | - ); | |
| 3175 | - } | |
| 3176 | - | |
| 3177 | - public function close_icon_color() { | |
| 3178 | - $this->customizer->add_setting( | |
| 3179 | - 'betterdocs_search_close_icon_color', | |
| 3180 | - [ | |
| 3181 | - 'default' => $this->defaults['betterdocs_search_close_icon_color'], | |
| 3182 | - 'capability' => 'edit_theme_options', | |
| 3183 | - 'transport' => 'postMessage', | |
| 3184 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3185 | - ] | |
| 3186 | - ); | |
| 3187 | - | |
| 3188 | - $this->customizer->add_control( | |
| 3189 | - new AlphaColorControl( | |
| 3190 | - $this->customizer, | |
| 3191 | - 'betterdocs_search_close_icon_color', | |
| 3192 | - [ | |
| 3193 | - 'label' => __( 'Close Icon Color', 'betterdocs' ), | |
| 3194 | - 'section' => 'betterdocs_live_search_settings', | |
| 3195 | - 'settings' => 'betterdocs_search_close_icon_color', | |
| 3196 | - 'priority' => 543 | |
| 3197 | - ] | |
| 3198 | - ) | |
| 3199 | - ); | |
| 3200 | - } | |
| 3201 | - | |
| 3202 | - public function close_icon_border_color() { | |
| 3203 | - $this->customizer->add_setting( | |
| 3204 | - 'betterdocs_search_close_icon_border_color', | |
| 3205 | - [ | |
| 3206 | - 'default' => $this->defaults['betterdocs_search_close_icon_border_color'], | |
| 3207 | - 'capability' => 'edit_theme_options', | |
| 3208 | - 'transport' => 'postMessage', | |
| 3209 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3210 | - ] | |
| 3211 | - ); | |
| 3212 | - | |
| 3213 | - $this->customizer->add_control( | |
| 3214 | - new AlphaColorControl( | |
| 3215 | - $this->customizer, | |
| 3216 | - 'betterdocs_search_close_icon_border_color', | |
| 3217 | - [ | |
| 3218 | - 'label' => __( 'Close Icon Border Color', 'betterdocs' ), | |
| 3219 | - 'section' => 'betterdocs_live_search_settings', | |
| 3220 | - 'settings' => 'betterdocs_search_close_icon_border_color', | |
| 3221 | - 'priority' => 544 | |
| 3222 | - ] | |
| 3223 | - ) | |
| 3224 | - ); | |
| 3225 | - } | |
| 3226 | - | |
| 3227 | - public function result_settings() { | |
| 3228 | - $this->customizer->add_setting( | |
| 3229 | - 'betterdocs_search_result_settings', | |
| 3230 | - [ | |
| 3231 | - 'default' => $this->defaults['betterdocs_search_result_settings'], | |
| 3232 | - 'capability' => 'edit_theme_options', | |
| 3233 | - 'sanitize_callback' => 'esc_html' | |
| 3234 | - ] | |
| 3235 | - ); | |
| 3236 | - | |
| 3237 | - $this->customizer->add_control( | |
| 3238 | - new SeparatorControl( | |
| 3239 | - $this->customizer, | |
| 3240 | - 'betterdocs_search_result_settings', | |
| 3241 | - [ | |
| 3242 | - 'label' => __( 'Search Result Settings', 'betterdocs' ), | |
| 3243 | - 'settings' => 'betterdocs_search_result_settings', | |
| 3244 | - 'section' => 'betterdocs_live_search_settings', | |
| 3245 | - 'priority' => 545 | |
| 3246 | - ] | |
| 3247 | - ) | |
| 3248 | - ); | |
| 3249 | - } | |
| 3250 | - | |
| 3251 | - public function result_width() { | |
| 3252 | - $this->customizer->add_setting( | |
| 3253 | - 'betterdocs_search_result_width', | |
| 3254 | - [ | |
| 3255 | - 'default' => $this->defaults['betterdocs_search_result_width'], | |
| 3256 | - 'capability' => 'edit_theme_options', | |
| 3257 | - 'transport' => 'postMessage', | |
| 3258 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3259 | - | |
| 3260 | - ] | |
| 3261 | - ); | |
| 3262 | - | |
| 3263 | - $this->customizer->add_control( | |
| 3264 | - new RangeValueControl( | |
| 3265 | - $this->customizer, | |
| 3266 | - 'betterdocs_search_result_width', | |
| 3267 | - [ | |
| 3268 | - 'type' => 'betterdocs-range-value', | |
| 3269 | - 'section' => 'betterdocs_live_search_settings', | |
| 3270 | - 'settings' => 'betterdocs_search_result_width', | |
| 3271 | - 'label' => __( 'Search Result Box Width', 'betterdocs' ), | |
| 3272 | - 'input_attrs' => [ | |
| 3273 | - 'min' => 0, | |
| 3274 | - 'max' => 100, | |
| 3275 | - 'step' => 1, | |
| 3276 | - 'suffix' => '%' //optional suffix | |
| 3277 | - ], | |
| 3278 | - 'priority' => 546 | |
| 3279 | - ] | |
| 3280 | - ) | |
| 3281 | - ); | |
| 3282 | - } | |
| 3283 | - | |
| 3284 | - public function result_max_width() { | |
| 3285 | - $this->customizer->add_setting( | |
| 3286 | - 'betterdocs_search_result_max_width', | |
| 3287 | - [ | |
| 3288 | - 'default' => $this->defaults['betterdocs_search_result_max_width'], | |
| 3289 | - 'capability' => 'edit_theme_options', | |
| 3290 | - 'transport' => 'postMessage', | |
| 3291 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3292 | - | |
| 3293 | - ] | |
| 3294 | - ); | |
| 3295 | - | |
| 3296 | - $this->customizer->add_control( | |
| 3297 | - new RangeValueControl( | |
| 3298 | - $this->customizer, | |
| 3299 | - 'betterdocs_search_result_max_width', | |
| 3300 | - [ | |
| 3301 | - 'type' => 'betterdocs-range-value', | |
| 3302 | - 'section' => 'betterdocs_live_search_settings', | |
| 3303 | - 'settings' => 'betterdocs_search_result_max_width', | |
| 3304 | - 'label' => __( 'Search Result Box Maximum Width', 'betterdocs' ), | |
| 3305 | - 'input_attrs' => [ | |
| 3306 | - 'min' => 0, | |
| 3307 | - 'max' => 1000, | |
| 3308 | - 'step' => 1, | |
| 3309 | - 'suffix' => 'px' //optional suffix | |
| 3310 | - ], | |
| 3311 | - 'priority' => 547 | |
| 3312 | - ] | |
| 3313 | - ) | |
| 3314 | - ); | |
| 3315 | - } | |
| 3316 | - | |
| 3317 | - public function result_background_color() { | |
| 3318 | - $this->customizer->add_setting( | |
| 3319 | - 'betterdocs_search_result_background_color', | |
| 3320 | - [ | |
| 3321 | - 'default' => $this->defaults['betterdocs_search_result_background_color'], | |
| 3322 | - 'capability' => 'edit_theme_options', | |
| 3323 | - 'transport' => 'postMessage', | |
| 3324 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3325 | - ] | |
| 3326 | - ); | |
| 3327 | - | |
| 3328 | - $this->customizer->add_control( | |
| 3329 | - new AlphaColorControl( | |
| 3330 | - $this->customizer, | |
| 3331 | - 'betterdocs_search_result_background_color', | |
| 3332 | - [ | |
| 3333 | - 'label' => __( 'Search Result Box Background Color', 'betterdocs' ), | |
| 3334 | - 'section' => 'betterdocs_live_search_settings', | |
| 3335 | - 'settings' => 'betterdocs_search_result_background_color', | |
| 3336 | - 'priority' => 548 | |
| 3337 | - ] | |
| 3338 | - ) | |
| 3339 | - ); | |
| 3340 | - } | |
| 3341 | - | |
| 3342 | - public function result_border_color() { | |
| 3343 | - $this->customizer->add_setting( | |
| 3344 | - 'betterdocs_search_result_border_color', | |
| 3345 | - [ | |
| 3346 | - 'default' => $this->defaults['betterdocs_search_result_border_color'], | |
| 3347 | - 'capability' => 'edit_theme_options', | |
| 3348 | - 'transport' => 'postMessage', | |
| 3349 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3350 | - ] | |
| 3351 | - ); | |
| 3352 | - | |
| 3353 | - $this->customizer->add_control( | |
| 3354 | - new AlphaColorControl( | |
| 3355 | - $this->customizer, | |
| 3356 | - 'betterdocs_search_result_border_color', | |
| 3357 | - [ | |
| 3358 | - 'label' => __( 'Search Result Box Border Color', 'betterdocs' ), | |
| 3359 | - 'section' => 'betterdocs_live_search_settings', | |
| 3360 | - 'settings' => 'betterdocs_search_result_border_color', | |
| 3361 | - 'priority' => 549 | |
| 3362 | - ] | |
| 3363 | - ) | |
| 3364 | - ); | |
| 3365 | - } | |
| 3366 | - | |
| 3367 | - public function result_item_font_size() { | |
| 3368 | - $this->customizer->add_setting( | |
| 3369 | - 'betterdocs_search_result_item_font_size', | |
| 3370 | - [ | |
| 3371 | - 'default' => $this->defaults['betterdocs_search_result_item_font_size'], | |
| 3372 | - 'capability' => 'edit_theme_options', | |
| 3373 | - 'transport' => 'postMessage', | |
| 3374 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3375 | - | |
| 3376 | - ] | |
| 3377 | - ); | |
| 3378 | - | |
| 3379 | - $this->customizer->add_control( | |
| 3380 | - new RangeValueControl( | |
| 3381 | - $this->customizer, | |
| 3382 | - 'betterdocs_search_result_item_font_size', | |
| 3383 | - [ | |
| 3384 | - 'type' => 'betterdocs-range-value', | |
| 3385 | - 'section' => 'betterdocs_live_search_settings', | |
| 3386 | - 'settings' => 'betterdocs_search_result_item_font_size', | |
| 3387 | - 'label' => __( 'Search Result Item Font Size', 'betterdocs' ), | |
| 3388 | - 'input_attrs' => [ | |
| 3389 | - 'class' => '', | |
| 3390 | - 'min' => 0, | |
| 3391 | - 'max' => 50, | |
| 3392 | - 'step' => 1, | |
| 3393 | - 'suffix' => 'px' //optional suffix | |
| 3394 | - ], | |
| 3395 | - 'priority' => 550 | |
| 3396 | - ] | |
| 3397 | - ) | |
| 3398 | - ); | |
| 3399 | - } | |
| 3400 | - | |
| 3401 | - public function result_item_font_color() { | |
| 3402 | - $this->customizer->add_setting( | |
| 3403 | - 'betterdocs_search_result_item_font_color', | |
| 3404 | - [ | |
| 3405 | - 'default' => $this->defaults['betterdocs_search_result_item_font_color'], | |
| 3406 | - 'capability' => 'edit_theme_options', | |
| 3407 | - 'transport' => 'postMessage', | |
| 3408 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3409 | - ] | |
| 3410 | - ); | |
| 3411 | - | |
| 3412 | - $this->customizer->add_control( | |
| 3413 | - new AlphaColorControl( | |
| 3414 | - $this->customizer, | |
| 3415 | - 'betterdocs_search_result_item_font_color', | |
| 3416 | - [ | |
| 3417 | - 'label' => __( 'Search Result Item Font Color', 'betterdocs' ), | |
| 3418 | - 'section' => 'betterdocs_live_search_settings', | |
| 3419 | - 'settings' => 'betterdocs_search_result_item_font_color', | |
| 3420 | - 'priority' => 551 | |
| 3421 | - ] | |
| 3422 | - ) | |
| 3423 | - ); | |
| 3424 | - } | |
| 3425 | - | |
| 3426 | - public function result_item_cat_font_color() { | |
| 3427 | - $this->customizer->add_setting( | |
| 3428 | - 'betterdocs_search_result_item_cat_font_color', | |
| 3429 | - [ | |
| 3430 | - 'default' => $this->defaults['betterdocs_search_result_item_cat_font_color'], | |
| 3431 | - 'capability' => 'edit_theme_options', | |
| 3432 | - 'transport' => 'postMessage', | |
| 3433 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3434 | - ] | |
| 3435 | - ); | |
| 3436 | - | |
| 3437 | - $this->customizer->add_control( | |
| 3438 | - new AlphaColorControl( | |
| 3439 | - $this->customizer, | |
| 3440 | - 'betterdocs_search_result_item_cat_font_color', | |
| 3441 | - [ | |
| 3442 | - 'label' => __( 'Search Result Item Category Font Color', 'betterdocs' ), | |
| 3443 | - 'section' => 'betterdocs_live_search_settings', | |
| 3444 | - 'settings' => 'betterdocs_search_result_item_cat_font_color', | |
| 3445 | - 'priority' => 552 | |
| 3446 | - ] | |
| 3447 | - ) | |
| 3448 | - ); | |
| 3449 | - } | |
| 3450 | - | |
| 3451 | - public function result_item_padding() { | |
| 3452 | - $this->customizer->add_setting( | |
| 3453 | - 'betterdocs_search_result_item_padding', | |
| 3454 | - [ | |
| 3455 | - 'default' => $this->defaults['betterdocs_search_result_item_padding'], | |
| 3456 | - 'capability' => 'edit_theme_options', | |
| 3457 | - 'transport' => 'postMessage', | |
| 3458 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3459 | - | |
| 3460 | - ] | |
| 3461 | - ); | |
| 3462 | - | |
| 3463 | - $this->customizer->add_control( | |
| 3464 | - new TitleControl( | |
| 3465 | - $this->customizer, | |
| 3466 | - 'betterdocs_search_result_item_padding', | |
| 3467 | - [ | |
| 3468 | - 'type' => 'betterdocs-title', | |
| 3469 | - 'section' => 'betterdocs_live_search_settings', | |
| 3470 | - 'settings' => 'betterdocs_search_result_item_padding', | |
| 3471 | - 'label' => __( 'Search Result Item Padding', 'betterdocs' ), | |
| 3472 | - 'input_attrs' => [ | |
| 3473 | - 'id' => 'betterdocs_search_result_item_padding', | |
| 3474 | - 'class' => 'betterdocs-dimension' | |
| 3475 | - ], | |
| 3476 | - 'priority' => 553 | |
| 3477 | - ] | |
| 3478 | - ) | |
| 3479 | - ); | |
| 3480 | - | |
| 3481 | - $this->customizer->add_setting( | |
| 3482 | - 'betterdocs_search_result_item_padding_top', | |
| 3483 | - [ | |
| 3484 | - 'default' => $this->defaults['betterdocs_search_result_item_padding_top'], | |
| 3485 | - 'capability' => 'edit_theme_options', | |
| 3486 | - 'transport' => 'postMessage', | |
| 3487 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3488 | - ] | |
| 3489 | - ); | |
| 3490 | - | |
| 3491 | - $this->customizer->add_control( | |
| 3492 | - new DimensionControl( | |
| 3493 | - $this->customizer, | |
| 3494 | - 'betterdocs_search_result_item_padding_top', | |
| 3495 | - [ | |
| 3496 | - 'type' => 'betterdocs-dimension', | |
| 3497 | - 'section' => 'betterdocs_live_search_settings', | |
| 3498 | - 'settings' => 'betterdocs_search_result_item_padding_top', | |
| 3499 | - 'label' => __( 'Top', 'betterdocs' ), | |
| 3500 | - 'input_attrs' => [ | |
| 3501 | - 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 3502 | - ], | |
| 3503 | - 'priority' => 553 | |
| 3504 | - ] | |
| 3505 | - ) | |
| 3506 | - ); | |
| 3507 | - | |
| 3508 | - $this->customizer->add_setting( | |
| 3509 | - 'betterdocs_search_result_item_padding_right', | |
| 3510 | - [ | |
| 3511 | - 'default' => $this->defaults['betterdocs_search_result_item_padding_right'], | |
| 3512 | - 'capability' => 'edit_theme_options', | |
| 3513 | - 'transport' => 'postMessage', | |
| 3514 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3515 | - | |
| 3516 | - ] | |
| 3517 | - ); | |
| 3518 | - | |
| 3519 | - $this->customizer->add_control( | |
| 3520 | - new DimensionControl( | |
| 3521 | - $this->customizer, | |
| 3522 | - 'betterdocs_search_result_item_padding_right', | |
| 3523 | - [ | |
| 3524 | - 'type' => 'betterdocs-dimension', | |
| 3525 | - 'section' => 'betterdocs_live_search_settings', | |
| 3526 | - 'settings' => 'betterdocs_search_result_item_padding_right', | |
| 3527 | - 'label' => __( 'Right', 'betterdocs' ), | |
| 3528 | - 'input_attrs' => [ | |
| 3529 | - 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 3530 | - ], | |
| 3531 | - 'priority' => 553 | |
| 3532 | - ] | |
| 3533 | - ) | |
| 3534 | - ); | |
| 3535 | - | |
| 3536 | - $this->customizer->add_setting( | |
| 3537 | - 'betterdocs_search_result_item_padding_bottom', | |
| 3538 | - [ | |
| 3539 | - 'default' => $this->defaults['betterdocs_search_result_item_padding_bottom'], | |
| 3540 | - 'capability' => 'edit_theme_options', | |
| 3541 | - 'transport' => 'postMessage', | |
| 3542 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3543 | - | |
| 3544 | - ] | |
| 3545 | - ); | |
| 3546 | - | |
| 3547 | - $this->customizer->add_control( | |
| 3548 | - new DimensionControl( | |
| 3549 | - $this->customizer, | |
| 3550 | - 'betterdocs_search_result_item_padding_bottom', | |
| 3551 | - [ | |
| 3552 | - 'type' => 'betterdocs-dimension', | |
| 3553 | - 'section' => 'betterdocs_live_search_settings', | |
| 3554 | - 'settings' => 'betterdocs_search_result_item_padding_bottom', | |
| 3555 | - 'label' => __( 'Bottom', 'betterdocs' ), | |
| 3556 | - 'input_attrs' => [ | |
| 3557 | - 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 3558 | - ], | |
| 3559 | - 'priority' => 553 | |
| 3560 | - ] | |
| 3561 | - ) | |
| 3562 | - ); | |
| 3563 | - | |
| 3564 | - $this->customizer->add_setting( | |
| 3565 | - 'betterdocs_search_result_item_padding_left', | |
| 3566 | - [ | |
| 3567 | - 'default' => $this->defaults['betterdocs_search_result_item_padding_left'], | |
| 3568 | - 'capability' => 'edit_theme_options', | |
| 3569 | - 'transport' => 'postMessage', | |
| 3570 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3571 | - | |
| 3572 | - ] | |
| 3573 | - ); | |
| 3574 | - | |
| 3575 | - $this->customizer->add_control( | |
| 3576 | - new DimensionControl( | |
| 3577 | - $this->customizer, | |
| 3578 | - 'betterdocs_search_result_item_padding_left', | |
| 3579 | - [ | |
| 3580 | - 'type' => 'betterdocs-dimension', | |
| 3581 | - 'section' => 'betterdocs_live_search_settings', | |
| 3582 | - 'settings' => 'betterdocs_search_result_item_padding_left', | |
| 3583 | - 'label' => __( 'Left', 'betterdocs' ), | |
| 3584 | - 'input_attrs' => [ | |
| 3585 | - 'class' => 'betterdocs_search_result_item_padding betterdocs-dimension' | |
| 3586 | - ], | |
| 3587 | - 'priority' => 553 | |
| 3588 | - ] | |
| 3589 | - ) | |
| 3590 | - ); | |
| 3591 | - } | |
| 3592 | - | |
| 3593 | - public function result_item_border_color() { | |
| 3594 | - $this->customizer->add_setting( | |
| 3595 | - 'betterdocs_search_result_item_border_color', | |
| 3596 | - [ | |
| 3597 | - 'default' => $this->defaults['betterdocs_search_result_item_border_color'], | |
| 3598 | - 'capability' => 'edit_theme_options', | |
| 3599 | - 'transport' => 'postMessage', | |
| 3600 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3601 | - ] | |
| 3602 | - ); | |
| 3603 | - | |
| 3604 | - $this->customizer->add_control( | |
| 3605 | - new AlphaColorControl( | |
| 3606 | - $this->customizer, | |
| 3607 | - 'betterdocs_search_result_item_border_color', | |
| 3608 | - [ | |
| 3609 | - 'label' => __( 'Search Result Item Border Color', 'betterdocs' ), | |
| 3610 | - 'section' => 'betterdocs_live_search_settings', | |
| 3611 | - 'settings' => 'betterdocs_search_result_item_border_color', | |
| 3612 | - 'priority' => 558 | |
| 3613 | - ] | |
| 3614 | - ) | |
| 3615 | - ); | |
| 3616 | - } | |
| 3617 | - | |
| 3618 | - public function result_item_hover_font_color() { | |
| 3619 | - $this->customizer->add_setting( | |
| 3620 | - 'betterdocs_search_result_item_hover_font_color', | |
| 3621 | - [ | |
| 3622 | - 'default' => $this->defaults['betterdocs_search_result_item_hover_font_color'], | |
| 3623 | - 'capability' => 'edit_theme_options', | |
| 3624 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3625 | - ] | |
| 3626 | - ); | |
| 3627 | - | |
| 3628 | - $this->customizer->add_control( | |
| 3629 | - new AlphaColorControl( | |
| 3630 | - $this->customizer, | |
| 3631 | - 'betterdocs_search_result_item_hover_font_color', | |
| 3632 | - [ | |
| 3633 | - 'label' => __( 'Search Result Item Font Hover Color', 'betterdocs' ), | |
| 3634 | - 'section' => 'betterdocs_live_search_settings', | |
| 3635 | - 'settings' => 'betterdocs_search_result_item_hover_font_color', | |
| 3636 | - 'priority' => 559 | |
| 3637 | - ] | |
| 3638 | - ) | |
| 3639 | - ); | |
| 3640 | - } | |
| 3641 | - | |
| 3642 | - public function result_item_hover_background_color() { | |
| 3643 | - $this->customizer->add_setting( | |
| 3644 | - 'betterdocs_search_result_item_hover_background_color', | |
| 3645 | - [ | |
| 3646 | - 'default' => $this->defaults['betterdocs_search_result_item_hover_background_color'], | |
| 3647 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3648 | - ] | |
| 3649 | - ); | |
| 3650 | - | |
| 3651 | - $this->customizer->add_control( | |
| 3652 | - new AlphaColorControl( | |
| 3653 | - $this->customizer, | |
| 3654 | - 'betterdocs_search_result_item_hover_background_color', | |
| 3655 | - [ | |
| 3656 | - 'label' => __( 'Item Background Hover Color', 'betterdocs' ), | |
| 3657 | - 'section' => 'betterdocs_live_search_settings', | |
| 3658 | - 'settings' => 'betterdocs_search_result_item_hover_background_color', | |
| 3659 | - 'priority' => 560 | |
| 3660 | - ] | |
| 3661 | - ) | |
| 3662 | - ); | |
| 3663 | - } | |
| 3664 | - | |
| 3665 | - public function modal_wrapper_section() { | |
| 3666 | - $this->customizer->add_setting( | |
| 3667 | - 'modal_wrapper_section', | |
| 3668 | - [ | |
| 3669 | - 'default' => $this->defaults['modal_wrapper_section'], | |
| 3670 | - 'sanitize_callback' => 'esc_html' | |
| 3671 | - ] | |
| 3672 | - ); | |
| 3673 | - | |
| 3674 | - $this->customizer->add_control( | |
| 3675 | - new SeparatorControl( | |
| 3676 | - $this->customizer, | |
| 3677 | - 'modal_wrapper_section', | |
| 3678 | - [ | |
| 3679 | - 'label' => __( 'Modal Wrapper', 'betterdocs' ), | |
| 3680 | - 'priority' => 617, | |
| 3681 | - 'settings' => 'modal_wrapper_section', | |
| 3682 | - 'section' => 'betterdocs_live_search_settings' | |
| 3683 | - ] | |
| 3684 | - ) | |
| 3685 | - ); | |
| 3686 | - } | |
| 3687 | - | |
| 3688 | - public function modal_wrapper_background_color() { | |
| 3689 | - $this->customizer->add_setting( | |
| 3690 | - 'modal_wrapper_background_color', | |
| 3691 | - [ | |
| 3692 | - 'default' => $this->defaults['modal_wrapper_background_color'], | |
| 3693 | - 'capability' => 'edit_theme_options', | |
| 3694 | - 'transport' => 'postMessage', | |
| 3695 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3696 | - ] | |
| 3697 | - ); | |
| 3698 | - | |
| 3699 | - $this->customizer->add_control( | |
| 3700 | - new AlphaColorControl( | |
| 3701 | - $this->customizer, | |
| 3702 | - 'modal_wrapper_background_color', | |
| 3703 | - [ | |
| 3704 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 3705 | - 'priority' => 618, | |
| 3706 | - 'section' => 'betterdocs_live_search_settings', | |
| 3707 | - 'settings' => 'modal_wrapper_background_color', | |
| 3708 | - ] | |
| 3709 | - ) | |
| 3710 | - ); | |
| 3711 | - } | |
| 3712 | - | |
| 3713 | - public function modal_wrapper_padding() { | |
| 3714 | - $this->customizer->add_setting( | |
| 3715 | - 'modal_wrapper_padding', | |
| 3716 | - [ | |
| 3717 | - 'default' => $this->defaults['modal_wrapper_padding'], | |
| 3718 | - 'transport' => 'postMessage', | |
| 3719 | - 'capability' => 'edit_theme_options' | |
| 3720 | - ] | |
| 3721 | - ); | |
| 3722 | - | |
| 3723 | - $this->customizer->add_control( | |
| 3724 | - new MultiDimensionControl( | |
| 3725 | - $this->customizer, | |
| 3726 | - 'modal_wrapper_padding', | |
| 3727 | - [ | |
| 3728 | - 'label' => __( 'Padding (PX)', 'betterdocs' ), | |
| 3729 | - 'section' => 'betterdocs_live_search_settings', | |
| 3730 | - 'settings' => 'modal_wrapper_padding', | |
| 3731 | - 'priority' => 619, | |
| 3732 | - 'input_fields' => [ | |
| 3733 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 3734 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 3735 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 3736 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 3737 | - ], | |
| 3738 | - 'defaults' => [ | |
| 3739 | - 'input1' => 0, | |
| 3740 | - 'input2' => 0, | |
| 3741 | - 'input3' => 0, | |
| 3742 | - 'input4' => 0 | |
| 3743 | - ] | |
| 3744 | - ] | |
| 3745 | - ) | |
| 3746 | - ); | |
| 3747 | - } | |
| 3748 | - | |
| 3749 | - public function modal_wrapper_margin() { | |
| 3750 | - $this->customizer->add_setting( | |
| 3751 | - 'modal_wrapper_margin', | |
| 3752 | - [ | |
| 3753 | - 'default' => $this->defaults['modal_wrapper_margin'], | |
| 3754 | - 'transport' => 'postMessage', | |
| 3755 | - 'capability' => 'edit_theme_options' | |
| 3756 | - ] | |
| 3757 | - ); | |
| 3758 | - | |
| 3759 | - $this->customizer->add_control( | |
| 3760 | - new MultiDimensionControl( | |
| 3761 | - $this->customizer, | |
| 3762 | - 'modal_wrapper_margin', | |
| 3763 | - [ | |
| 3764 | - 'label' => __( 'Margin (PX)', 'betterdocs' ), | |
| 3765 | - 'section' => 'betterdocs_live_search_settings', | |
| 3766 | - 'settings' => 'modal_wrapper_margin', | |
| 3767 | - 'priority' => 620, | |
| 3768 | - 'input_fields' => [ | |
| 3769 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 3770 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 3771 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 3772 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 3773 | - ], | |
| 3774 | - 'defaults' => [ | |
| 3775 | - 'input1' => 0, | |
| 3776 | - 'input2' => 0, | |
| 3777 | - 'input3' => 0, | |
| 3778 | - 'input4' => 0 | |
| 3779 | - ] | |
| 3780 | - ] | |
| 3781 | - ) | |
| 3782 | - ); | |
| 3783 | - } | |
| 3784 | - | |
| 3785 | - public function search_field_wrapper() { | |
| 3786 | - $this->customizer->add_setting( | |
| 3787 | - 'search_field_wrapper', | |
| 3788 | - [ | |
| 3789 | - 'default' => $this->defaults['search_field_wrapper'], | |
| 3790 | - 'sanitize_callback' => 'esc_html' | |
| 3791 | - ] | |
| 3792 | - ); | |
| 3793 | - | |
| 3794 | - $this->customizer->add_control( | |
| 3795 | - new SeparatorControl( | |
| 3796 | - $this->customizer, | |
| 3797 | - 'search_field_wrapper', | |
| 3798 | - [ | |
| 3799 | - 'label' => __( 'Modal Search Field', 'betterdocs' ), | |
| 3800 | - 'priority' => 621, | |
| 3801 | - 'settings' => 'search_field_wrapper', | |
| 3802 | - 'section' => 'betterdocs_live_search_settings' | |
| 3803 | - ] | |
| 3804 | - ) | |
| 3805 | - ); | |
| 3806 | - } | |
| 3807 | - | |
| 3808 | - | |
| 3809 | - public function search_field_modal_background_color() { | |
| 3810 | - $this->customizer->add_setting( | |
| 3811 | - 'search_field_modal_background_color', | |
| 3812 | - [ | |
| 3813 | - 'default' => $this->defaults['search_field_modal_background_color'], | |
| 3814 | - 'capability' => 'edit_theme_options', | |
| 3815 | - 'transport' => 'postMessage', | |
| 3816 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3817 | - ] | |
| 3818 | - ); | |
| 3819 | - | |
| 3820 | - $this->customizer->add_control( | |
| 3821 | - new AlphaColorControl( | |
| 3822 | - $this->customizer, | |
| 3823 | - 'search_field_modal_background_color', | |
| 3824 | - [ | |
| 3825 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 3826 | - 'priority' => 622, | |
| 3827 | - 'section' => 'betterdocs_live_search_settings', | |
| 3828 | - 'settings' => 'search_field_modal_background_color', | |
| 3829 | - ] | |
| 3830 | - ) | |
| 3831 | - ); | |
| 3832 | - } | |
| 3833 | - | |
| 3834 | - public function search_field_modal_padding() { | |
| 3835 | - $this->customizer->add_setting( | |
| 3836 | - 'search_field_modal_padding', | |
| 3837 | - [ | |
| 3838 | - 'default' => $this->defaults['search_field_modal_padding'], | |
| 3839 | - 'transport' => 'postMessage', | |
| 3840 | - 'capability' => 'edit_theme_options' | |
| 3841 | - ] | |
| 3842 | - ); | |
| 3843 | - | |
| 3844 | - $this->customizer->add_control( | |
| 3845 | - new MultiDimensionControl( | |
| 3846 | - $this->customizer, | |
| 3847 | - 'search_field_modal_padding', | |
| 3848 | - [ | |
| 3849 | - 'label' => __( 'Padding (PX)', 'betterdocs' ), | |
| 3850 | - 'section' => 'betterdocs_live_search_settings', | |
| 3851 | - 'settings' => 'search_field_modal_padding', | |
| 3852 | - 'priority' => 623, | |
| 3853 | - 'input_fields' => [ | |
| 3854 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 3855 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 3856 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 3857 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 3858 | - ], | |
| 3859 | - 'defaults' => [ | |
| 3860 | - 'input1' => 5, | |
| 3861 | - 'input2' => 5, | |
| 3862 | - 'input3' => 5, | |
| 3863 | - 'input4' => 5 | |
| 3864 | - ] | |
| 3865 | - ] | |
| 3866 | - ) | |
| 3867 | - ); | |
| 3868 | - } | |
| 3869 | - | |
| 3870 | - public function search_field_modal_margin() { | |
| 3871 | - $this->customizer->add_setting( | |
| 3872 | - 'search_field_modal_margin', | |
| 3873 | - [ | |
| 3874 | - 'default' => $this->defaults['search_field_modal_margin'], | |
| 3875 | - 'transport' => 'postMessage', | |
| 3876 | - 'capability' => 'edit_theme_options' | |
| 3877 | - ] | |
| 3878 | - ); | |
| 3879 | - | |
| 3880 | - $this->customizer->add_control( | |
| 3881 | - new MultiDimensionControl( | |
| 3882 | - $this->customizer, | |
| 3883 | - 'search_field_modal_margin', | |
| 3884 | - [ | |
| 3885 | - 'label' => __( 'Margin (PX)', 'betterdocs' ), | |
| 3886 | - 'section' => 'betterdocs_live_search_settings', | |
| 3887 | - 'settings' => 'search_field_modal_margin', | |
| 3888 | - 'priority' => 624, | |
| 3889 | - 'input_fields' => [ | |
| 3890 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 3891 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 3892 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 3893 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 3894 | - ], | |
| 3895 | - 'defaults' => [ | |
| 3896 | - 'input1' => 0, | |
| 3897 | - 'input2' => 0, | |
| 3898 | - 'input3' => 0, | |
| 3899 | - 'input4' => 0 | |
| 3900 | - ] | |
| 3901 | - ] | |
| 3902 | - ) | |
| 3903 | - ); | |
| 3904 | - } | |
| 3905 | - | |
| 3906 | - | |
| 3907 | - public function search_field_modal_text_color() { | |
| 3908 | - $this->customizer->add_setting( | |
| 3909 | - 'search_field_modal_text_color', | |
| 3910 | - [ | |
| 3911 | - 'default' => $this->defaults['search_field_modal_text_color'], | |
| 3912 | - 'capability' => 'edit_theme_options', | |
| 3913 | - 'transport' => 'postMessage', | |
| 3914 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 3915 | - ] | |
| 3916 | - ); | |
| 3917 | - | |
| 3918 | - $this->customizer->add_control( | |
| 3919 | - new AlphaColorControl( | |
| 3920 | - $this->customizer, | |
| 3921 | - 'search_field_modal_text_color', | |
| 3922 | - [ | |
| 3923 | - 'label' => __( 'Color', 'betterdocs' ), | |
| 3924 | - 'priority' => 625, | |
| 3925 | - 'section' => 'betterdocs_live_search_settings', | |
| 3926 | - 'settings' => 'search_field_modal_text_color', | |
| 3927 | - ] | |
| 3928 | - ) | |
| 3929 | - ); | |
| 3930 | - } | |
| 3931 | - | |
| 3932 | - public function search_field_modal_text_font_size() { | |
| 3933 | - $this->customizer->add_setting( | |
| 3934 | - 'search_field_modal_text_font_size', | |
| 3935 | - [ | |
| 3936 | - 'default' => $this->defaults['search_field_modal_text_font_size'], | |
| 3937 | - 'capability' => 'edit_theme_options', | |
| 3938 | - 'transport' => 'postMessage', | |
| 3939 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3940 | - ] | |
| 3941 | - ); | |
| 3942 | - | |
| 3943 | - $this->customizer->add_control( | |
| 3944 | - new RangeValueControl( | |
| 3945 | - $this->customizer, | |
| 3946 | - 'search_field_modal_text_font_size', | |
| 3947 | - [ | |
| 3948 | - 'type' => 'betterdocs-range-value', | |
| 3949 | - 'section' => 'betterdocs_live_search_settings', | |
| 3950 | - 'settings' => 'search_field_modal_text_font_size', | |
| 3951 | - 'label' => __( 'Font Size', 'betterdocs' ), | |
| 3952 | - 'priority' => 626, | |
| 3953 | - 'input_attrs' => [ | |
| 3954 | - 'class' => '', | |
| 3955 | - 'min' => 0, | |
| 3956 | - 'max' => 50, | |
| 3957 | - 'step' => 1, | |
| 3958 | - 'suffix' => 'px' // optional suffix | |
| 3959 | - ] | |
| 3960 | - ] | |
| 3961 | - ) | |
| 3962 | - ); | |
| 3963 | - } | |
| 3964 | - | |
| 3965 | - public function search_field_modal_maginifier_icon_size() { | |
| 3966 | - $this->customizer->add_setting( | |
| 3967 | - 'search_field_modal_maginifier_icon_size', | |
| 3968 | - [ | |
| 3969 | - 'default' => $this->defaults['search_field_modal_maginifier_icon_size'], | |
| 3970 | - 'capability' => 'edit_theme_options', | |
| 3971 | - 'transport' => 'postMessage', | |
| 3972 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 3973 | - ] | |
| 3974 | - ); | |
| 3975 | - | |
| 3976 | - $this->customizer->add_control( | |
| 3977 | - new RangeValueControl( | |
| 3978 | - $this->customizer, | |
| 3979 | - 'search_field_modal_maginifier_icon_size', | |
| 3980 | - [ | |
| 3981 | - 'type' => 'betterdocs-range-value', | |
| 3982 | - 'section' => 'betterdocs_live_search_settings', | |
| 3983 | - 'settings' => 'search_field_modal_maginifier_icon_size', | |
| 3984 | - 'label' => __( 'Maginifier Icon Size', 'betterdocs' ), | |
| 3985 | - 'priority' => 627, | |
| 3986 | - 'input_attrs' => [ | |
| 3987 | - 'class' => '', | |
| 3988 | - 'min' => 0, | |
| 3989 | - 'max' => 50, | |
| 3990 | - 'step' => 1, | |
| 3991 | - 'suffix' => 'px' // optional suffix | |
| 3992 | - ] | |
| 3993 | - ] | |
| 3994 | - ) | |
| 3995 | - ); | |
| 3996 | - } | |
| 3997 | - | |
| 3998 | - | |
| 3999 | - public function search_field_categories_wrapper() { | |
| 4000 | - $this->customizer->add_setting( | |
| 4001 | - 'search_field_categories_wrapper', | |
| 4002 | - [ | |
| 4003 | - 'default' => $this->defaults['search_field_categories_wrapper'], | |
| 4004 | - 'sanitize_callback' => 'esc_html' | |
| 4005 | - ] | |
| 4006 | - ); | |
| 4007 | - | |
| 4008 | - $this->customizer->add_control( | |
| 4009 | - new SeparatorControl( | |
| 4010 | - $this->customizer, | |
| 4011 | - 'search_field_categories_wrapper', | |
| 4012 | - [ | |
| 4013 | - 'label' => __( 'Modal Search Categories', 'betterdocs' ), | |
| 4014 | - 'priority' => 628, | |
| 4015 | - 'settings' => 'search_field_categories_wrapper', | |
| 4016 | - 'section' => 'betterdocs_live_search_settings' | |
| 4017 | - ] | |
| 4018 | - ) | |
| 4019 | - ); | |
| 4020 | - } | |
| 4021 | - | |
| 4022 | - public function search_field_categories_text_color() { | |
| 4023 | - $this->customizer->add_setting( | |
| 4024 | - 'search_field_categories_text_color', | |
| 4025 | - [ | |
| 4026 | - 'default' => $this->defaults['search_field_categories_text_color'], | |
| 4027 | - 'capability' => 'edit_theme_options', | |
| 4028 | - 'transport' => 'postMessage', | |
| 4029 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4030 | - ] | |
| 4031 | - ); | |
| 4032 | - | |
| 4033 | - $this->customizer->add_control( | |
| 4034 | - new AlphaColorControl( | |
| 4035 | - $this->customizer, | |
| 4036 | - 'search_field_categories_text_color', | |
| 4037 | - [ | |
| 4038 | - 'label' => __( 'Color', 'betterdocs' ), | |
| 4039 | - 'priority' => 629, | |
| 4040 | - 'section' => 'betterdocs_live_search_settings', | |
| 4041 | - 'settings' => 'search_field_categories_text_color', | |
| 4042 | - ] | |
| 4043 | - ) | |
| 4044 | - ); | |
| 4045 | - } | |
| 4046 | - | |
| 4047 | - public function search_field_categories_background_color() { | |
| 4048 | - $this->customizer->add_setting( | |
| 4049 | - 'search_field_categories_background_color', | |
| 4050 | - [ | |
| 4051 | - 'default' => $this->defaults['search_field_categories_background_color'], | |
| 4052 | - 'capability' => 'edit_theme_options', | |
| 4053 | - 'transport' => 'postMessage', | |
| 4054 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4055 | - ] | |
| 4056 | - ); | |
| 4057 | - | |
| 4058 | - $this->customizer->add_control( | |
| 4059 | - new AlphaColorControl( | |
| 4060 | - $this->customizer, | |
| 4061 | - 'search_field_categories_background_color', | |
| 4062 | - [ | |
| 4063 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 4064 | - 'priority' => 630, | |
| 4065 | - 'section' => 'betterdocs_live_search_settings', | |
| 4066 | - 'settings' => 'search_field_categories_background_color', | |
| 4067 | - ] | |
| 4068 | - ) | |
| 4069 | - ); | |
| 4070 | - } | |
| 4071 | - | |
| 4072 | - | |
| 4073 | - public function search_field_categories_font_size() { | |
| 4074 | - $this->customizer->add_setting( | |
| 4075 | - 'search_field_categories_font_size', | |
| 4076 | - [ | |
| 4077 | - 'default' => $this->defaults['search_field_categories_font_size'], | |
| 4078 | - 'capability' => 'edit_theme_options', | |
| 4079 | - 'transport' => 'postMessage', | |
| 4080 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 4081 | - ] | |
| 4082 | - ); | |
| 4083 | - | |
| 4084 | - $this->customizer->add_control( | |
| 4085 | - new RangeValueControl( | |
| 4086 | - $this->customizer, | |
| 4087 | - 'search_field_categories_font_size', | |
| 4088 | - [ | |
| 4089 | - 'type' => 'betterdocs-range-value', | |
| 4090 | - 'section' => 'betterdocs_live_search_settings', | |
| 4091 | - 'settings' => 'search_field_categories_font_size', | |
| 4092 | - 'label' => __( 'Font Size', 'betterdocs' ), | |
| 4093 | - 'priority' => 631, | |
| 4094 | - 'input_attrs' => [ | |
| 4095 | - 'class' => '', | |
| 4096 | - 'min' => 0, | |
| 4097 | - 'max' => 50, | |
| 4098 | - 'step' => 1, | |
| 4099 | - 'suffix' => 'px' // optional suffix | |
| 4100 | - ] | |
| 4101 | - ] | |
| 4102 | - ) | |
| 4103 | - ); | |
| 4104 | - } | |
| 4105 | - | |
| 4106 | - public function search_modal_content_tabs() { | |
| 4107 | - $this->customizer->add_setting( | |
| 4108 | - 'search_modal_content_tabs', | |
| 4109 | - [ | |
| 4110 | - 'default' => $this->defaults['search_modal_content_tabs'], | |
| 4111 | - 'sanitize_callback' => 'esc_html' | |
| 4112 | - ] | |
| 4113 | - ); | |
| 4114 | - | |
| 4115 | - $this->customizer->add_control( | |
| 4116 | - new SeparatorControl( | |
| 4117 | - $this->customizer, | |
| 4118 | - 'search_modal_content_tabs', | |
| 4119 | - [ | |
| 4120 | - 'label' => __( 'Modal Content Tabs', 'betterdocs' ), | |
| 4121 | - 'priority' => 632, | |
| 4122 | - 'settings' => 'search_modal_content_tabs', | |
| 4123 | - 'section' => 'betterdocs_live_search_settings' | |
| 4124 | - ] | |
| 4125 | - ) | |
| 4126 | - ); | |
| 4127 | - } | |
| 4128 | - | |
| 4129 | - | |
| 4130 | - public function search_modal_content_tabs_text_color() { | |
| 4131 | - $this->customizer->add_setting( | |
| 4132 | - 'search_modal_content_tabs_text_color', | |
| 4133 | - [ | |
| 4134 | - 'default' => $this->defaults['search_modal_content_tabs_text_color'], | |
| 4135 | - 'capability' => 'edit_theme_options', | |
| 4136 | - 'transport' => 'postMessage', | |
| 4137 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4138 | - ] | |
| 4139 | - ); | |
| 4140 | - | |
| 4141 | - $this->customizer->add_control( | |
| 4142 | - new AlphaColorControl( | |
| 4143 | - $this->customizer, | |
| 4144 | - 'search_modal_content_tabs_text_color', | |
| 4145 | - [ | |
| 4146 | - 'label' => __( 'Color', 'betterdocs' ), | |
| 4147 | - 'priority' => 633, | |
| 4148 | - 'section' => 'betterdocs_live_search_settings', | |
| 4149 | - 'settings' => 'search_modal_content_tabs_text_color', | |
| 4150 | - ] | |
| 4151 | - ) | |
| 4152 | - ); | |
| 4153 | - } | |
| 4154 | - | |
| 4155 | - public function search_modal_content_tabs_background_color() { | |
| 4156 | - $this->customizer->add_setting( | |
| 4157 | - 'search_modal_content_tabs_background_color', | |
| 4158 | - [ | |
| 4159 | - 'default' => $this->defaults['search_modal_content_tabs_background_color'], | |
| 4160 | - 'capability' => 'edit_theme_options', | |
| 4161 | - 'transport' => 'postMessage', | |
| 4162 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4163 | - ] | |
| 4164 | - ); | |
| 4165 | - | |
| 4166 | - $this->customizer->add_control( | |
| 4167 | - new AlphaColorControl( | |
| 4168 | - $this->customizer, | |
| 4169 | - 'search_modal_content_tabs_background_color', | |
| 4170 | - [ | |
| 4171 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 4172 | - 'priority' => 634, | |
| 4173 | - 'section' => 'betterdocs_live_search_settings', | |
| 4174 | - 'settings' => 'search_modal_content_tabs_background_color', | |
| 4175 | - ] | |
| 4176 | - ) | |
| 4177 | - ); | |
| 4178 | - } | |
| 4179 | - | |
| 4180 | - public function search_modal_content_tabs_text_font_size() { | |
| 4181 | - $this->customizer->add_setting( | |
| 4182 | - 'search_modal_content_tabs_text_font_size', | |
| 4183 | - [ | |
| 4184 | - 'default' => $this->defaults['search_modal_content_tabs_text_font_size'], | |
| 4185 | - 'capability' => 'edit_theme_options', | |
| 4186 | - 'transport' => 'postMessage', | |
| 4187 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 4188 | - ] | |
| 4189 | - ); | |
| 4190 | - | |
| 4191 | - $this->customizer->add_control( | |
| 4192 | - new RangeValueControl( | |
| 4193 | - $this->customizer, | |
| 4194 | - 'search_modal_content_tabs_text_font_size', | |
| 4195 | - [ | |
| 4196 | - 'type' => 'betterdocs-range-value', | |
| 4197 | - 'section' => 'betterdocs_live_search_settings', | |
| 4198 | - 'settings' => 'search_modal_content_tabs_text_font_size', | |
| 4199 | - 'label' => __( 'Font Size', 'betterdocs' ), | |
| 4200 | - 'priority' => 635, | |
| 4201 | - 'input_attrs' => [ | |
| 4202 | - 'class' => '', | |
| 4203 | - 'min' => 0, | |
| 4204 | - 'max' => 50, | |
| 4205 | - 'step' => 1, | |
| 4206 | - 'suffix' => 'px' // optional suffix | |
| 4207 | - ] | |
| 4208 | - ] | |
| 4209 | - ) | |
| 4210 | - ); | |
| 4211 | - } | |
| 4212 | - | |
| 4213 | - public function search_modal_content_tabs_margin() { | |
| 4214 | - $this->customizer->add_setting( | |
| 4215 | - 'search_modal_content_tabs_margin', | |
| 4216 | - [ | |
| 4217 | - 'default' => $this->defaults['search_modal_content_tabs_margin'], | |
| 4218 | - 'transport' => 'postMessage', | |
| 4219 | - 'capability' => 'edit_theme_options' | |
| 4220 | - ] | |
| 4221 | - ); | |
| 4222 | - | |
| 4223 | - $this->customizer->add_control( | |
| 4224 | - new MultiDimensionControl( | |
| 4225 | - $this->customizer, | |
| 4226 | - 'search_modal_content_tabs_margin', | |
| 4227 | - [ | |
| 4228 | - 'label' => __( 'Margin (PX)', 'betterdocs' ), | |
| 4229 | - 'section' => 'betterdocs_live_search_settings', | |
| 4230 | - 'settings' => 'search_modal_content_tabs_margin', | |
| 4231 | - 'priority' => 636, | |
| 4232 | - 'input_fields' => [ | |
| 4233 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 4234 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 4235 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 4236 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 4237 | - ], | |
| 4238 | - 'defaults' => [ | |
| 4239 | - 'input1' => 0, | |
| 4240 | - 'input2' => 0, | |
| 4241 | - 'input3' => 0, | |
| 4242 | - 'input4' => 0 | |
| 4243 | - ] | |
| 4244 | - ] | |
| 4245 | - ) | |
| 4246 | - ); | |
| 4247 | - } | |
| 4248 | - | |
| 4249 | - public function search_modal_content_tabs_padding() { | |
| 4250 | - $this->customizer->add_setting( | |
| 4251 | - 'search_modal_content_tabs_padding', | |
| 4252 | - [ | |
| 4253 | - 'default' => $this->defaults['search_modal_content_tabs_padding'], | |
| 4254 | - 'transport' => 'postMessage', | |
| 4255 | - 'capability' => 'edit_theme_options' | |
| 4256 | - ] | |
| 4257 | - ); | |
| 4258 | - | |
| 4259 | - $this->customizer->add_control( | |
| 4260 | - new MultiDimensionControl( | |
| 4261 | - $this->customizer, | |
| 4262 | - 'search_modal_content_tabs_padding', | |
| 4263 | - [ | |
| 4264 | - 'label' => __( 'Padding (PX)', 'betterdocs' ), | |
| 4265 | - 'section' => 'betterdocs_live_search_settings', | |
| 4266 | - 'settings' => 'search_modal_content_tabs_padding', | |
| 4267 | - 'priority' => 637, | |
| 4268 | - 'input_fields' => [ | |
| 4269 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 4270 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 4271 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 4272 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 4273 | - ], | |
| 4274 | - 'defaults' => [ | |
| 4275 | - 'input1' => 0, | |
| 4276 | - 'input2' => 28, | |
| 4277 | - 'input3' => 0, | |
| 4278 | - 'input4' => 28 | |
| 4279 | - ] | |
| 4280 | - ] | |
| 4281 | - ) | |
| 4282 | - ); | |
| 4283 | - } | |
| 4284 | - | |
| 4285 | - public function search_modal_content_tabs_border() { | |
| 4286 | - $this->customizer->add_setting( | |
| 4287 | - 'search_modal_content_tabs_border', | |
| 4288 | - [ | |
| 4289 | - 'default' => $this->defaults['search_modal_content_tabs_border'], | |
| 4290 | - 'transport' => 'postMessage', | |
| 4291 | - 'capability' => 'edit_theme_options' | |
| 4292 | - ] | |
| 4293 | - ); | |
| 4294 | - | |
| 4295 | - $this->customizer->add_control( | |
| 4296 | - new MultiDimensionControl( | |
| 4297 | - $this->customizer, | |
| 4298 | - 'search_modal_content_tabs_border', | |
| 4299 | - [ | |
| 4300 | - 'label' => __( 'Border', 'betterdocs' ), | |
| 4301 | - 'section' => 'betterdocs_live_search_settings', | |
| 4302 | - 'settings' => 'search_modal_content_tabs_border', | |
| 4303 | - 'priority' => 638, | |
| 4304 | - 'input_fields' => [ | |
| 4305 | - 'input1' => __( 'border top', 'betterdocs' ), | |
| 4306 | - 'input2' => __( 'border right', 'betterdocs' ), | |
| 4307 | - 'input3' => __( 'border bottom', 'betterdocs' ), | |
| 4308 | - 'input4' => __( 'border left', 'betterdocs' ) | |
| 4309 | - ], | |
| 4310 | - 'defaults' => [ | |
| 4311 | - 'input1' => 0, | |
| 4312 | - 'input2' => 0, | |
| 4313 | - 'input3' => 1, | |
| 4314 | - 'input4' => 0 | |
| 4315 | - ] | |
| 4316 | - ] | |
| 4317 | - ) | |
| 4318 | - ); | |
| 4319 | - } | |
| 4320 | - | |
| 4321 | - public function search_modal_content_tabs_border_color() { | |
| 4322 | - $this->customizer->add_setting( | |
| 4323 | - 'search_modal_content_tabs_border_color', | |
| 4324 | - [ | |
| 4325 | - 'default' => $this->defaults['search_modal_content_tabs_border_color'], | |
| 4326 | - 'capability' => 'edit_theme_options', | |
| 4327 | - 'transport' => 'postMessage', | |
| 4328 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4329 | - ] | |
| 4330 | - ); | |
| 4331 | - | |
| 4332 | - $this->customizer->add_control( | |
| 4333 | - new AlphaColorControl( | |
| 4334 | - $this->customizer, | |
| 4335 | - 'search_modal_content_tabs_border_color', | |
| 4336 | - [ | |
| 4337 | - 'label' => __( 'Border Color', 'betterdocs' ), | |
| 4338 | - 'priority' => 639, | |
| 4339 | - 'section' => 'betterdocs_live_search_settings', | |
| 4340 | - 'settings' => 'search_modal_content_tabs_border_color', | |
| 4341 | - ] | |
| 4342 | - ) | |
| 4343 | - ); | |
| 4344 | - } | |
| 4345 | - | |
| 4346 | - public function search_modal_content_tabs_docs_list() { | |
| 4347 | - $this->customizer->add_setting( | |
| 4348 | - 'search_modal_content_tabs_docs_list', | |
| 4349 | - [ | |
| 4350 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list'], | |
| 4351 | - 'sanitize_callback' => 'esc_html' | |
| 4352 | - ] | |
| 4353 | - ); | |
| 4354 | - | |
| 4355 | - $this->customizer->add_control( | |
| 4356 | - new SeparatorControl( | |
| 4357 | - $this->customizer, | |
| 4358 | - 'search_modal_content_tabs_docs_list', | |
| 4359 | - [ | |
| 4360 | - 'label' => __( 'Modal Content Docs List', 'betterdocs' ), | |
| 4361 | - 'priority' => 640, | |
| 4362 | - 'settings' => 'search_modal_content_tabs_docs_list', | |
| 4363 | - 'section' => 'betterdocs_live_search_settings' | |
| 4364 | - ] | |
| 4365 | - ) | |
| 4366 | - ); | |
| 4367 | - } | |
| 4368 | - | |
| 4369 | - public function search_modal_content_tabs_docs_list_font_size() { | |
| 4370 | - $this->customizer->add_setting( | |
| 4371 | - 'search_modal_content_tabs_docs_list_font_size', | |
| 4372 | - [ | |
| 4373 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_font_size'], | |
| 4374 | - 'capability' => 'edit_theme_options', | |
| 4375 | - 'transport' => 'postMessage', | |
| 4376 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 4377 | - ] | |
| 4378 | - ); | |
| 4379 | - | |
| 4380 | - $this->customizer->add_control( | |
| 4381 | - new RangeValueControl( | |
| 4382 | - $this->customizer, | |
| 4383 | - 'search_modal_content_tabs_docs_list_font_size', | |
| 4384 | - [ | |
| 4385 | - 'type' => 'betterdocs-range-value', | |
| 4386 | - 'section' => 'betterdocs_live_search_settings', | |
| 4387 | - 'settings' => 'search_modal_content_tabs_docs_list_font_size', | |
| 4388 | - 'label' => __( 'Font Size', 'betterdocs' ), | |
| 4389 | - 'priority' => 641, | |
| 4390 | - 'input_attrs' => [ | |
| 4391 | - 'class' => '', | |
| 4392 | - 'min' => 0, | |
| 4393 | - 'max' => 50, | |
| 4394 | - 'step' => 1, | |
| 4395 | - 'suffix' => 'px' // optional suffix | |
| 4396 | - ] | |
| 4397 | - ] | |
| 4398 | - ) | |
| 4399 | - ); | |
| 4400 | - } | |
| 4401 | - | |
| 4402 | - public function search_modal_content_tabs_docs_list_color() { | |
| 4403 | - $this->customizer->add_setting( | |
| 4404 | - 'search_modal_content_tabs_docs_list_color', | |
| 4405 | - [ | |
| 4406 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_color'], | |
| 4407 | - 'capability' => 'edit_theme_options', | |
| 4408 | - 'transport' => 'postMessage', | |
| 4409 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4410 | - ] | |
| 4411 | - ); | |
| 4412 | - | |
| 4413 | - $this->customizer->add_control( | |
| 4414 | - new AlphaColorControl( | |
| 4415 | - $this->customizer, | |
| 4416 | - 'search_modal_content_tabs_docs_list_color', | |
| 4417 | - [ | |
| 4418 | - 'label' => __( 'Color', 'betterdocs' ), | |
| 4419 | - 'priority' => 642, | |
| 4420 | - 'section' => 'betterdocs_live_search_settings', | |
| 4421 | - 'settings' => 'search_modal_content_tabs_docs_list_color', | |
| 4422 | - ] | |
| 4423 | - ) | |
| 4424 | - ); | |
| 4425 | - } | |
| 4426 | - | |
| 4427 | - public function search_modal_content_tabs_docs_list_background_color() { | |
| 4428 | - $this->customizer->add_setting( | |
| 4429 | - 'search_modal_content_tabs_docs_list_background_color', | |
| 4430 | - [ | |
| 4431 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_background_color'], | |
| 4432 | - 'capability' => 'edit_theme_options', | |
| 4433 | - 'transport' => 'postMessage', | |
| 4434 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4435 | - ] | |
| 4436 | - ); | |
| 4437 | - | |
| 4438 | - $this->customizer->add_control( | |
| 4439 | - new AlphaColorControl( | |
| 4440 | - $this->customizer, | |
| 4441 | - 'search_modal_content_tabs_docs_list_background_color', | |
| 4442 | - [ | |
| 4443 | - 'label' => __( 'Background Color', 'betterdocs' ), | |
| 4444 | - 'priority' => 643, | |
| 4445 | - 'section' => 'betterdocs_live_search_settings', | |
| 4446 | - 'settings' => 'search_modal_content_tabs_docs_list_background_color', | |
| 4447 | - ] | |
| 4448 | - ) | |
| 4449 | - ); | |
| 4450 | - } | |
| 4451 | - | |
| 4452 | - public function search_modal_content_tabs_docs_list_background_color_hover() { | |
| 4453 | - $this->customizer->add_setting( | |
| 4454 | - 'search_modal_content_tabs_docs_list_background_color_hover', | |
| 4455 | - [ | |
| 4456 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_background_color_hover'], | |
| 4457 | - 'capability' => 'edit_theme_options', | |
| 4458 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4459 | - ] | |
| 4460 | - ); | |
| 4461 | - | |
| 4462 | - $this->customizer->add_control( | |
| 4463 | - new AlphaColorControl( | |
| 4464 | - $this->customizer, | |
| 4465 | - 'search_modal_content_tabs_docs_list_background_color_hover', | |
| 4466 | - [ | |
| 4467 | - 'label' => __( 'Hover Background Color', 'betterdocs' ), | |
| 4468 | - 'priority' => 644, | |
| 4469 | - 'section' => 'betterdocs_live_search_settings', | |
| 4470 | - 'settings' => 'search_modal_content_tabs_docs_list_background_color_hover', | |
| 4471 | - ] | |
| 4472 | - ) | |
| 4473 | - ); | |
| 4474 | - } | |
| 4475 | - | |
| 4476 | - public function search_modal_content_tabs_docs_list_padding() { | |
| 4477 | - $this->customizer->add_setting( | |
| 4478 | - 'search_modal_content_tabs_docs_list_padding', | |
| 4479 | - [ | |
| 4480 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_padding'], | |
| 4481 | - 'transport' => 'postMessage', | |
| 4482 | - 'capability' => 'edit_theme_options' | |
| 4483 | - ] | |
| 4484 | - ); | |
| 4485 | - | |
| 4486 | - $this->customizer->add_control( | |
| 4487 | - new MultiDimensionControl( | |
| 4488 | - $this->customizer, | |
| 4489 | - 'search_modal_content_tabs_docs_list_padding', | |
| 4490 | - [ | |
| 4491 | - 'label' => __( 'Padding (PX)', 'betterdocs' ), | |
| 4492 | - 'section' => 'betterdocs_live_search_settings', | |
| 4493 | - 'settings' => 'search_modal_content_tabs_docs_list_padding', | |
| 4494 | - 'priority' => 644, | |
| 4495 | - 'input_fields' => [ | |
| 4496 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 4497 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 4498 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 4499 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 4500 | - ], | |
| 4501 | - 'defaults' => [ | |
| 4502 | - 'input1' => 16, | |
| 4503 | - 'input2' => 24, | |
| 4504 | - 'input3' => 16, | |
| 4505 | - 'input4' => 24 | |
| 4506 | - ] | |
| 4507 | - ] | |
| 4508 | - ) | |
| 4509 | - ); | |
| 4510 | - } | |
| 4511 | - | |
| 4512 | - public function search_modal_content_tabs_docs_list_margin() { | |
| 4513 | - $this->customizer->add_setting( | |
| 4514 | - 'search_modal_content_tabs_docs_list_margin', | |
| 4515 | - [ | |
| 4516 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_margin'], | |
| 4517 | - 'transport' => 'postMessage', | |
| 4518 | - 'capability' => 'edit_theme_options' | |
| 4519 | - ] | |
| 4520 | - ); | |
| 4521 | - | |
| 4522 | - $this->customizer->add_control( | |
| 4523 | - new MultiDimensionControl( | |
| 4524 | - $this->customizer, | |
| 4525 | - 'search_modal_content_tabs_docs_list_margin', | |
| 4526 | - [ | |
| 4527 | - 'label' => __( 'Margin (PX)', 'betterdocs' ), | |
| 4528 | - 'section' => 'betterdocs_live_search_settings', | |
| 4529 | - 'settings' => 'search_modal_content_tabs_docs_list_margin', | |
| 4530 | - 'priority' => 645, | |
| 4531 | - 'input_fields' => [ | |
| 4532 | - 'input1' => __( 'top', 'betterdocs' ), | |
| 4533 | - 'input2' => __( 'right', 'betterdocs' ), | |
| 4534 | - 'input3' => __( 'bottom', 'betterdocs' ), | |
| 4535 | - 'input4' => __( 'left', 'betterdocs' ) | |
| 4536 | - ], | |
| 4537 | - 'defaults' => [ | |
| 4538 | - 'input1' => 0, | |
| 4539 | - 'input2' => 0, | |
| 4540 | - 'input3' => 0, | |
| 4541 | - 'input4' => 0 | |
| 4542 | - ] | |
| 4543 | - ] | |
| 4544 | - ) | |
| 4545 | - ); | |
| 4546 | - } | |
| 4547 | - | |
| 4548 | - public function search_modal_content_tabs_docs_list_icon_size() { | |
| 4549 | - $this->customizer->add_setting( | |
| 4550 | - 'search_modal_content_tabs_docs_list_icon_size', | |
| 4551 | - [ | |
| 4552 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_icon_size'], | |
| 4553 | - 'capability' => 'edit_theme_options', | |
| 4554 | - 'transport' => 'postMessage', | |
| 4555 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 4556 | - ] | |
| 4557 | - ); | |
| 4558 | - | |
| 4559 | - $this->customizer->add_control( | |
| 4560 | - new RangeValueControl( | |
| 4561 | - $this->customizer, | |
| 4562 | - 'search_modal_content_tabs_docs_list_icon_size', | |
| 4563 | - [ | |
| 4564 | - 'type' => 'betterdocs-range-value', | |
| 4565 | - 'section' => 'betterdocs_live_search_settings', | |
| 4566 | - 'settings' => 'search_modal_content_tabs_docs_list_icon_size', | |
| 4567 | - 'label' => __( 'Icon Size', 'betterdocs' ), | |
| 4568 | - 'priority' => 646, | |
| 4569 | - 'input_attrs' => [ | |
| 4570 | - 'class' => '', | |
| 4571 | - 'min' => 0, | |
| 4572 | - 'max' => 50, | |
| 4573 | - 'step' => 1, | |
| 4574 | - 'suffix' => 'px' // optional suffix | |
| 4575 | - ] | |
| 4576 | - ] | |
| 4577 | - ) | |
| 4578 | - ); | |
| 4579 | - } | |
| 4580 | - | |
| 4581 | - public function search_modal_content_tabs_docs_list_category_font_size() { | |
| 4582 | - $this->customizer->add_setting( | |
| 4583 | - 'search_modal_content_tabs_docs_list_category_font_size', | |
| 4584 | - [ | |
| 4585 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_category_font_size'], | |
| 4586 | - 'capability' => 'edit_theme_options', | |
| 4587 | - 'transport' => 'postMessage', | |
| 4588 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 4589 | - ] | |
| 4590 | - ); | |
| 4591 | - | |
| 4592 | - $this->customizer->add_control( | |
| 4593 | - new RangeValueControl( | |
| 4594 | - $this->customizer, | |
| 4595 | - 'search_modal_content_tabs_docs_list_category_font_size', | |
| 4596 | - [ | |
| 4597 | - 'type' => 'betterdocs-range-value', | |
| 4598 | - 'section' => 'betterdocs_live_search_settings', | |
| 4599 | - 'settings' => 'search_modal_content_tabs_docs_list_category_font_size', | |
| 4600 | - 'label' => __( 'List Category Font Size', 'betterdocs' ), | |
| 4601 | - 'priority' => 647, | |
| 4602 | - 'input_attrs' => [ | |
| 4603 | - 'class' => '', | |
| 4604 | - 'min' => 0, | |
| 4605 | - 'max' => 50, | |
| 4606 | - 'step' => 1, | |
| 4607 | - 'suffix' => 'px' // optional suffix | |
| 4608 | - ] | |
| 4609 | - ] | |
| 4610 | - ) | |
| 4611 | - ); | |
| 4612 | - } | |
| 4613 | - | |
| 4614 | - public function search_modal_content_tabs_docs_list_category_color() { | |
| 4615 | - $this->customizer->add_setting( | |
| 4616 | - 'search_modal_content_tabs_docs_list_category_color', | |
| 4617 | - [ | |
| 4618 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_category_color'], | |
| 4619 | - 'capability' => 'edit_theme_options', | |
| 4620 | - 'transport' => 'postMessage', | |
| 4621 | - 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 4622 | - ] | |
| 4623 | - ); | |
| 4624 | - | |
| 4625 | - $this->customizer->add_control( | |
| 4626 | - new AlphaColorControl( | |
| 4627 | - $this->customizer, | |
| 4628 | - 'search_modal_content_tabs_docs_list_category_color', | |
| 4629 | - [ | |
| 4630 | - 'label' => __( 'Color', 'betterdocs' ), | |
| 4631 | - 'priority' => 648, | |
| 4632 | - 'section' => 'betterdocs_live_search_settings', | |
| 4633 | - 'settings' => 'search_modal_content_tabs_docs_list_category_color', | |
| 4634 | - ] | |
| 4635 | - ) | |
| 4636 | - ); | |
| 4637 | - } | |
| 4638 | - | |
| 4639 | - public function search_modal_content_tabs_docs_list_category_icon_size() { | |
| 4640 | - $this->customizer->add_setting( | |
| 4641 | - 'search_modal_content_tabs_docs_list_category_icon_size', | |
| 4642 | - [ | |
| 4643 | - 'default' => $this->defaults['search_modal_content_tabs_docs_list_category_icon_size'], | |
| 4644 | - 'capability' => 'edit_theme_options', | |
| 4645 | - 'transport' => 'postMessage', | |
| 4646 | - 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 4647 | - ] | |
| 4648 | - ); | |
| 4649 | - | |
| 4650 | - $this->customizer->add_control( | |
| 4651 | - new RangeValueControl( | |
| 4652 | - $this->customizer, | |
| 4653 | - 'search_modal_content_tabs_docs_list_category_icon_size', | |
| 4654 | - [ | |
| 4655 | - 'type' => 'betterdocs-range-value', | |
| 4656 | - 'section' => 'betterdocs_live_search_settings', | |
| 4657 | - 'settings' => 'search_modal_content_tabs_docs_list_category_icon_size', | |
| 4658 | - 'label' => __( 'List Category Font Size', 'betterdocs' ), | |
| 4659 | - 'priority' => 649, | |
| 4660 | - 'input_attrs' => [ | |
| 4661 | - 'class' => '', | |
| 4662 | - 'min' => 0, | |
| 4663 | - 'max' => 50, | |
| 4664 | - 'step' => 1, | |
| 4665 | - 'suffix' => 'px' // optional suffix | |
| 4666 | - ] | |
| 4667 | - ] | |
| 4668 | - ) | |
| 4669 | - ); | |
| 4670 | - } | |
| 4671 | - | |
| 4672 | - | |
| 4673 | - public function search_modal_query_section() { | |
| 4674 | - $this->customizer->add_setting( | |
| 4675 | - 'search_modal_query_section', | |
| 4676 | - [ | |
| 4677 | - 'default' => $this->defaults['search_modal_query_section'], | |
| 4678 | - 'sanitize_callback' => 'esc_html' | |
| 4679 | - ] | |
| 4680 | - ); | |
| 4681 | - | |
| 4682 | - $this->customizer->add_control( | |
| 4683 | - new SeparatorControl( | |
| 4684 | - $this->customizer, | |
| 4685 | - 'search_modal_query_section', | |
| 4686 | - [ | |
| 4687 | - 'label' => __( 'Search Modal Query', 'betterdocs' ), | |
| 4688 | - 'priority' => 700, | |
| 4689 | - 'settings' => 'search_modal_query_section', | |
| 4690 | - 'section' => 'betterdocs_live_search_settings' | |
| 4691 | - ] | |
| 4692 | - ) | |
| 4693 | - ); | |
| 4694 | - } | |
| 4695 | - | |
| 4696 | - public function search_modal_query_type() { | |
| 4697 | - $this->customizer->add_setting( | |
| 4698 | - 'search_modal_query_type', | |
| 4699 | - [ | |
| 4700 | - 'default' => $this->defaults['search_modal_query_type'], | |
| 4701 | - 'capability' => 'edit_theme_options' | |
| 4702 | - ] | |
| 4703 | - ); | |
| 4704 | - | |
| 4705 | - $this->customizer->add_control( | |
| 4706 | - new WP_Customize_Control( | |
| 4707 | - $this->customizer, | |
| 4708 | - 'search_modal_query_type', | |
| 4709 | - [ | |
| 4710 | - 'label' => __( 'Select Docs Type', 'betterdocs' ), | |
| 4711 | - 'section' => 'betterdocs_live_search_settings', | |
| 4712 | - 'settings' => 'search_modal_query_type', | |
| 4713 | - 'type' => 'select', | |
| 4714 | - 'choices' => [ | |
| 4715 | - 'popular_docs' => __( 'Popular Docs', 'betterdocs' ), | |
| 4716 | - 'specific_doc_ids' => __( "Doc Id's", 'betterdocs' ), | |
| 4717 | - 'specific_doc_term_ids' => __( "Doc Category Id's", 'betterdocs' ) | |
| 4718 | - ], | |
| 4719 | - 'priority' => 701 | |
| 4720 | - ] | |
| 4721 | - ) | |
| 4722 | - ); | |
| 4723 | - } | |
| 4724 | - | |
| 4725 | - public function search_modal_query_initial_number_of_docs() { | |
| 4726 | - $this->customizer->add_setting( | |
| 4727 | - 'search_modal_query_initial_number_of_docs', | |
| 4728 | - [ | |
| 4729 | - 'default' => $this->defaults['search_modal_query_initial_number_of_docs'], | |
| 4730 | - 'capability' => 'edit_theme_options', | |
| 4731 | - 'sanitize_callback' => 'esc_html' | |
| 4732 | - ] | |
| 4733 | - ); | |
| 4734 | - | |
| 4735 | - $this->customizer->add_control( | |
| 4736 | - new SelectControl( | |
| 4737 | - $this->customizer, | |
| 4738 | - 'search_modal_query_initial_number_of_docs', | |
| 4739 | - [ | |
| 4740 | - 'label' => __( 'Number of Docs', 'betterdocs' ), | |
| 4741 | - 'section' => 'betterdocs_live_search_settings', | |
| 4742 | - 'settings' => 'search_modal_query_initial_number_of_docs', | |
| 4743 | - 'type' => 'number', | |
| 4744 | - 'priority' => 701 | |
| 4745 | - ] | |
| 4746 | - ) | |
| 4747 | - ); | |
| 4748 | - } | |
| 4749 | - | |
| 4750 | - public function search_modal_query_doc_ids() { | |
| 4751 | - $this->customizer->add_setting( | |
| 4752 | - 'search_modal_query_doc_ids', | |
| 4753 | - [ | |
| 4754 | - 'default' => $this->defaults['search_modal_query_doc_ids'], | |
| 4755 | - 'capability' => 'edit_theme_options', | |
| 4756 | - 'sanitize_callback' => 'esc_html' | |
| 4757 | - ] | |
| 4758 | - ); | |
| 4759 | - | |
| 4760 | - $this->customizer->add_control( | |
| 4761 | - new SelectControl( | |
| 4762 | - $this->customizer, | |
| 4763 | - 'search_modal_query_doc_ids', | |
| 4764 | - [ | |
| 4765 | - 'label' => __( "Doc Id's", 'betterdocs' ), | |
| 4766 | - 'section' => 'betterdocs_live_search_settings', | |
| 4767 | - 'settings' => 'search_modal_query_doc_ids', | |
| 4768 | - 'type' => 'text', | |
| 4769 | - 'priority' => 702 | |
| 4770 | - ] | |
| 4771 | - ) | |
| 4772 | - ); | |
| 4773 | - } | |
| 4774 | - | |
| 4775 | - | |
| 4776 | - public function search_modal_query_doc_term_ids() { | |
| 4777 | - $this->customizer->add_setting( | |
| 4778 | - 'search_modal_query_doc_term_ids', | |
| 4779 | - [ | |
| 4780 | - 'default' => $this->defaults['search_modal_query_doc_term_ids'], | |
| 4781 | - 'capability' => 'edit_theme_options', | |
| 4782 | - 'sanitize_callback' => 'esc_html' | |
| 4783 | - ] | |
| 4784 | - ); | |
| 4785 | - | |
| 4786 | - $this->customizer->add_control( | |
| 4787 | - new SelectControl( | |
| 4788 | - $this->customizer, | |
| 4789 | - 'search_modal_query_doc_term_ids', | |
| 4790 | - [ | |
| 4791 | - 'label' => __( "Doc Category Id's", 'betterdocs' ), | |
| 4792 | - 'section' => 'betterdocs_live_search_settings', | |
| 4793 | - 'settings' => 'search_modal_query_doc_term_ids', | |
| 4794 | - 'type' => 'text', | |
| 4795 | - 'priority' => 702 | |
| 4796 | - ] | |
| 4797 | - ) | |
| 4798 | - ); | |
| 4799 | - } | |
| 4800 | - | |
| 4801 | - public function search_modal_faq_query_type() { | |
| 4802 | - $this->customizer->add_setting( | |
| 4803 | - 'search_modal_faq_query_type', | |
| 4804 | - [ | |
| 4805 | - 'default' => $this->defaults['search_modal_faq_query_type'], | |
| 4806 | - 'capability' => 'edit_theme_options' | |
| 4807 | - ] | |
| 4808 | - ); | |
| 4809 | - | |
| 4810 | - $this->customizer->add_control( | |
| 4811 | - new WP_Customize_Control( | |
| 4812 | - $this->customizer, | |
| 4813 | - 'search_modal_faq_query_type', | |
| 4814 | - [ | |
| 4815 | - 'label' => __( 'Select FAQ Type', 'betterdocs' ), | |
| 4816 | - 'section' => 'betterdocs_live_search_settings', | |
| 4817 | - 'settings' => 'search_modal_faq_query_type', | |
| 4818 | - 'type' => 'select', | |
| 4819 | - 'choices' => [ | |
| 4820 | - 'default' => __( 'Default', 'betterdocs' ), | |
| 4821 | - 'specific_faq_term_ids' => __( "FAQ Group Id's", 'betterdocs' ), | |
| 4822 | - ], | |
| 4823 | - 'priority' => 703 | |
| 4824 | - ] | |
| 4825 | - ) | |
| 4826 | - ); | |
| 4827 | - } | |
| 4828 | - | |
| 4829 | - public function search_modal_query_initial_number_of_faqs() { | |
| 4830 | - $this->customizer->add_setting( | |
| 4831 | - 'search_modal_query_initial_number_of_faqs', | |
| 4832 | - [ | |
| 4833 | - 'default' => $this->defaults['search_modal_query_initial_number_of_faqs'], | |
| 4834 | - 'capability' => 'edit_theme_options', | |
| 4835 | - 'sanitize_callback' => 'esc_html' | |
| 4836 | - ] | |
| 4837 | - ); | |
| 4838 | - | |
| 4839 | - $this->customizer->add_control( | |
| 4840 | - new SelectControl( | |
| 4841 | - $this->customizer, | |
| 4842 | - 'search_modal_query_initial_number_of_faqs', | |
| 4843 | - [ | |
| 4844 | - 'label' => __( "Number of FAQ's", 'betterdocs' ), | |
| 4845 | - 'section' => 'betterdocs_live_search_settings', | |
| 4846 | - 'settings' => 'search_modal_query_initial_number_of_faqs', | |
| 4847 | - 'type' => 'number', | |
| 4848 | - 'priority' => 703 | |
| 4849 | - ] | |
| 4850 | - ) | |
| 4851 | - ); | |
| 4852 | - } | |
| 4853 | - | |
| 4854 | - public function search_modal_query_faq_term_ids() { | |
| 4855 | - $this->customizer->add_setting( | |
| 4856 | - 'search_modal_query_faq_term_ids', | |
| 4857 | - [ | |
| 4858 | - 'default' => $this->defaults['search_modal_query_faq_term_ids'], | |
| 4859 | - 'capability' => 'edit_theme_options', | |
| 4860 | - 'sanitize_callback' => 'esc_html' | |
| 4861 | - ] | |
| 4862 | - ); | |
| 4863 | - | |
| 4864 | - $this->customizer->add_control( | |
| 4865 | - new SelectControl( | |
| 4866 | - $this->customizer, | |
| 4867 | - 'search_modal_query_faq_term_ids', | |
| 4868 | - [ | |
| 4869 | - 'label' => __( "FAQ Group Id's", 'betterdocs' ), | |
| 4870 | - 'section' => 'betterdocs_live_search_settings', | |
| 4871 | - 'settings' => 'search_modal_query_faq_term_ids', | |
| 4872 | - 'type' => 'text', | |
| 4873 | - 'priority' => 703 | |
| 4874 | - ] | |
| 4875 | - ) | |
| 4876 | - ); | |
| 4877 | - } | |
| 4878 | - | |
| 4879 | - | |
| 4880 | - // public function search_modal_query_select_specific_doc_category() { | |
| 4881 | - // $this->customizer->add_setting( 'search_modal_query_select_specific_doc_category', [ | |
| 4882 | - // 'default' => $this->defaults['search_modal_query_select_specific_doc_category'], | |
| 4883 | - // 'capability' => 'edit_theme_options' | |
| 4884 | - // ] ); | |
| 4885 | - | |
| 4886 | - // $this->customizer->add_control( | |
| 4887 | - // new WP_Customize_Control( | |
| 4888 | - // $this->customizer, | |
| 4889 | - // 'search_modal_query_select_specific_doc_category', | |
| 4890 | - // [ | |
| 4891 | - // 'label' => __( 'Select Doc Category Initial Posts', 'betterdocs' ), | |
| 4892 | - // 'section' => 'betterdocs_live_search_settings', | |
| 4893 | - // 'settings' => 'search_modal_query_select_specific_doc_category', | |
| 4894 | - // 'type' => 'select', | |
| 4895 | - // 'choices' => betterdocs()->query->get_doc_terms( [ | |
| 4896 | - // '' => __( 'Select Doc Term', 'betterdocs' ) | |
| 4897 | - // ] ), | |
| 4898 | - // 'priority' => 702 | |
| 4899 | - // ] | |
| 4900 | - // ) | |
| 4901 | - // ); | |
| 4902 | - // } | |
| 4903 | - | |
| 4904 | - // public function search_modal_query_select_specific_faq() { | |
| 4905 | - // $this->customizer->add_setting( 'search_modal_query_select_specific_faq', [ | |
| 4906 | - // 'default' => $this->defaults['search_modal_query_select_specific_faq'], | |
| 4907 | - // 'capability' => 'edit_theme_options' | |
| 4908 | - // ] ); | |
| 4909 | - | |
| 4910 | - // $this->customizer->add_control( | |
| 4911 | - // new WP_Customize_Control( | |
| 4912 | - // $this->customizer, | |
| 4913 | - // 'search_modal_query_select_specific_faq', | |
| 4914 | - // [ | |
| 4915 | - // 'label' => __( 'Select FAQ Initial Posts', 'betterdocs' ), | |
| 4916 | - // 'section' => 'betterdocs_live_search_settings', | |
| 4917 | - // 'settings' => 'search_modal_query_select_specific_faq', | |
| 4918 | - // 'type' => 'select', | |
| 4919 | - // 'choices' => betterdocs()->query->get_faq_terms( [ | |
| 4920 | - // '' => __( 'Select FAQ Term', 'betterdocs' ) | |
| 4921 | - // ] ), | |
| 4922 | - // 'priority' => 703 | |
| 4923 | - // ] | |
| 4924 | - // ) | |
| 4925 | - // ); | |
| 4926 | - // } | |
| 1627 | + $this->customizer->add_control( | |
| 1628 | + new AlphaColorControl( | |
| 1629 | + $this->customizer, | |
| 1630 | + 'betterdocs_search_result_item_hover_background_color', | |
| 1631 | + [ | |
| 1632 | + 'label' => __( 'Item Background Hover Color', 'betterdocs' ), | |
| 1633 | + 'section' => 'betterdocs_live_search_settings', | |
| 1634 | + 'settings' => 'betterdocs_search_result_item_hover_background_color', | |
| 1635 | + 'priority' => 560 | |
| 1636 | + ] | |
| 1637 | + ) | |
| 1638 | + ); | |
| 1639 | + } | |
| 4927 | 1640 | } |