PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.1.0
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.1.0
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / includes / Admin / Customizer / Sections / SingleDoc.php

SingleDoc.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 3.1.0, at includes/Admin/Customizer/Sections/SingleDoc.php

2,305 lines 99.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDeveloper\BetterDocs\Admin\Customizer\Sections;
4
5 use WP_Customize_Control;
6 use WP_Customize_Image_Control;
7 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\TitleControl;
8 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\NumberControl;
9 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\SelectControl;
10 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\ToggleControl;
11 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\DimensionControl;
12 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\SeparatorControl;
13 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\AlphaColorControl;
14 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\RadioImageControl;
15 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\RangeValueControl;
16
17 class SingleDoc extends Section {
18 /**
19 * Section Priority
20 * @var int
21 */
22 protected $priority = 101;
23
24 /**
25 * Get the section id.
26 * @return string
27 */
28 public function get_id() {
29 return 'betterdocs_single_docs_settings';
30 }
31
32 /**
33 * Get the title of the section.
34 * @return string
35 */
36 public function get_title() {
37 return __( 'Single Doc', 'betterdocs' );
38 }
39
40 public function single_layout_select() {
41 $this->customizer->add_setting( 'betterdocs_single_layout_select', [
42 'default' => $this->defaults['betterdocs_single_layout_select'],
43 'capability' => 'edit_theme_options',
44 'sanitize_callback' => [$this->sanitizer, 'select']
45 ] );
46
47 $this->customizer->add_control(
48 new RadioImageControl(
49 $this->customizer,
50 'betterdocs_single_layout_select',
51 [
52 'type' => 'betterdocs-radio-image',
53 'settings' => 'betterdocs_single_layout_select',
54 'section' => 'betterdocs_single_docs_settings',
55 'label' => __( 'Select Layout', 'betterdocs' ),
56 'priority' => 102,
57 'choices' => apply_filters( 'betterdocs_single_layout_select_choices', [
58 'layout-1' => [
59 'label' => __( 'Classic Layout', 'betterdocs' ),
60 'image' => $this->assets->icon( 'customizer/single/layout-1.png', true )
61 ],
62 'layout-4' => [
63 'label' => __( 'Abstract Layout', 'betterdocs' ),
64 'image' => $this->assets->icon( 'customizer/single/layout-4.png', true ),
65 'pro' => false
66 ],
67 'layout-5' => [
68 'label' => __( 'Modern Layout', 'betterdocs' ),
69 'image' => $this->assets->icon( 'customizer/single/layout-5.png', true ),
70 'pro' => false
71 ],
72 'layout-2' => [
73 'label' => __( 'Minimalist Layout', 'betterdocs' ),
74 'image' => $this->assets->icon( 'customizer/single/layout-2.png', true ),
75 'pro' => true,
76 'url' => 'https://betterdocs.co/upgrade'
77 ],
78 'layout-3' => [
79 'label' => __( 'Artisan Layout', 'betterdocs' ),
80 'image' => $this->assets->icon( 'customizer/single/layout-3.png', true ),
81 'pro' => true,
82 'url' => 'https://betterdocs.co/upgrade'
83 ],
84 'layout-6' => [
85 'label' => __( 'Bohemian Layout', 'betterdocs' ),
86 'image' => $this->assets->icon( 'customizer/single/layout-6.png', true ),
87 'pro' => true,
88 'url' => 'https://betterdocs.co/upgrade'
89 ]
90 ] )
91 ]
92 )
93 );
94 }
95
96 public function doc_single_content_area_bg_color() {
97 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_bg_color', [
98 'default' => $this->defaults['betterdocs_doc_single_content_area_bg_color'],
99 'capability' => 'edit_theme_options',
100 'transport' => 'postMessage',
101 'sanitize_callback' => [$this->sanitizer, 'rgba']
102 ] );
103
104 $this->customizer->add_control(
105 new AlphaColorControl(
106 $this->customizer,
107 'betterdocs_doc_single_content_area_bg_color',
108 [
109 'label' => __( 'Content Area Background Color', 'betterdocs' ),
110 'section' => 'betterdocs_single_docs_settings',
111 'settings' => 'betterdocs_doc_single_content_area_bg_color',
112 'priority' => 103
113 ]
114 )
115 );
116 }
117
118 public function doc_single_content_area_bg_image() {
119 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_bg_image', [
120 'default' => $this->defaults['betterdocs_doc_single_content_area_bg_image'],
121 'capability' => 'edit_theme_options',
122 'transport' => 'postMessage'
123 ] );
124
125 $this->customizer->add_control(
126 new WP_Customize_Image_Control(
127 $this->customizer,
128 'betterdocs_doc_single_content_area_bg_image',
129 [
130 'label' => __( 'Background Image', 'betterdocs' ),
131 'section' => 'betterdocs_single_docs_settings',
132 'settings' => 'betterdocs_doc_single_content_area_bg_image',
133 'priority' => 103
134 ] )
135 );
136 }
137
138 public function doc_single_content_bg_property() {
139 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property', [
140 'default' => $this->defaults['betterdocs_doc_single_content_bg_property'],
141 'capability' => 'edit_theme_options',
142 'transport' => 'postMessage',
143 'sanitize_callback' => [$this->sanitizer, 'select']
144
145 ] );
146
147 $this->customizer->add_control( new TitleControl(
148 $this->customizer, 'betterdocs_doc_single_content_bg_property', [
149 'type' => 'betterdocs-title',
150 'section' => 'betterdocs_single_docs_settings',
151 'settings' => 'betterdocs_doc_single_content_bg_property',
152 'priority' => 103,
153 'label' => __( 'Background Property', 'betterdocs' ),
154 'input_attrs' => [
155 'id' => 'betterdocs_doc_single_content_bg_property',
156 'class' => 'betterdocs-select'
157 ]
158 ] )
159 );
160 }
161
162 public function doc_single_content_bg_property_size() {
163 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_size', [
164 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_size'],
165 'capability' => 'edit_theme_options',
166 'transport' => 'postMessage',
167 'sanitize_callback' => [$this->sanitizer, 'select']
168
169 ] );
170
171 $this->customizer->add_control( new SelectControl(
172 $this->customizer, 'betterdocs_doc_single_content_bg_property_size', [
173 'type' => 'betterdocs-select',
174 'section' => 'betterdocs_single_docs_settings',
175 'settings' => 'betterdocs_doc_single_content_bg_property_size',
176 'priority' => 103,
177 'label' => __( 'Size', 'betterdocs' ),
178 'input_attrs' => [
179 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
180 ],
181 'choices' => [
182 'auto' => __( 'auto', 'betterdocs' ),
183 'length' => __( 'length', 'betterdocs' ),
184 'cover' => __( 'cover', 'betterdocs' ),
185 'contain' => __( 'contain', 'betterdocs' ),
186 'initial' => __( 'initial', 'betterdocs' ),
187 'inherit' => __( 'inherit', 'betterdocs' )
188 ]
189 ] )
190 );
191 }
192
193 public function doc_single_content_bg_property_repeat() {
194 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_repeat', [
195 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_repeat'],
196 'capability' => 'edit_theme_options',
197 'transport' => 'postMessage',
198 'sanitize_callback' => [$this->sanitizer, 'select']
199 ] );
200
201 $this->customizer->add_control( new SelectControl(
202 $this->customizer, 'betterdocs_doc_single_content_bg_property_repeat', [
203 'type' => 'betterdocs-select',
204 'section' => 'betterdocs_single_docs_settings',
205 'settings' => 'betterdocs_doc_single_content_bg_property_repeat',
206 'priority' => 103,
207 'label' => __( 'Repeat', 'betterdocs' ),
208 'input_attrs' => [
209 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
210 ],
211 'choices' => [
212 'no-repeat' => __( 'no-repeat', 'betterdocs' ),
213 'initial' => __( 'initial', 'betterdocs' ),
214 'inherit' => __( 'inherit', 'betterdocs' ),
215 'repeat' => __( 'repeat', 'betterdocs' ),
216 'repeat-x' => __( 'repeat-x', 'betterdocs' ),
217 'repeat-y' => __( 'repeat-y', 'betterdocs' )
218 ]
219 ] )
220 );
221 }
222
223 public function doc_single_content_bg_property_attachment() {
224 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_attachment', [
225 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_attachment'],
226 'capability' => 'edit_theme_options',
227 'transport' => 'postMessage',
228 'sanitize_callback' => [$this->sanitizer, 'select']
229
230 ] );
231
232 $this->customizer->add_control( new SelectControl(
233 $this->customizer, 'betterdocs_doc_single_content_bg_property_attachment', [
234 'type' => 'betterdocs-select',
235 'section' => 'betterdocs_single_docs_settings',
236 'settings' => 'betterdocs_doc_single_content_bg_property_attachment',
237 'priority' => 103,
238 'label' => __( 'Attachment', 'betterdocs' ),
239 'input_attrs' => [
240 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
241 ],
242 'choices' => [
243 'initial' => __( 'initial', 'betterdocs' ),
244 'inherit' => __( 'inherit', 'betterdocs' ),
245 'scroll' => __( 'scroll', 'betterdocs' ),
246 'fixed' => __( 'fixed', 'betterdocs' ),
247 'local' => __( 'local', 'betterdocs' )
248 ]
249 ] )
250 );
251 }
252
253 public function doc_single_content_bg_property_position() {
254 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_position', [
255 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_position'],
256 'capability' => 'edit_theme_options',
257 'transport' => 'postMessage',
258 'sanitize_callback' => 'esc_html'
259
260 ] );
261
262 $this->customizer->add_control( new SelectControl(
263 $this->customizer, 'betterdocs_doc_single_content_bg_property_position', [
264 'type' => 'betterdocs-select',
265 'section' => 'betterdocs_single_docs_settings',
266 'settings' => 'betterdocs_doc_single_content_bg_property_position',
267 'priority' => 103,
268 'label' => __( 'Position', 'betterdocs' ),
269 'input_attrs' => [
270 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
271 ],
272 'choices' => [
273 'left top' => __( 'left top', 'betterdocs' ),
274 'left center' => __( 'left center', 'betterdocs' ),
275 'left bottom' => __( 'left bottom', 'betterdocs' ),
276 'right top' => __( 'right top', 'betterdocs' ),
277 'right center' => __( 'right center', 'betterdocs' ),
278 'right bottom' => __( 'right bottom', 'betterdocs' ),
279 'center top' => __( 'center top', 'betterdocs' ),
280 'center center' => __( 'center center', 'betterdocs' ),
281 'center bottom' => __( 'center bottom', 'betterdocs' )
282 ]
283 ] )
284 );
285 }
286
287 public function doc_single_content_area_padding() {
288 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding', [
289 'default' => $this->defaults['betterdocs_doc_single_content_area_padding'],
290 'capability' => 'edit_theme_options',
291 'transport' => 'postMessage',
292 'sanitize_callback' => [$this->sanitizer, 'integer']
293
294 ] );
295
296 $this->customizer->add_control( new TitleControl(
297 $this->customizer, 'betterdocs_doc_single_content_area_padding', [
298 'type' => 'betterdocs-title',
299 'section' => 'betterdocs_single_docs_settings',
300 'settings' => 'betterdocs_doc_single_content_area_padding',
301 'label' => __( 'Content Area Padding', 'betterdocs' ),
302 'priority' => 104,
303 'input_attrs' => [
304 'id' => 'betterdocs_doc_single_content_area_padding',
305 'class' => 'betterdocs-dimension'
306 ]
307 ] )
308 );
309
310 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_top', [
311 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_top'],
312 'capability' => 'edit_theme_options',
313 'transport' => 'postMessage',
314 'sanitize_callback' => [$this->sanitizer, 'integer']
315 ] );
316
317 $this->customizer->add_control( new DimensionControl(
318 $this->customizer, 'betterdocs_doc_single_content_area_padding_top', [
319 'type' => 'betterdocs-dimension',
320 'section' => 'betterdocs_single_docs_settings',
321 'settings' => 'betterdocs_doc_single_content_area_padding_top',
322 'label' => __( 'Top', 'betterdocs' ),
323 'priority' => 104,
324 'input_attrs' => [
325 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
326 ]
327 ] )
328 );
329
330 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_right', [
331 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_right'],
332 'capability' => 'edit_theme_options',
333 'transport' => 'postMessage',
334 'sanitize_callback' => [$this->sanitizer, 'integer']
335
336 ] );
337
338 $this->customizer->add_control( new DimensionControl(
339 $this->customizer, 'betterdocs_doc_single_content_area_padding_right', [
340 'type' => 'betterdocs-dimension',
341 'section' => 'betterdocs_single_docs_settings',
342 'settings' => 'betterdocs_doc_single_content_area_padding_right',
343 'label' => __( 'Right', 'betterdocs' ),
344 'priority' => 104,
345 'input_attrs' => [
346 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
347 ]
348 ] )
349 );
350
351 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_bottom', [
352 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_bottom'],
353 'capability' => 'edit_theme_options',
354 'transport' => 'postMessage',
355 'sanitize_callback' => [$this->sanitizer, 'integer']
356
357 ] );
358
359 $this->customizer->add_control( new DimensionControl(
360 $this->customizer, 'betterdocs_doc_single_content_area_padding_bottom', [
361 'type' => 'betterdocs-dimension',
362 'section' => 'betterdocs_single_docs_settings',
363 'settings' => 'betterdocs_doc_single_content_area_padding_bottom',
364 'label' => __( 'Bottom', 'betterdocs' ),
365 'priority' => 104,
366 'input_attrs' => [
367 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
368 ]
369 ] )
370 );
371
372 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_left', [
373 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_left'],
374 'capability' => 'edit_theme_options',
375 'transport' => 'postMessage',
376 'sanitize_callback' => [$this->sanitizer, 'integer']
377
378 ] );
379
380 $this->customizer->add_control( new DimensionControl(
381 $this->customizer, 'betterdocs_doc_single_content_area_padding_left', [
382 'type' => 'betterdocs-dimension',
383 'section' => 'betterdocs_single_docs_settings',
384 'settings' => 'betterdocs_doc_single_content_area_padding_left',
385 'label' => __( 'Left', 'betterdocs' ),
386 'priority' => 104,
387 'input_attrs' => [
388 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
389 ]
390 ] )
391 );
392 }
393
394 public function doc_single_post_content_padding() {
395 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding', [
396 'default' => $this->defaults['betterdocs_doc_single_post_content_padding'],
397 'capability' => 'edit_theme_options',
398 'transport' => 'postMessage',
399 'sanitize_callback' => [$this->sanitizer, 'integer']
400
401 ] );
402
403 $this->customizer->add_control( new TitleControl(
404 $this->customizer, 'betterdocs_doc_single_post_content_padding', [
405 'type' => 'betterdocs-title',
406 'section' => 'betterdocs_single_docs_settings',
407 'settings' => 'betterdocs_doc_single_post_content_padding',
408 'label' => __( 'Doc Content Padding', 'betterdocs' ),
409 'priority' => 109,
410 'input_attrs' => [
411 'id' => 'betterdocs_doc_single_post_content_padding',
412 'class' => 'betterdocs-dimension'
413 ]
414 ] )
415 );
416
417 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_top', [
418 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_top'],
419 'capability' => 'edit_theme_options',
420 'transport' => 'postMessage',
421 'sanitize_callback' => [$this->sanitizer, 'integer']
422 ] );
423
424 $this->customizer->add_control( new DimensionControl(
425 $this->customizer, 'betterdocs_doc_single_post_content_padding_top', [
426 'type' => 'betterdocs-dimension',
427 'section' => 'betterdocs_single_docs_settings',
428 'settings' => 'betterdocs_doc_single_post_content_padding_top',
429 'label' => __( 'Top', 'betterdocs' ),
430 'priority' => 109,
431 'input_attrs' => [
432 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
433 ]
434 ] )
435 );
436
437 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_right', [
438 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_right'],
439 'capability' => 'edit_theme_options',
440 'transport' => 'postMessage',
441 'sanitize_callback' => [$this->sanitizer, 'integer']
442
443 ] );
444
445 $this->customizer->add_control( new DimensionControl(
446 $this->customizer, 'betterdocs_doc_single_post_content_padding_right', [
447 'type' => 'betterdocs-dimension',
448 'section' => 'betterdocs_single_docs_settings',
449 'settings' => 'betterdocs_doc_single_post_content_padding_right',
450 'label' => __( 'Right', 'betterdocs' ),
451 'priority' => 109,
452 'input_attrs' => [
453 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
454 ]
455 ] )
456 );
457
458 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_bottom', [
459 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_bottom'],
460 'capability' => 'edit_theme_options',
461 'transport' => 'postMessage',
462 'sanitize_callback' => [$this->sanitizer, 'integer']
463
464 ] );
465
466 $this->customizer->add_control( new DimensionControl(
467 $this->customizer, 'betterdocs_doc_single_post_content_padding_bottom', [
468 'type' => 'betterdocs-dimension',
469 'section' => 'betterdocs_single_docs_settings',
470 'settings' => 'betterdocs_doc_single_post_content_padding_bottom',
471 'label' => __( 'Bottom', 'betterdocs' ),
472 'priority' => 109,
473 'input_attrs' => [
474 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
475 ]
476 ] )
477 );
478
479 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_left', [
480 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_left'],
481 'capability' => 'edit_theme_options',
482 'transport' => 'postMessage',
483 'sanitize_callback' => [$this->sanitizer, 'integer']
484
485 ] );
486
487 $this->customizer->add_control( new DimensionControl(
488 $this->customizer, 'betterdocs_doc_single_post_content_padding_left', [
489 'type' => 'betterdocs-dimension',
490 'section' => 'betterdocs_single_docs_settings',
491 'settings' => 'betterdocs_doc_single_post_content_padding_left',
492 'label' => __( 'Left', 'betterdocs' ),
493 'priority' => 109,
494 'input_attrs' => [
495 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
496 ]
497 ] )
498 );
499 }
500
501 public function doc_single_2_post_content_padding() {
502 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding', [
503 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding'],
504 'capability' => 'edit_theme_options',
505 'transport' => 'postMessage',
506 'sanitize_callback' => [$this->sanitizer, 'integer']
507
508 ] );
509
510 $this->customizer->add_control( new TitleControl(
511 $this->customizer, 'betterdocs_doc_single_2_post_content_padding', [
512 'type' => 'betterdocs-title',
513 'section' => 'betterdocs_single_docs_settings',
514 'settings' => 'betterdocs_doc_single_2_post_content_padding',
515 'label' => __( 'Post Content Padding', 'betterdocs' ),
516 'priority' => 114,
517 'input_attrs' => [
518 'id' => 'betterdocs_doc_single_2_post_content_padding',
519 'class' => 'betterdocs-dimension'
520 ]
521 ] )
522 );
523
524 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_top', [
525 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_top'],
526 'capability' => 'edit_theme_options',
527 'transport' => 'postMessage',
528 'sanitize_callback' => [$this->sanitizer, 'integer']
529 ] );
530
531 $this->customizer->add_control( new DimensionControl(
532 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_top', [
533 'type' => 'betterdocs-dimension',
534 'section' => 'betterdocs_single_docs_settings',
535 'settings' => 'betterdocs_doc_single_2_post_content_padding_top',
536 'label' => __( 'Top', 'betterdocs' ),
537 'priority' => 114,
538 'input_attrs' => [
539 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
540 ]
541 ] )
542 );
543
544 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_right', [
545 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_right'],
546 'capability' => 'edit_theme_options',
547 'transport' => 'postMessage',
548 'sanitize_callback' => [$this->sanitizer, 'integer']
549
550 ] );
551
552 $this->customizer->add_control( new DimensionControl(
553 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_right', [
554 'type' => 'betterdocs-dimension',
555 'section' => 'betterdocs_single_docs_settings',
556 'settings' => 'betterdocs_doc_single_2_post_content_padding_right',
557 'label' => __( 'Right', 'betterdocs' ),
558 'priority' => 114,
559 'input_attrs' => [
560 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
561 ]
562 ] )
563 );
564
565 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_bottom', [
566 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_bottom'],
567 'capability' => 'edit_theme_options',
568 'transport' => 'postMessage',
569 'sanitize_callback' => [$this->sanitizer, 'integer']
570
571 ] );
572
573 $this->customizer->add_control( new DimensionControl(
574 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_bottom', [
575 'type' => 'betterdocs-dimension',
576 'section' => 'betterdocs_single_docs_settings',
577 'settings' => 'betterdocs_doc_single_2_post_content_padding_bottom',
578 'label' => __( 'Bottom', 'betterdocs' ),
579 'priority' => 114,
580 'input_attrs' => [
581 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
582 ]
583 ] )
584 );
585
586 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_left', [
587 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_left'],
588 'capability' => 'edit_theme_options',
589 'transport' => 'postMessage',
590 'sanitize_callback' => [$this->sanitizer, 'integer']
591
592 ] );
593
594 $this->customizer->add_control( new DimensionControl(
595 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_left', [
596 'type' => 'betterdocs-dimension',
597 'section' => 'betterdocs_single_docs_settings',
598 'settings' => 'betterdocs_doc_single_2_post_content_padding_left',
599 'label' => __( 'Left', 'betterdocs' ),
600 'priority' => 114,
601 'input_attrs' => [
602 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
603 ]
604 ] )
605 );
606 }
607
608 public function doc_single_3_post_content_padding() {
609 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding', [
610 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding'],
611 'capability' => 'edit_theme_options',
612 'transport' => 'postMessage',
613 'sanitize_callback' => [$this->sanitizer, 'integer']
614
615 ] );
616
617 $this->customizer->add_control( new TitleControl(
618 $this->customizer, 'betterdocs_doc_single_3_post_content_padding', [
619 'type' => 'betterdocs-title',
620 'section' => 'betterdocs_single_docs_settings',
621 'settings' => 'betterdocs_doc_single_3_post_content_padding',
622 'label' => __( 'Content Area Inner Padding', 'betterdocs' ),
623 'priority' => 119,
624 'input_attrs' => [
625 'id' => 'betterdocs_doc_single_3_post_content_padding',
626 'class' => 'betterdocs-dimension'
627 ]
628 ] )
629 );
630
631 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_top', [
632 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_top'],
633 'capability' => 'edit_theme_options',
634 'transport' => 'postMessage',
635 'sanitize_callback' => [$this->sanitizer, 'integer']
636 ] );
637
638 $this->customizer->add_control( new DimensionControl(
639 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_top', [
640 'type' => 'betterdocs-dimension',
641 'section' => 'betterdocs_single_docs_settings',
642 'settings' => 'betterdocs_doc_single_3_post_content_padding_top',
643 'label' => __( 'Top', 'betterdocs' ),
644 'priority' => 119,
645 'input_attrs' => [
646 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
647 ]
648 ] )
649 );
650
651 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_right', [
652 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_right'],
653 'capability' => 'edit_theme_options',
654 'transport' => 'postMessage',
655 'sanitize_callback' => [$this->sanitizer, 'integer']
656
657 ] );
658
659 $this->customizer->add_control( new DimensionControl(
660 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_right', [
661 'type' => 'betterdocs-dimension',
662 'section' => 'betterdocs_single_docs_settings',
663 'settings' => 'betterdocs_doc_single_3_post_content_padding_right',
664 'label' => __( 'Right', 'betterdocs' ),
665 'priority' => 119,
666 'input_attrs' => [
667 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
668 ]
669 ] )
670 );
671
672 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_bottom', [
673 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_bottom'],
674 'capability' => 'edit_theme_options',
675 'transport' => 'postMessage',
676 'sanitize_callback' => [$this->sanitizer, 'integer']
677
678 ] );
679
680 $this->customizer->add_control( new DimensionControl(
681 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_bottom', [
682 'type' => 'betterdocs-dimension',
683 'section' => 'betterdocs_single_docs_settings',
684 'settings' => 'betterdocs_doc_single_3_post_content_padding_bottom',
685 'label' => __( 'Bottom', 'betterdocs' ),
686 'priority' => 119,
687 'input_attrs' => [
688 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
689 ]
690 ] )
691 );
692
693 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_left', [
694 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_left'],
695 'capability' => 'edit_theme_options',
696 'transport' => 'postMessage',
697 'sanitize_callback' => [$this->sanitizer, 'integer']
698
699 ] );
700
701 $this->customizer->add_control( new DimensionControl(
702 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_left', [
703 'type' => 'betterdocs-dimension',
704 'section' => 'betterdocs_single_docs_settings',
705 'settings' => 'betterdocs_doc_single_3_post_content_padding_left',
706 'label' => __( 'Left', 'betterdocs' ),
707 'priority' => 119,
708 'input_attrs' => [
709 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
710 ]
711 ] )
712 );
713 }
714
715 public function single_doc_title() {
716 $this->customizer->add_setting( 'betterdocs_single_doc_title', [
717 'default' => $this->defaults['betterdocs_single_doc_title'],
718 'sanitize_callback' => 'esc_html'
719 ] );
720
721 $this->customizer->add_control( new SeparatorControl(
722 $this->customizer, 'betterdocs_single_doc_title', [
723 'label' => __( 'Post Title', 'betterdocs' ),
724 'priority' => 124,
725 'settings' => 'betterdocs_single_doc_title',
726 'section' => 'betterdocs_single_docs_settings'
727 ] )
728 );
729 }
730
731 public function post_title_tag() {
732 $this->customizer->add_setting( 'betterdocs_post_title_tag', [
733 'default' => $this->defaults['betterdocs_post_title_tag'],
734 'capability' => 'edit_theme_options',
735 'sanitize_callback' => [$this->sanitizer, 'select']
736 ] );
737
738 $this->customizer->add_control(
739 new WP_Customize_Control(
740 $this->customizer,
741 'betterdocs_post_title_tag',
742 [
743 'label' => __( 'Title Tag', 'betterdocs' ),
744 'section' => 'betterdocs_single_docs_settings',
745 'settings' => 'betterdocs_post_title_tag',
746 'type' => 'select',
747 'choices' => [
748 'h1' => 'h1',
749 'h2' => 'h2',
750 'h3' => 'h3',
751 'h4' => 'h4',
752 'h5' => 'h5',
753 'h6' => 'h6'
754 ],
755 'priority' => 124
756 ]
757 )
758 );
759 }
760
761 public function post_title_text_transform() {
762 $this->customizer->add_setting( 'betterdocs_post_title_text_transform', [
763 'default' => $this->defaults['betterdocs_post_title_text_transform'],
764 'capability' => 'edit_theme_options',
765 'sanitize_callback' => [$this->sanitizer, 'select']
766 ] );
767
768 $this->customizer->add_control(
769 new WP_Customize_Control(
770 $this->customizer,
771 'betterdocs_post_title_text_transform',
772 [
773 'label' => __( 'Text Transform', 'betterdocs' ),
774 'section' => 'betterdocs_single_docs_settings',
775 'settings' => 'betterdocs_post_title_text_transform',
776 'type' => 'select',
777 'choices' => [
778 'uppercase' => 'Uppercase',
779 'lowercase' => 'Lowercase',
780 'capitalize' => 'Capitalize',
781 'none' => 'Normal'
782 ],
783 'priority' => 124
784 ]
785 )
786 );
787 }
788
789 public function single_doc_title_font_size() {
790 $this->customizer->add_setting( 'betterdocs_single_doc_title_font_size', [
791 'default' => $this->defaults['betterdocs_single_doc_title_font_size'],
792 'capability' => 'edit_theme_options',
793 'transport' => 'postMessage',
794 'sanitize_callback' => [$this->sanitizer, 'integer']
795
796 ] );
797
798 $this->customizer->add_control( new RangeValueControl(
799 $this->customizer, 'betterdocs_single_doc_title_font_size', [
800 'type' => 'betterdocs-range-value',
801 'section' => 'betterdocs_single_docs_settings',
802 'settings' => 'betterdocs_single_doc_title_font_size',
803 'label' => __( 'Font Size', 'betterdocs' ),
804 'priority' => 125,
805 'input_attrs' => [
806 'min' => 0,
807 'max' => 50,
808 'step' => 1,
809 'suffix' => 'px' //optional suffix
810 ]
811 ] )
812 );
813 }
814
815 public function single_doc_title_color() {
816 $this->customizer->add_setting( 'betterdocs_single_doc_title_color', [
817 'capability' => 'edit_theme_options',
818 'default' => $this->defaults['betterdocs_single_doc_title_color'],
819 'transport' => 'postMessage',
820 'sanitize_callback' => [$this->sanitizer, 'rgba']
821 ] );
822
823 $this->customizer->add_control(
824 new AlphaColorControl(
825 $this->customizer,
826 'betterdocs_single_doc_title_color',
827 [
828 'label' => __( 'Color', 'betterdocs' ),
829 'priority' => 126,
830 'section' => 'betterdocs_single_docs_settings',
831 'settings' => 'betterdocs_single_doc_title_color'
832 ]
833 )
834 );
835 }
836
837 public function doc_single_toc_title() {
838 $this->customizer->add_setting( 'betterdocs_doc_single_toc_title', [
839 'default' => $this->defaults['betterdocs_doc_single_toc_title'],
840 'sanitize_callback' => 'esc_html'
841 ] );
842
843 $this->customizer->add_control( new SeparatorControl(
844 $this->customizer, 'betterdocs_doc_single_toc_title', [
845 'label' => __( 'Table of Contents', 'betterdocs' ),
846 'priority' => 132,
847 'settings' => 'betterdocs_doc_single_toc_title',
848 'section' => 'betterdocs_single_docs_settings'
849 ] )
850 );
851 }
852
853 public function sticky_toc_width() {
854 $this->customizer->add_setting( 'betterdocs_sticky_toc_width', [
855 'default' => $this->defaults['betterdocs_sticky_toc_width'],
856 'capability' => 'edit_theme_options',
857 'transport' => 'postMessage',
858 'sanitize_callback' => [$this->sanitizer, 'integer']
859
860 ] );
861
862 $this->customizer->add_control( new RangeValueControl(
863 $this->customizer, 'betterdocs_sticky_toc_width', [
864 'type' => 'betterdocs-range-value',
865 'section' => 'betterdocs_single_docs_settings',
866 'settings' => 'betterdocs_sticky_toc_width',
867 'label' => __( 'Sticky Toc Width', 'betterdocs' ),
868 'priority' => 133,
869 'input_attrs' => [
870 'class' => '',
871 'min' => 100,
872 'max' => 500,
873 'step' => 1,
874 'suffix' => 'px' //optional suffix
875 ]
876 ] )
877 );
878 }
879
880 public function sticky_toc_zindex() {
881 $this->customizer->add_setting( 'betterdocs_sticky_toc_zindex', [
882 'default' => $this->defaults['betterdocs_sticky_toc_zindex'],
883 'capability' => 'edit_theme_options',
884 'transport' => 'postMessage',
885 'sanitize_callback' => [$this->sanitizer, 'integer']
886 ] );
887
888 $this->customizer->add_control( new NumberControl(
889 $this->customizer, 'betterdocs_sticky_toc_zindex', [
890 'type' => 'betterdocs-number',
891 'section' => 'betterdocs_single_docs_settings',
892 'settings' => 'betterdocs_sticky_toc_zindex',
893 'label' => __( 'Sticky Toc z-index', 'betterdocs' ),
894 'priority' => 134
895 ] )
896 );
897 }
898
899 public function sticky_toc_margin_top() {
900 $this->customizer->add_setting( 'betterdocs_sticky_toc_margin_top', [
901 'default' => $this->defaults['betterdocs_sticky_toc_margin_top'],
902 'capability' => 'edit_theme_options',
903 'transport' => 'postMessage',
904 'sanitize_callback' => [$this->sanitizer, 'integer']
905
906 ] );
907
908 $this->customizer->add_control( new RangeValueControl(
909 $this->customizer, 'betterdocs_sticky_toc_margin_top', [
910 'type' => 'betterdocs-range-value',
911 'section' => 'betterdocs_single_docs_settings',
912 'settings' => 'betterdocs_sticky_toc_margin_top',
913 'label' => __( 'Sticky Toc Margin Top', 'betterdocs' ),
914 'priority' => 135,
915 'input_attrs' => [
916 'class' => '',
917 'min' => 0,
918 'max' => 500,
919 'step' => 1,
920 'suffix' => 'px' //optional suffix
921 ]
922 ] )
923 );
924 }
925
926 public function toc_bg_color() {
927 $this->customizer->add_setting( 'betterdocs_toc_bg_color', [
928 'capability' => 'edit_theme_options',
929 'default' => $this->defaults['betterdocs_toc_bg_color'],
930 'transport' => 'postMessage',
931 'sanitize_callback' => [$this->sanitizer, 'rgba']
932 ] );
933
934 $this->customizer->add_control(
935 new AlphaColorControl(
936 $this->customizer,
937 'betterdocs_toc_bg_color',
938 [
939 'label' => __( 'Background Color', 'betterdocs' ),
940 'priority' => 136,
941 'section' => 'betterdocs_single_docs_settings',
942 'settings' => 'betterdocs_toc_bg_color'
943 ]
944 )
945 );
946 }
947
948 public function doc_single_toc_padding() {
949 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding', [
950 'default' => $this->defaults['betterdocs_doc_single_toc_padding'],
951 'capability' => 'edit_theme_options',
952 'transport' => 'postMessage',
953 'sanitize_callback' => [$this->sanitizer, 'integer']
954
955 ] );
956
957 $this->customizer->add_control( new TitleControl(
958 $this->customizer, 'betterdocs_doc_single_toc_padding', [
959 'type' => 'betterdocs-title',
960 'section' => 'betterdocs_single_docs_settings',
961 'settings' => 'betterdocs_doc_single_toc_padding',
962 'label' => __( 'Content Area Padding', 'betterdocs' ),
963 'priority' => 137,
964 'input_attrs' => [
965 'id' => 'betterdocs_doc_single_toc_padding',
966 'class' => 'betterdocs-dimension'
967 ]
968 ] )
969 );
970
971 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_top', [
972 'default' => $this->defaults['betterdocs_doc_single_toc_padding_top'],
973 'capability' => 'edit_theme_options',
974 'transport' => 'postMessage',
975 'sanitize_callback' => [$this->sanitizer, 'integer']
976 ] );
977
978 $this->customizer->add_control( new DimensionControl(
979 $this->customizer, 'betterdocs_doc_single_toc_padding_top', [
980 'type' => 'betterdocs-dimension',
981 'section' => 'betterdocs_single_docs_settings',
982 'settings' => 'betterdocs_doc_single_toc_padding_top',
983 'label' => __( 'Top', 'betterdocs' ),
984 'priority' => 137,
985 'input_attrs' => [
986 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
987 ]
988 ] )
989 );
990
991 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_right', [
992 'default' => $this->defaults['betterdocs_doc_single_toc_padding_right'],
993 'capability' => 'edit_theme_options',
994 'transport' => 'postMessage',
995 'sanitize_callback' => [$this->sanitizer, 'integer']
996
997 ] );
998
999 $this->customizer->add_control( new DimensionControl(
1000 $this->customizer, 'betterdocs_doc_single_toc_padding_right', [
1001 'type' => 'betterdocs-dimension',
1002 'section' => 'betterdocs_single_docs_settings',
1003 'settings' => 'betterdocs_doc_single_toc_padding_right',
1004 'label' => __( 'Right', 'betterdocs' ),
1005 'priority' => 137,
1006 'input_attrs' => [
1007 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1008 ]
1009 ] )
1010 );
1011
1012 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_bottom', [
1013 'default' => $this->defaults['betterdocs_doc_single_toc_padding_bottom'],
1014 'capability' => 'edit_theme_options',
1015 'transport' => 'postMessage',
1016 'sanitize_callback' => [$this->sanitizer, 'integer']
1017
1018 ] );
1019
1020 $this->customizer->add_control( new DimensionControl(
1021 $this->customizer, 'betterdocs_doc_single_toc_padding_bottom', [
1022 'type' => 'betterdocs-dimension',
1023 'section' => 'betterdocs_single_docs_settings',
1024 'settings' => 'betterdocs_doc_single_toc_padding_bottom',
1025 'label' => __( 'Bottom', 'betterdocs' ),
1026 'priority' => 137,
1027 'input_attrs' => [
1028 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1029 ]
1030 ] )
1031 );
1032
1033 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_left', [
1034 'default' => $this->defaults['betterdocs_doc_single_toc_padding_left'],
1035 'capability' => 'edit_theme_options',
1036 'transport' => 'postMessage',
1037 'sanitize_callback' => [$this->sanitizer, 'integer']
1038
1039 ] );
1040
1041 $this->customizer->add_control( new DimensionControl(
1042 $this->customizer, 'betterdocs_doc_single_toc_padding_left', [
1043 'type' => 'betterdocs-dimension',
1044 'section' => 'betterdocs_single_docs_settings',
1045 'settings' => 'betterdocs_doc_single_toc_padding_left',
1046 'label' => __( 'Left', 'betterdocs' ),
1047 'priority' => 137,
1048 'input_attrs' => [
1049 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1050 ]
1051 ] )
1052 );
1053 }
1054
1055 public function doc_single_toc_margin() {
1056 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin', [
1057 'default' => $this->defaults['betterdocs_doc_single_toc_margin'],
1058 'capability' => 'edit_theme_options',
1059 'transport' => 'postMessage',
1060 'sanitize_callback' => [$this->sanitizer, 'integer']
1061 ] );
1062
1063 $this->customizer->add_control( new TitleControl(
1064 $this->customizer, 'betterdocs_doc_single_toc_margin', [
1065 'type' => 'betterdocs-title',
1066 'section' => 'betterdocs_single_docs_settings',
1067 'settings' => 'betterdocs_doc_single_toc_margin',
1068 'label' => __( 'Content Area Margin', 'betterdocs' ),
1069 'priority' => 141,
1070 'input_attrs' => [
1071 'id' => 'betterdocs_doc_single_toc_margin',
1072 'class' => 'betterdocs-dimension'
1073 ]
1074 ] )
1075 );
1076
1077 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_top', [
1078 'default' => $this->defaults['betterdocs_doc_single_toc_margin_top'],
1079 'capability' => 'edit_theme_options',
1080 'transport' => 'postMessage',
1081 'sanitize_callback' => [$this->sanitizer, 'integer']
1082 ] );
1083
1084 $this->customizer->add_control( new DimensionControl(
1085 $this->customizer, 'betterdocs_doc_single_toc_margin_top', [
1086 'type' => 'betterdocs-dimension',
1087 'section' => 'betterdocs_single_docs_settings',
1088 'settings' => 'betterdocs_doc_single_toc_margin_top',
1089 'label' => __( 'Top', 'betterdocs' ),
1090 'priority' => 141,
1091 'input_attrs' => [
1092 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1093 ]
1094 ] )
1095 );
1096
1097 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_right', [
1098 'default' => $this->defaults['betterdocs_doc_single_toc_margin_right'],
1099 'capability' => 'edit_theme_options',
1100 'transport' => 'postMessage',
1101 'sanitize_callback' => [$this->sanitizer, 'integer']
1102 ] );
1103
1104 $this->customizer->add_control( new DimensionControl(
1105 $this->customizer, 'betterdocs_doc_single_toc_margin_right', [
1106 'type' => 'betterdocs-dimension',
1107 'section' => 'betterdocs_single_docs_settings',
1108 'settings' => 'betterdocs_doc_single_toc_margin_right',
1109 'label' => __( 'Right', 'betterdocs' ),
1110 'priority' => 141,
1111 'input_attrs' => [
1112 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1113 ]
1114 ] )
1115 );
1116
1117 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_bottom', [
1118 'default' => $this->defaults['betterdocs_doc_single_toc_margin_bottom'],
1119 'capability' => 'edit_theme_options',
1120 'transport' => 'postMessage',
1121 'sanitize_callback' => [$this->sanitizer, 'integer']
1122 ] );
1123
1124 $this->customizer->add_control( new DimensionControl(
1125 $this->customizer, 'betterdocs_doc_single_toc_margin_bottom', [
1126 'type' => 'betterdocs-dimension',
1127 'section' => 'betterdocs_single_docs_settings',
1128 'settings' => 'betterdocs_doc_single_toc_margin_bottom',
1129 'label' => __( 'Bottom', 'betterdocs' ),
1130 'priority' => 141,
1131 'input_attrs' => [
1132 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1133 ]
1134 ] )
1135 );
1136
1137 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_left', [
1138 'default' => $this->defaults['betterdocs_doc_single_toc_margin_left'],
1139 'capability' => 'edit_theme_options',
1140 'transport' => 'postMessage',
1141 'sanitize_callback' => [$this->sanitizer, 'integer']
1142 ] );
1143
1144 $this->customizer->add_control( new DimensionControl(
1145 $this->customizer, 'betterdocs_doc_single_toc_margin_left', [
1146 'type' => 'betterdocs-dimension',
1147 'section' => 'betterdocs_single_docs_settings',
1148 'settings' => 'betterdocs_doc_single_toc_margin_left',
1149 'label' => __( 'Left', 'betterdocs' ),
1150 'priority' => 141,
1151 'input_attrs' => [
1152 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1153 ]
1154 ] )
1155 );
1156 }
1157
1158 public function toc_title_color() {
1159 $this->customizer->add_setting( 'betterdocs_toc_title_color', [
1160 'capability' => 'edit_theme_options',
1161 'default' => $this->defaults['betterdocs_toc_title_color'],
1162 'transport' => 'postMessage',
1163 'sanitize_callback' => [$this->sanitizer, 'rgba']
1164 ] );
1165
1166 $this->customizer->add_control(
1167 new AlphaColorControl(
1168 $this->customizer,
1169 'betterdocs_toc_title_color',
1170 [
1171 'label' => __( 'Title Color', 'betterdocs' ),
1172 'priority' => 142,
1173 'section' => 'betterdocs_single_docs_settings',
1174 'settings' => 'betterdocs_toc_title_color'
1175 ]
1176 )
1177 );
1178 }
1179
1180 public function toc_title_font_size() {
1181 $this->customizer->add_setting( 'betterdocs_toc_title_font_size', [
1182 'default' => $this->defaults['betterdocs_toc_title_font_size'],
1183 'capability' => 'edit_theme_options',
1184 'transport' => 'postMessage',
1185 'sanitize_callback' => [$this->sanitizer, 'integer']
1186
1187 ] );
1188
1189 $this->customizer->add_control( new RangeValueControl(
1190 $this->customizer, 'betterdocs_toc_title_font_size', [
1191 'type' => 'betterdocs-range-value',
1192 'section' => 'betterdocs_single_docs_settings',
1193 'settings' => 'betterdocs_toc_title_font_size',
1194 'label' => __( 'Title Font Size', 'betterdocs' ),
1195 'priority' => 143,
1196 'input_attrs' => [
1197 'class' => '',
1198 'min' => 0,
1199 'max' => 50,
1200 'step' => 1,
1201 'suffix' => 'px' //optional suffix
1202 ]
1203 ] )
1204 );
1205 }
1206
1207 public function toc_list_item_color() {
1208 $this->customizer->add_setting( 'betterdocs_toc_list_item_color', [
1209 'default' => $this->defaults['betterdocs_toc_list_item_color'],
1210 'transport' => 'postMessage',
1211 'sanitize_callback' => [$this->sanitizer, 'rgba']
1212 ] );
1213
1214 $this->customizer->add_control(
1215 new AlphaColorControl(
1216 $this->customizer,
1217 'betterdocs_toc_list_item_color',
1218 [
1219 'label' => __( 'List Item Color', 'betterdocs' ),
1220 'priority' => 144,
1221 'section' => 'betterdocs_single_docs_settings',
1222 'settings' => 'betterdocs_toc_list_item_color'
1223 ]
1224 )
1225 );
1226 }
1227
1228 public function toc_list_item_hover_color() {
1229 $this->customizer->add_setting( 'betterdocs_toc_list_item_hover_color', [
1230 'capability' => 'edit_theme_options',
1231 'default' => $this->defaults['betterdocs_toc_list_item_hover_color'],
1232 'sanitize_callback' => [$this->sanitizer, 'rgba']
1233 ] );
1234
1235 $this->customizer->add_control(
1236 new AlphaColorControl(
1237 $this->customizer,
1238 'betterdocs_toc_list_item_hover_color',
1239 [
1240 'label' => __( 'List Item Hover Color', 'betterdocs' ),
1241 'priority' => 145,
1242 'section' => 'betterdocs_single_docs_settings',
1243 'settings' => 'betterdocs_toc_list_item_hover_color'
1244 ]
1245 )
1246 );
1247 }
1248
1249 public function toc_active_item_color() {
1250 $this->customizer->add_setting( 'betterdocs_toc_active_item_color', [
1251 'capability' => 'edit_theme_options',
1252 'default' => $this->defaults['betterdocs_toc_active_item_color'],
1253 'sanitize_callback' => [$this->sanitizer, 'rgba']
1254 ] );
1255
1256 $this->customizer->add_control(
1257 new AlphaColorControl(
1258 $this->customizer,
1259 'betterdocs_toc_active_item_color',
1260 [
1261 'label' => __( 'Active Item Color', 'betterdocs' ),
1262 'priority' => 146,
1263 'section' => 'betterdocs_single_docs_settings',
1264 'settings' => 'betterdocs_toc_active_item_color'
1265 ]
1266 )
1267 );
1268 }
1269
1270 public function toc_list_item_font_size() {
1271 $this->customizer->add_setting( 'betterdocs_toc_list_item_font_size', [
1272 'default' => $this->defaults['betterdocs_toc_list_item_font_size'],
1273 'capability' => 'edit_theme_options',
1274 'transport' => 'postMessage',
1275 'sanitize_callback' => [$this->sanitizer, 'integer']
1276
1277 ] );
1278
1279 $this->customizer->add_control( new RangeValueControl(
1280 $this->customizer, 'betterdocs_toc_list_item_font_size', [
1281 'type' => 'betterdocs-range-value',
1282 'section' => 'betterdocs_single_docs_settings',
1283 'settings' => 'betterdocs_toc_list_item_font_size',
1284 'label' => __( 'List Item Font Size', 'betterdocs' ),
1285 'priority' => 147,
1286 'input_attrs' => [
1287 'class' => '',
1288 'min' => 0,
1289 'max' => 50,
1290 'step' => 1,
1291 'suffix' => 'px' //optional suffix
1292 ]
1293 ] )
1294 );
1295 }
1296
1297 public function doc_single_toc_list_margin() {
1298 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin', [
1299 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin'],
1300 'capability' => 'edit_theme_options',
1301 'transport' => 'postMessage',
1302 'sanitize_callback' => [$this->sanitizer, 'integer']
1303
1304 ] );
1305
1306 $this->customizer->add_control( new TitleControl(
1307 $this->customizer, 'betterdocs_doc_single_toc_list_margin', [
1308 'type' => 'betterdocs-title',
1309 'section' => 'betterdocs_single_docs_settings',
1310 'settings' => 'betterdocs_doc_single_toc_list_margin',
1311 'label' => __( 'TOC List Margin', 'betterdocs' ),
1312 'priority' => 148,
1313 'input_attrs' => [
1314 'id' => 'betterdocs_doc_single_toc_list_margin',
1315 'class' => 'betterdocs-dimension'
1316 ]
1317 ] )
1318 );
1319
1320 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_top', [
1321 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_top'],
1322 'capability' => 'edit_theme_options',
1323 'transport' => 'postMessage',
1324 'sanitize_callback' => [$this->sanitizer, 'integer']
1325 ] );
1326
1327 $this->customizer->add_control( new DimensionControl(
1328 $this->customizer, 'betterdocs_doc_single_toc_list_margin_top', [
1329 'type' => 'betterdocs-dimension',
1330 'section' => 'betterdocs_single_docs_settings',
1331 'settings' => 'betterdocs_doc_single_toc_list_margin_top',
1332 'label' => __( 'Top', 'betterdocs' ),
1333 'priority' => 148,
1334 'input_attrs' => [
1335 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1336 ]
1337 ] )
1338 );
1339
1340 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_right', [
1341 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_right'],
1342 'capability' => 'edit_theme_options',
1343 'transport' => 'postMessage',
1344 'sanitize_callback' => [$this->sanitizer, 'integer']
1345
1346 ] );
1347
1348 $this->customizer->add_control( new DimensionControl(
1349 $this->customizer, 'betterdocs_doc_single_toc_list_margin_right', [
1350 'type' => 'betterdocs-dimension',
1351 'section' => 'betterdocs_single_docs_settings',
1352 'settings' => 'betterdocs_doc_single_toc_list_margin_right',
1353 'label' => __( 'Right', 'betterdocs' ),
1354 'priority' => 148,
1355 'input_attrs' => [
1356 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1357 ]
1358 ] )
1359 );
1360
1361 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_bottom', [
1362 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_bottom'],
1363 'capability' => 'edit_theme_options',
1364 'transport' => 'postMessage',
1365 'sanitize_callback' => [$this->sanitizer, 'integer']
1366
1367 ] );
1368
1369 $this->customizer->add_control( new DimensionControl(
1370 $this->customizer, 'betterdocs_doc_single_toc_list_margin_bottom', [
1371 'type' => 'betterdocs-dimension',
1372 'section' => 'betterdocs_single_docs_settings',
1373 'settings' => 'betterdocs_doc_single_toc_list_margin_bottom',
1374 'label' => __( 'Bottom', 'betterdocs' ),
1375 'priority' => 148,
1376 'input_attrs' => [
1377 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1378 ]
1379 ] )
1380 );
1381
1382 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_left', [
1383 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_left'],
1384 'capability' => 'edit_theme_options',
1385 'transport' => 'postMessage',
1386 'sanitize_callback' => [$this->sanitizer, 'integer']
1387
1388 ] );
1389
1390 $this->customizer->add_control( new DimensionControl(
1391 $this->customizer, 'betterdocs_doc_single_toc_list_margin_left', [
1392 'type' => 'betterdocs-dimension',
1393 'section' => 'betterdocs_single_docs_settings',
1394 'settings' => 'betterdocs_doc_single_toc_list_margin_left',
1395 'label' => __( 'Left', 'betterdocs' ),
1396 'priority' => 148,
1397 'input_attrs' => [
1398 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1399 ]
1400 ] )
1401 );
1402 }
1403
1404 public function toc_list_number_color() {
1405 $this->customizer->add_setting( 'betterdocs_toc_list_number_color', [
1406 'default' => $this->defaults['betterdocs_toc_list_number_color'],
1407 'capability' => 'edit_theme_options',
1408 'sanitize_callback' => [$this->sanitizer, 'rgba']
1409 ] );
1410
1411 $this->customizer->add_control(
1412 new AlphaColorControl(
1413 $this->customizer,
1414 'betterdocs_toc_list_number_color',
1415 [
1416 'label' => __( 'List Number Color', 'betterdocs' ),
1417 'priority' => 153,
1418 'section' => 'betterdocs_single_docs_settings',
1419 'settings' => 'betterdocs_toc_list_number_color'
1420 ]
1421 )
1422 );
1423 }
1424
1425 public function toc_list_number_font_size() {
1426 $this->customizer->add_setting( 'betterdocs_toc_list_number_font_size', [
1427 'default' => $this->defaults['betterdocs_toc_list_number_font_size'],
1428 'capability' => 'edit_theme_options',
1429 'sanitize_callback' => [$this->sanitizer, 'integer']
1430
1431 ] );
1432
1433 $this->customizer->add_control( new RangeValueControl(
1434 $this->customizer, 'betterdocs_toc_list_number_font_size', [
1435 'type' => 'betterdocs-range-value',
1436 'section' => 'betterdocs_single_docs_settings',
1437 'settings' => 'betterdocs_toc_list_number_font_size',
1438 'label' => __( 'List Number Font Size', 'betterdocs' ),
1439 'priority' => 154,
1440 'input_attrs' => [
1441 'class' => '',
1442 'min' => 0,
1443 'max' => 50,
1444 'step' => 1,
1445 'suffix' => 'px' //optional suffix
1446 ]
1447 ] )
1448 );
1449 }
1450
1451 public function toc_margin_bottom() {
1452 $this->customizer->add_setting( 'betterdocs_toc_margin_bottom', [
1453 'default' => $this->defaults['betterdocs_toc_margin_bottom'],
1454 'capability' => 'edit_theme_options',
1455 'transport' => 'postMessage',
1456 'sanitize_callback' => [$this->sanitizer, 'integer']
1457
1458 ] );
1459
1460 $this->customizer->add_control( new RangeValueControl(
1461 $this->customizer, 'betterdocs_toc_margin_bottom', [
1462 'type' => 'betterdocs-range-value',
1463 'section' => 'betterdocs_single_docs_settings',
1464 'settings' => 'betterdocs_toc_margin_bottom',
1465 'label' => __( 'TOC Margin Bottom', 'betterdocs' ),
1466 'priority' => 155,
1467 'input_attrs' => [
1468 'class' => '',
1469 'min' => 0,
1470 'max' => 500,
1471 'step' => 1,
1472 'suffix' => 'px' // optional suffix
1473 ]
1474 ] )
1475 );
1476 }
1477
1478 public function doc_single_entry_content() {
1479 $this->customizer->add_setting( 'betterdocs_doc_single_entry_content', [
1480 'default' => $this->defaults['betterdocs_doc_single_entry_content'],
1481 'sanitize_callback' => 'esc_html'
1482 ] );
1483
1484 $this->customizer->add_control( new SeparatorControl(
1485 $this->customizer, 'betterdocs_doc_single_entry_content', [
1486 'label' => __( 'Entry Content', 'betterdocs' ),
1487 'priority' => 156,
1488 'settings' => 'betterdocs_doc_single_entry_content',
1489 'section' => 'betterdocs_single_docs_settings'
1490 ] )
1491 );
1492 }
1493
1494 public function single_content_font_size() {
1495 $this->customizer->add_setting( 'betterdocs_single_content_font_size', [
1496 'default' => $this->defaults['betterdocs_single_content_font_size'],
1497 'capability' => 'edit_theme_options',
1498 'transport' => 'postMessage',
1499 'sanitize_callback' => [$this->sanitizer, 'integer']
1500
1501 ] );
1502
1503 $this->customizer->add_control( new RangeValueControl(
1504 $this->customizer, 'betterdocs_single_content_font_size', [
1505 'type' => 'betterdocs-range-value',
1506 'section' => 'betterdocs_single_docs_settings',
1507 'settings' => 'betterdocs_single_content_font_size',
1508 'label' => __( 'Font Size', 'betterdocs' ),
1509 'priority' => 157,
1510 'input_attrs' => [
1511 'class' => '',
1512 'min' => 0,
1513 'max' => 50,
1514 'step' => 1,
1515 'suffix' => 'px' // optional suffix
1516 ]
1517 ] )
1518 );
1519 }
1520
1521 public function single_content_font_color() {
1522 $this->customizer->add_setting( 'betterdocs_single_content_font_color', [
1523 'default' => $this->defaults['betterdocs_single_content_font_color'],
1524 'capability' => 'edit_theme_options',
1525 'transport' => 'postMessage',
1526 'sanitize_callback' => [$this->sanitizer, 'rgba']
1527 ] );
1528
1529 $this->customizer->add_control(
1530 new AlphaColorControl(
1531 $this->customizer,
1532 'betterdocs_single_content_font_color',
1533 [
1534 'label' => __( 'Font Color', 'betterdocs' ),
1535 'priority' => 158,
1536 'section' => 'betterdocs_single_docs_settings',
1537 'settings' => 'betterdocs_single_content_font_color'
1538 ]
1539 )
1540 );
1541 }
1542
1543 public function social_share_title() {
1544 $this->customizer->add_setting( 'betterdocs_social_share_title', [
1545 'default' => '',
1546 'sanitize_callback' => 'esc_html'
1547 ] );
1548
1549 $this->customizer->add_control(
1550 new SeparatorControl(
1551 $this->customizer, 'betterdocs_social_share_title', [
1552 'label' => __( 'Social Share', 'betterdocs' ),
1553 'priority' => 164,
1554 'settings' => 'betterdocs_social_share_title',
1555 'section' => 'betterdocs_single_docs_settings'
1556 ]
1557 )
1558 );
1559 }
1560
1561 public function post_social_share() {
1562 $this->customizer->add_setting( 'betterdocs_post_social_share', [
1563 'default' => $this->defaults['betterdocs_post_social_share'],
1564 'capability' => 'edit_theme_options',
1565 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1566 ] );
1567
1568 $this->customizer->add_control(
1569 new ToggleControl(
1570 $this->customizer, 'betterdocs_post_social_share', [
1571 'label' => __( 'Enable Social Sharing?', 'betterdocs' ),
1572 'priority' => 165,
1573 'section' => 'betterdocs_single_docs_settings',
1574 'settings' => 'betterdocs_post_social_share',
1575 'type' => 'light' // light, ios, flat
1576 ]
1577 )
1578 );
1579 }
1580
1581 public function social_sharing_text() {
1582 $this->customizer->add_setting( 'betterdocs_social_sharing_text', [
1583 'default' => $this->defaults['betterdocs_social_sharing_text'],
1584 'capability' => 'edit_theme_options',
1585 'sanitize_callback' => 'esc_html'
1586 ] );
1587
1588 $this->customizer->add_control(
1589 new SelectControl(
1590 $this->customizer,
1591 'betterdocs_social_sharing_text',
1592 [
1593 'label' => __( 'Social Sharing Title', 'betterdocs' ),
1594 'priority' => 166,
1595 'section' => 'betterdocs_single_docs_settings',
1596 'settings' => 'betterdocs_social_sharing_text',
1597 'type' => 'text'
1598 ]
1599 )
1600 );
1601 }
1602
1603 public function post_social_share_text_color() {
1604 $this->customizer->add_setting( 'betterdocs_post_social_share_text_color', [
1605 'default' => $this->defaults['betterdocs_post_social_share_text_color'],
1606 'capability' => 'edit_theme_options',
1607 'transport' => 'postMessage',
1608 'sanitize_callback' => [$this->sanitizer, 'rgba']
1609 ] );
1610
1611 $this->customizer->add_control(
1612 new AlphaColorControl(
1613 $this->customizer,
1614 'betterdocs_post_social_share_text_color',
1615 [
1616 'label' => __( 'Title Text Color', 'betterdocs' ),
1617 'priority' => 167,
1618 'section' => 'betterdocs_single_docs_settings',
1619 'settings' => 'betterdocs_post_social_share_text_color'
1620 ]
1621 )
1622 );
1623 }
1624
1625 public function post_social_share_facebook() {
1626 $this->customizer->add_setting( 'betterdocs_post_social_share_facebook', [
1627 'default' => $this->defaults['betterdocs_post_social_share_facebook'],
1628 'capability' => 'edit_theme_options',
1629 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1630 ] );
1631
1632 $this->customizer->add_control( new ToggleControl(
1633 $this->customizer, 'betterdocs_post_social_share_facebook', [
1634 'label' => __( 'Facebook Sharing', 'betterdocs' ),
1635 'priority' => 168,
1636 'section' => 'betterdocs_single_docs_settings',
1637 'settings' => 'betterdocs_post_social_share_facebook',
1638 'type' => 'light' // light, ios, flat
1639 ] )
1640 );
1641 }
1642
1643 public function post_social_share_twitter() {
1644 $this->customizer->add_setting( 'betterdocs_post_social_share_twitter', [
1645 'default' => $this->defaults['betterdocs_post_social_share_twitter'],
1646 'capability' => 'edit_theme_options',
1647 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1648 ] );
1649
1650 $this->customizer->add_control( new ToggleControl(
1651 $this->customizer, 'betterdocs_post_social_share_twitter', [
1652 'label' => __( 'Twitter Sharing', 'betterdocs' ),
1653 'priority' => 169,
1654 'section' => 'betterdocs_single_docs_settings',
1655 'settings' => 'betterdocs_post_social_share_twitter',
1656 'type' => 'light' // light, ios, flat
1657 ] )
1658 );
1659 }
1660
1661 public function post_social_share_linkedin() {
1662 $this->customizer->add_setting( 'betterdocs_post_social_share_linkedin', [
1663 'default' => $this->defaults['betterdocs_post_social_share_linkedin'],
1664 'capability' => 'edit_theme_options',
1665 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1666 ] );
1667
1668 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_linkedin', [
1669 'label' => __( 'Linkedin Sharing', 'betterdocs' ),
1670 'priority' => 170,
1671 'section' => 'betterdocs_single_docs_settings',
1672 'settings' => 'betterdocs_post_social_share_linkedin',
1673 'type' => 'light' // light, ios, flat
1674 ] ) );
1675 }
1676
1677 public function post_social_share_pinterest() {
1678 $this->customizer->add_setting( 'betterdocs_post_social_share_pinterest', [
1679 'default' => $this->defaults['betterdocs_post_social_share_pinterest'],
1680 'capability' => 'edit_theme_options',
1681 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1682 ] );
1683
1684 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_pinterest', [
1685 'label' => __( 'Pinterest Sharing', 'betterdocs' ),
1686 'priority' => 171,
1687 'section' => 'betterdocs_single_docs_settings',
1688 'settings' => 'betterdocs_post_social_share_pinterest',
1689 'type' => 'light' // light, ios, flat
1690 ] ) );
1691 }
1692
1693 public function doc_single_entry_footer() {
1694 $this->customizer->add_setting( 'betterdocs_doc_single_entry_footer', [
1695 'default' => $this->defaults['betterdocs_doc_single_entry_footer'],
1696 'sanitize_callback' => 'esc_html'
1697 ] );
1698
1699 $this->customizer->add_control( new SeparatorControl(
1700 $this->customizer, 'betterdocs_doc_single_entry_footer', [
1701 'label' => __( 'Entry Footer', 'betterdocs' ),
1702 'priority' => 172,
1703 'settings' => 'betterdocs_doc_single_entry_footer',
1704 'section' => 'betterdocs_single_docs_settings'
1705 ] )
1706 );
1707 }
1708
1709 public function single_doc_feedback_icon_font_size() {
1710 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon_font_size', [
1711 'default' => $this->defaults['betterdocs_single_doc_feedback_icon_font_size'],
1712 'capability' => 'edit_theme_options',
1713 'transport' => 'postMessage',
1714 'sanitize_callback' => [$this->sanitizer, 'integer']
1715
1716 ] );
1717
1718 $this->customizer->add_control( new RangeValueControl(
1719 $this->customizer, 'betterdocs_single_doc_feedback_icon_font_size', [
1720 'type' => 'betterdocs-range-value',
1721 'section' => 'betterdocs_single_docs_settings',
1722 'settings' => 'betterdocs_single_doc_feedback_icon_font_size',
1723 'label' => __( 'Feedback Icon Size', 'betterdocs' ),
1724 'priority' => 173,
1725 'input_attrs' => [
1726 'class' => '',
1727 'min' => 0,
1728 'max' => 100,
1729 'step' => 1,
1730 'suffix' => 'px' //optional suffix
1731 ]
1732 ] )
1733 );
1734 }
1735
1736 public function single_doc_feedback_icon() {
1737 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon', [
1738 'default' => $this->defaults['betterdocs_single_doc_feedback_icon'],
1739 'capability' => 'edit_theme_options'
1740 ] );
1741
1742 $this->customizer->add_control( new WP_Customize_Image_Control(
1743 $this->customizer, 'betterdocs_single_doc_feedback_icon', [
1744 'section' => 'betterdocs_single_docs_settings',
1745 'settings' => 'betterdocs_single_doc_feedback_icon',
1746 'label' => __( 'Feedback Icon', 'betterdocs' ),
1747 'priority' => 173
1748 ] )
1749 );
1750 }
1751
1752 public function single_doc_feedback_link_color() {
1753 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_color', [
1754 'default' => $this->defaults['betterdocs_single_doc_feedback_link_color'],
1755 'capability' => 'edit_theme_options',
1756 'transport' => 'postMessage',
1757 'sanitize_callback' => [$this->sanitizer, 'rgba']
1758 ] );
1759
1760 $this->customizer->add_control(
1761 new AlphaColorControl(
1762 $this->customizer,
1763 'betterdocs_single_doc_feedback_link_color',
1764 [
1765 'label' => __( 'Feedback Link Color', 'betterdocs' ),
1766 'priority' => 174,
1767 'section' => 'betterdocs_single_docs_settings',
1768 'settings' => 'betterdocs_single_doc_feedback_link_color'
1769 ]
1770 )
1771 );
1772 }
1773
1774 public function single_doc_feedback_link_hover_color() {
1775 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_hover_color', [
1776 'default' => $this->defaults['betterdocs_single_doc_feedback_link_hover_color'],
1777 'capability' => 'edit_theme_options',
1778 'sanitize_callback' => [$this->sanitizer, 'rgba']
1779 ] );
1780
1781 $this->customizer->add_control(
1782 new AlphaColorControl(
1783 $this->customizer,
1784 'betterdocs_single_doc_feedback_link_hover_color',
1785 [
1786 'label' => __( 'Feedback Link Hover Color', 'betterdocs' ),
1787 'priority' => 175,
1788 'section' => 'betterdocs_single_docs_settings',
1789 'settings' => 'betterdocs_single_doc_feedback_link_hover_color'
1790 ]
1791 )
1792 );
1793 }
1794
1795 public function single_doc_feedback_link_font_size() {
1796 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_font_size', [
1797 'default' => $this->defaults['betterdocs_single_doc_feedback_link_font_size'],
1798 'capability' => 'edit_theme_options',
1799 'transport' => 'postMessage',
1800 'sanitize_callback' => [$this->sanitizer, 'integer']
1801
1802 ] );
1803
1804 $this->customizer->add_control( new RangeValueControl(
1805 $this->customizer, 'betterdocs_single_doc_feedback_link_font_size', [
1806 'type' => 'betterdocs-range-value',
1807 'section' => 'betterdocs_single_docs_settings',
1808 'settings' => 'betterdocs_single_doc_feedback_link_font_size',
1809 'label' => __( 'Feedback Link Font Size', 'betterdocs' ),
1810 'priority' => 175,
1811 'input_attrs' => [
1812 'class' => '',
1813 'min' => 0,
1814 'max' => 50,
1815 'step' => 1,
1816 'suffix' => 'px' //optional suffix
1817 ]
1818 ] )
1819 );
1820 }
1821
1822 public function feedback_form_title_tag() {
1823 $this->customizer->add_setting( 'betterdocs_feedback_form_title_tag', [
1824 'default' => $this->defaults['betterdocs_feedback_form_title_tag'],
1825 'capability' => 'edit_theme_options',
1826 'sanitize_callback' => [$this->sanitizer, 'select']
1827 ] );
1828
1829 $this->customizer->add_control(
1830 new WP_Customize_Control(
1831 $this->customizer,
1832 'betterdocs_feedback_form_title_tag',
1833 [
1834 'label' => __( 'Feedback Form Title Tag', 'betterdocs' ),
1835 'section' => 'betterdocs_single_docs_settings',
1836 'settings' => 'betterdocs_feedback_form_title_tag',
1837 'priority' => 175,
1838 'type' => 'select',
1839 'choices' => [
1840 'h1' => 'h1',
1841 'h2' => 'h2',
1842 'h3' => 'h3',
1843 'h4' => 'h4',
1844 'h5' => 'h5',
1845 'h6' => 'h6'
1846 ]
1847 ]
1848 )
1849 );
1850 }
1851
1852 public function single_doc_feedback_title_font_size() {
1853 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_font_size', [
1854 'default' => $this->defaults['betterdocs_single_doc_feedback_title_font_size'],
1855 'capability' => 'edit_theme_options',
1856 'transport' => 'postMessage',
1857 'sanitize_callback' => [$this->sanitizer, 'integer']
1858
1859 ] );
1860
1861 $this->customizer->add_control( new RangeValueControl(
1862 $this->customizer, 'betterdocs_single_doc_feedback_title_font_size', [
1863 'type' => 'betterdocs-range-value',
1864 'section' => 'betterdocs_single_docs_settings',
1865 'settings' => 'betterdocs_single_doc_feedback_title_font_size',
1866 'label' => __( 'Feedback Form Title Font Size', 'betterdocs' ),
1867 'priority' => 175,
1868 'input_attrs' => [
1869 'class' => '',
1870 'min' => 0,
1871 'max' => 100,
1872 'step' => 1,
1873 'suffix' => 'px' //optional suffix
1874 ]
1875 ] )
1876 );
1877 }
1878
1879 public function single_doc_feedback_title_color() {
1880 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_color', [
1881 'default' => $this->defaults['betterdocs_single_doc_feedback_title_color'],
1882 'capability' => 'edit_theme_options',
1883 'transport' => 'postMessage',
1884 'sanitize_callback' => [$this->sanitizer, 'rgba']
1885 ] );
1886
1887 $this->customizer->add_control(
1888 new AlphaColorControl(
1889 $this->customizer,
1890 'betterdocs_single_doc_feedback_title_color',
1891 [
1892 'label' => __( 'Feedback Form Title Color', 'betterdocs' ),
1893 'priority' => 175,
1894 'section' => 'betterdocs_single_docs_settings',
1895 'settings' => 'betterdocs_single_doc_feedback_title_color'
1896 ]
1897 )
1898 );
1899 }
1900
1901 public function single_doc_navigation_color() {
1902 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_color', [
1903 'default' => $this->defaults['betterdocs_single_doc_navigation_color'],
1904 'capability' => 'edit_theme_options',
1905 'transport' => 'postMessage',
1906 'sanitize_callback' => [$this->sanitizer, 'rgba']
1907 ] );
1908
1909 $this->customizer->add_control(
1910 new AlphaColorControl(
1911 $this->customizer,
1912 'betterdocs_single_doc_navigation_color',
1913 [
1914 'label' => __( 'Navigation Color', 'betterdocs' ),
1915 'priority' => 177,
1916 'section' => 'betterdocs_single_docs_settings',
1917 'settings' => 'betterdocs_single_doc_navigation_color'
1918 ]
1919 )
1920 );
1921 }
1922
1923 public function single_doc_navigation_font_size() {
1924 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_font_size', [
1925 'default' => $this->defaults['betterdocs_single_doc_navigation_font_size'],
1926 'capability' => 'edit_theme_options',
1927 'transport' => 'postMessage',
1928 'sanitize_callback' => [$this->sanitizer, 'integer']
1929
1930 ] );
1931
1932 $this->customizer->add_control( new RangeValueControl(
1933 $this->customizer, 'betterdocs_single_doc_navigation_font_size', [
1934 'type' => 'betterdocs-range-value',
1935 'section' => 'betterdocs_single_docs_settings',
1936 'settings' => 'betterdocs_single_doc_navigation_font_size',
1937 'label' => __( 'Navigation Font Size', 'betterdocs' ),
1938 'priority' => 178,
1939 'input_attrs' => [
1940 'class' => '',
1941 'min' => 0,
1942 'max' => 50,
1943 'step' => 1,
1944 'suffix' => 'px' //optional suffix
1945 ]
1946 ] )
1947 );
1948 }
1949
1950 public function single_doc_navigation_hover_color() {
1951 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_hover_color', [
1952 'default' => $this->defaults['betterdocs_single_doc_navigation_hover_color'],
1953 'capability' => 'edit_theme_options',
1954 'sanitize_callback' => [$this->sanitizer, 'rgba']
1955 ] );
1956
1957 $this->customizer->add_control(
1958 new AlphaColorControl(
1959 $this->customizer,
1960 'betterdocs_single_doc_navigation_hover_color',
1961 [
1962 'label' => __( 'Navigation Hover Color', 'betterdocs' ),
1963 'priority' => 179,
1964 'section' => 'betterdocs_single_docs_settings',
1965 'settings' => 'betterdocs_single_doc_navigation_hover_color'
1966 ]
1967 )
1968 );
1969 }
1970
1971 public function single_doc_navigation_arrow_color() {
1972 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_color', [
1973 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_color'],
1974 'capability' => 'edit_theme_options',
1975 'transport' => 'postMessage',
1976 'sanitize_callback' => [$this->sanitizer, 'rgba']
1977 ] );
1978
1979 $this->customizer->add_control(
1980 new AlphaColorControl(
1981 $this->customizer,
1982 'betterdocs_single_doc_navigation_arrow_color',
1983 [
1984 'label' => __( 'Navigation Arrow Color', 'betterdocs' ),
1985 'priority' => 180,
1986 'section' => 'betterdocs_single_docs_settings',
1987 'settings' => 'betterdocs_single_doc_navigation_arrow_color'
1988 ]
1989 )
1990 );
1991 }
1992
1993 public function single_doc_navigation_arrow_font_size() {
1994 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_font_size', [
1995 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_font_size'],
1996 'capability' => 'edit_theme_options',
1997 'transport' => 'postMessage',
1998 'sanitize_callback' => [$this->sanitizer, 'integer']
1999
2000 ] );
2001
2002 $this->customizer->add_control( new RangeValueControl(
2003 $this->customizer, 'betterdocs_single_doc_navigation_arrow_font_size', [
2004 'type' => 'betterdocs-range-value',
2005 'section' => 'betterdocs_single_docs_settings',
2006 'settings' => 'betterdocs_single_doc_navigation_arrow_font_size',
2007 'label' => __( 'Navigation Arrow Font Size', 'betterdocs' ),
2008 'priority' => 181,
2009 'input_attrs' => [
2010 'class' => '',
2011 'min' => 0,
2012 'max' => 50,
2013 'step' => 1,
2014 'suffix' => 'px' //optional suffix
2015 ]
2016 ] )
2017 );
2018 }
2019
2020 public function betterdocs_single_doc_lu_time_color() {
2021 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_color', [
2022 'default' => $this->defaults['betterdocs_single_doc_lu_time_color'],
2023 'capability' => 'edit_theme_options',
2024 'transport' => 'postMessage',
2025 'sanitize_callback' => [$this->sanitizer, 'rgba']
2026 ] );
2027
2028 $this->customizer->add_control(
2029 new AlphaColorControl(
2030 $this->customizer,
2031 'betterdocs_single_doc_lu_time_color',
2032 [
2033 'label' => __( 'Last Updated Time Color', 'betterdocs' ),
2034 'priority' => 182,
2035 'section' => 'betterdocs_single_docs_settings',
2036 'settings' => 'betterdocs_single_doc_lu_time_color'
2037 ]
2038 )
2039 );
2040 }
2041
2042 public function single_doc_lu_time_font_size() {
2043 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_font_size', [
2044 'default' => $this->defaults['betterdocs_single_doc_lu_time_font_size'],
2045 'capability' => 'edit_theme_options',
2046 'transport' => 'postMessage',
2047 'sanitize_callback' => [$this->sanitizer, 'integer']
2048
2049 ] );
2050
2051 $this->customizer->add_control( new RangeValueControl(
2052 $this->customizer, 'betterdocs_single_doc_lu_time_font_size', [
2053 'type' => 'betterdocs-range-value',
2054 'section' => 'betterdocs_single_docs_settings',
2055 'settings' => 'betterdocs_single_doc_lu_time_font_size',
2056 'label' => __( 'Last Updated Time Font Size', 'betterdocs' ),
2057 'priority' => 183,
2058 'input_attrs' => [
2059 'class' => '',
2060 'min' => 0,
2061 'max' => 50,
2062 'step' => 1,
2063 'suffix' => 'px' //optional suffix
2064 ]
2065 ] )
2066 );
2067 }
2068
2069 public function single_doc_powered_by_color() {
2070 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_color', [
2071 'default' => $this->defaults['betterdocs_single_doc_powered_by_color'],
2072 'capability' => 'edit_theme_options',
2073 'transport' => 'postMessage',
2074 'sanitize_callback' => [$this->sanitizer, 'rgba']
2075 ] );
2076
2077 $this->customizer->add_control(
2078 new AlphaColorControl(
2079 $this->customizer,
2080 'betterdocs_single_doc_powered_by_color',
2081 [
2082 'label' => __( 'Powered by Color', 'betterdocs' ),
2083 'priority' => 184,
2084 'section' => 'betterdocs_single_docs_settings',
2085 'settings' => 'betterdocs_single_doc_powered_by_color'
2086 ]
2087 )
2088 );
2089 }
2090
2091 public function single_doc_powered_by_font_size() {
2092 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_font_size', [
2093 'default' => $this->defaults['betterdocs_single_doc_powered_by_font_size'],
2094 'capability' => 'edit_theme_options',
2095 'transport' => 'postMessage',
2096 'sanitize_callback' => [$this->sanitizer, 'integer']
2097
2098 ] );
2099
2100 $this->customizer->add_control( new RangeValueControl(
2101 $this->customizer, 'betterdocs_single_doc_powered_by_font_size', [
2102 'type' => 'betterdocs-range-value',
2103 'section' => 'betterdocs_single_docs_settings',
2104 'settings' => 'betterdocs_single_doc_powered_by_font_size',
2105 'label' => __( 'Powered By Font Size', 'betterdocs' ),
2106 'priority' => 185,
2107 'input_attrs' => [
2108 'class' => '',
2109 'min' => 0,
2110 'max' => 50,
2111 'step' => 1,
2112 'suffix' => 'px' //optional suffix
2113 ]
2114 ] )
2115 );
2116 }
2117
2118 public function single_doc_powered_by_link_color() {
2119 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_link_color', [
2120 'default' => $this->defaults['betterdocs_single_doc_powered_by_link_color'],
2121 'capability' => 'edit_theme_options',
2122 'transport' => 'postMessage',
2123 'sanitize_callback' => [$this->sanitizer, 'rgba']
2124 ] );
2125
2126 $this->customizer->add_control(
2127 new AlphaColorControl(
2128 $this->customizer,
2129 'betterdocs_single_doc_powered_by_link_color',
2130 [
2131 'label' => __( 'Powered By Link Color', 'betterdocs' ),
2132 'priority' => 186,
2133 'section' => 'betterdocs_single_docs_settings',
2134 'settings' => 'betterdocs_single_doc_powered_by_link_color'
2135 ]
2136 )
2137 );
2138 }
2139
2140 public function reactions_title() {
2141 $this->customizer->add_setting( 'betterdocs_reactions_title', [
2142 'default' => '',
2143 'sanitize_callback' => 'esc_html'
2144 ] );
2145
2146 $this->customizer->add_control( new SeparatorControl(
2147 $this->customizer, 'betterdocs_reactions_title', [
2148 'label' => __( 'Reactions', 'betterdocs' ),
2149 'priority' => 159,
2150 'settings' => 'betterdocs_reactions_title',
2151 'section' => 'betterdocs_single_docs_settings'
2152 ] )
2153 );
2154 }
2155
2156 public function post_reactions() {
2157 $this->customizer->add_setting( 'betterdocs_post_reactions', [
2158 'default' => $this->defaults['betterdocs_post_reactions'],
2159 'capability' => 'edit_theme_options',
2160 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2161 ] );
2162
2163 $this->customizer->add_control( new ToggleControl(
2164 $this->customizer, 'betterdocs_post_reactions', [
2165 'label' => __( 'Enable Reactions?', 'betterdocs' ),
2166 'priority' => 160,
2167 'section' => 'betterdocs_single_docs_settings',
2168 'settings' => 'betterdocs_post_reactions',
2169 'type' => 'light' // light, ios, flat
2170 ] )
2171 );
2172 }
2173
2174 public function post_reactions_text() {
2175 $this->customizer->add_setting( 'betterdocs_post_reactions_text', [
2176 'default' => $this->defaults['betterdocs_post_reactions_text'],
2177 'capability' => 'edit_theme_options',
2178 'sanitize_callback' => 'esc_html'
2179 ] );
2180
2181 $this->customizer->add_control(
2182 new SelectControl(
2183 $this->customizer,
2184 'betterdocs_post_reactions_text',
2185 [
2186 'label' => __( 'Reactions Title', 'betterdocs' ),
2187 'priority' => 161,
2188 'section' => 'betterdocs_single_docs_settings',
2189 'settings' => 'betterdocs_post_reactions_text',
2190 'type' => 'text'
2191 ]
2192 )
2193 );
2194 }
2195
2196 public function post_reactions_text_color() {
2197 $this->customizer->add_setting( 'betterdocs_post_reactions_text_color', [
2198 'default' => $this->defaults['betterdocs_post_reactions_text_color'],
2199 'capability' => 'edit_theme_options',
2200 'transport' => 'postMessage',
2201 'sanitize_callback' => [$this->sanitizer, 'rgba']
2202 ] );
2203
2204 $this->customizer->add_control(
2205 new AlphaColorControl(
2206 $this->customizer,
2207 'betterdocs_post_reactions_text_color',
2208 [
2209 'label' => __( 'Reactions Text Color', 'betterdocs' ),
2210 'priority' => 162,
2211 'section' => 'betterdocs_single_docs_settings',
2212 'settings' => 'betterdocs_post_reactions_text_color'
2213 ]
2214 )
2215 );
2216 }
2217
2218 public function post_reactions_icon_color() {
2219 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_color', [
2220 'default' => $this->defaults['betterdocs_post_reactions_icon_color'],
2221 'capability' => 'edit_theme_options',
2222 'transport' => 'postMessage',
2223 'sanitize_callback' => [$this->sanitizer, 'rgba']
2224 ] );
2225
2226 $this->customizer->add_control(
2227 new AlphaColorControl(
2228 $this->customizer,
2229 'betterdocs_post_reactions_icon_color',
2230 [
2231 'label' => __( 'Reactions Icon Background Color', 'betterdocs' ),
2232 'priority' => 163,
2233 'section' => 'betterdocs_single_docs_settings',
2234 'settings' => 'betterdocs_post_reactions_icon_color'
2235 ]
2236 )
2237 );
2238 }
2239
2240 public function post_reactions_icon_svg_color() {
2241 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_svg_color', [
2242 'default' => $this->defaults['betterdocs_post_reactions_icon_svg_color'],
2243 'capability' => 'edit_theme_options',
2244 'transport' => 'postMessage',
2245 'sanitize_callback' => [$this->sanitizer, 'rgba']
2246 ] );
2247
2248 $this->customizer->add_control(
2249 new AlphaColorControl(
2250 $this->customizer,
2251 'betterdocs_post_reactions_icon_svg_color',
2252 [
2253 'label' => __( 'Reactions Icon Color', 'betterdocs' ),
2254 'priority' => 163,
2255 'section' => 'betterdocs_single_docs_settings',
2256 'settings' => 'betterdocs_post_reactions_icon_svg_color'
2257 ]
2258 )
2259 );
2260 }
2261
2262 public function post_reactions_icon_hover_bg_color() {
2263 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_bg_color', [
2264 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_bg_color'],
2265 'capability' => 'edit_theme_options',
2266 'sanitize_callback' => [$this->sanitizer, 'rgba']
2267 ] );
2268
2269 $this->customizer->add_control(
2270 new AlphaColorControl(
2271 $this->customizer,
2272 'betterdocs_post_reactions_icon_hover_bg_color',
2273 [
2274 'label' => __( 'Reactions Icon Hover Background Color', 'betterdocs' ),
2275 'priority' => 163,
2276 'section' => 'betterdocs_single_docs_settings',
2277 'settings' => 'betterdocs_post_reactions_icon_hover_bg_color'
2278 ]
2279 )
2280 );
2281 }
2282
2283 public function post_reactions_icon_hover_svg_color() {
2284 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_svg_color', [
2285 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_svg_color'],
2286 'capability' => 'edit_theme_options',
2287 'sanitize_callback' => [$this->sanitizer, 'rgba']
2288 ] );
2289
2290 $this->customizer->add_control(
2291 new AlphaColorControl(
2292 $this->customizer,
2293 'betterdocs_post_reactions_icon_hover_svg_color',
2294 [
2295 'label' => __( 'Reactions Icon Hover Color', 'betterdocs' ),
2296 'priority' => 163,
2297 'section' => 'betterdocs_single_docs_settings',
2298 'settings' => 'betterdocs_post_reactions_icon_hover_svg_color'
2299 ]
2300 )
2301 );
2302 }
2303
2304 }
2305