PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.5.1
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.5.1
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.5.1, at includes/Admin/Customizer/Sections/SingleDoc.php

4,344 lines 196.3 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_estimate_reading_time_section() {
1479 $this->customizer->add_setting( 'betterdocs_doc_estimate_reading_time_section', [
1480 'default' => $this->defaults['betterdocs_doc_estimate_reading_time_section'],
1481 'sanitize_callback' => 'esc_html'
1482 ] );
1483
1484 $this->customizer->add_control( new SeparatorControl(
1485 $this->customizer, 'betterdocs_doc_estimate_reading_time_section', [
1486 'label' => __( 'Estimated Reading Time', 'betterdocs' ),
1487 'priority' => 155,
1488 'settings' => 'betterdocs_doc_estimate_reading_time_section',
1489 'section' => 'betterdocs_single_docs_settings'
1490 ] )
1491 );
1492 }
1493
1494 public function doc_erstimate_reading_time_bg_color() {
1495 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_bg_color', [
1496 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_bg_color'],
1497 'capability' => 'edit_theme_options',
1498 'transport' => 'postMessage',
1499 'sanitize_callback' => [$this->sanitizer, 'rgba']
1500 ] );
1501
1502 $this->customizer->add_control(
1503 new AlphaColorControl(
1504 $this->customizer,
1505 'betterdocs_doc_single_content_est_reading_bg_color',
1506 [
1507 'label' => __( 'Background Color', 'betterdocs' ),
1508 'priority' => 155,
1509 'section' => 'betterdocs_single_docs_settings',
1510 'settings' => 'betterdocs_doc_single_content_est_reading_bg_color'
1511 ]
1512 )
1513 );
1514 }
1515
1516 public function doc_estimate_reading_time_color() {
1517 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_color', [
1518 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_color'],
1519 'capability' => 'edit_theme_options',
1520 'transport' => 'postMessage',
1521 'sanitize_callback' => [$this->sanitizer, 'rgba']
1522 ] );
1523
1524 $this->customizer->add_control(
1525 new AlphaColorControl(
1526 $this->customizer,
1527 'betterdocs_doc_single_content_est_reading_color',
1528 [
1529 'label' => __( 'Color', 'betterdocs' ),
1530 'priority' => 155,
1531 'section' => 'betterdocs_single_docs_settings',
1532 'settings' => 'betterdocs_doc_single_content_est_reading_color'
1533 ]
1534 )
1535 );
1536 }
1537
1538 public function betterdocs_doc_single_content_est_reading_font_size() {
1539 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_font_size', [
1540 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_font_size'],
1541 'capability' => 'edit_theme_options',
1542 'transport' => 'postMessage',
1543 'sanitize_callback' => [$this->sanitizer, 'integer']
1544
1545 ] );
1546
1547 $this->customizer->add_control( new RangeValueControl(
1548 $this->customizer, 'betterdocs_doc_single_content_est_reading_font_size', [
1549 'type' => 'betterdocs-range-value',
1550 'section' => 'betterdocs_single_docs_settings',
1551 'settings' => 'betterdocs_doc_single_content_est_reading_font_size',
1552 'label' => __( 'Font Size', 'betterdocs' ),
1553 'priority' => 155,
1554 'input_attrs' => [
1555 'min' => 0,
1556 'max' => 50,
1557 'step' => 1,
1558 'suffix' => 'px' //optional suffix
1559 ]
1560 ] )
1561 );
1562 }
1563
1564 public function betterdocs_doc_single_content_est_reading_border_radius() {
1565 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_border_radius', [
1566 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_border_radius'],
1567 'capability' => 'edit_theme_options',
1568 'transport' => 'postMessage',
1569 'sanitize_callback' => [$this->sanitizer, 'integer']
1570
1571 ] );
1572
1573 $this->customizer->add_control( new RangeValueControl(
1574 $this->customizer, 'betterdocs_doc_single_content_est_reading_border_radius', [
1575 'type' => 'betterdocs-range-value',
1576 'section' => 'betterdocs_single_docs_settings',
1577 'settings' => 'betterdocs_doc_single_content_est_reading_border_radius',
1578 'label' => __( 'Border Radius', 'betterdocs' ),
1579 'input_attrs' => [
1580 'class' => '',
1581 'min' => 0,
1582 'max' => 100,
1583 'step' => 1,
1584 'suffix' => 'px' //optional suffix
1585 ],
1586 'priority' => 155
1587 ] )
1588 );
1589 }
1590
1591 public function betterdocs_doc_single_content_est_reading_font_weight() {
1592 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_font_weight', [
1593 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_font_weight'],
1594 'capability' => 'edit_theme_options',
1595 'transport' => 'postMessage',
1596 'sanitize_callback' => [$this->sanitizer, 'choices']
1597 ] );
1598
1599 $this->customizer->add_control(
1600 new WP_Customize_Control(
1601 $this->customizer,
1602 'betterdocs_doc_single_content_est_reading_font_weight',
1603 [
1604 'label' => __( 'Font Weight', 'betterdocs-pro' ),
1605 'section' => 'betterdocs_single_docs_settings',
1606 'settings' => 'betterdocs_doc_single_content_est_reading_font_weight',
1607 'type' => 'select',
1608 'choices' => [
1609 'normal' => 'Normal',
1610 '100' => '100',
1611 '200' => '200',
1612 '300' => '300',
1613 '400' => '400',
1614 '500' => '500',
1615 '600' => '600',
1616 '700' => '700',
1617 '800' => '800',
1618 '900' => '900'
1619 ],
1620 'priority' => 155
1621 ]
1622 )
1623 );
1624 }
1625
1626 public function betterdocs_doc_single_content_est_reading_margin() {
1627 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin', [
1628 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin'],
1629 'capability' => 'edit_theme_options',
1630 'transport' => 'postMessage',
1631 'sanitize_callback' => [$this->sanitizer, 'integer']
1632 ] );
1633
1634 $this->customizer->add_control( new TitleControl(
1635 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin', [
1636 'type' => 'betterdocs-title',
1637 'section' => 'betterdocs_single_docs_settings',
1638 'settings' => 'betterdocs_doc_single_content_est_reading_margin',
1639 'label' => __( 'Margin', 'betterdocs' ),
1640 'priority' => 155,
1641 'input_attrs' => [
1642 'id' => 'betterdocs_doc_single_content_est_reading_margin',
1643 'class' => 'betterdocs-dimension'
1644 ]
1645 ] )
1646 );
1647
1648 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_top', [
1649 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_top'],
1650 'capability' => 'edit_theme_options',
1651 'transport' => 'postMessage',
1652 'sanitize_callback' => [$this->sanitizer, 'integer']
1653 ] );
1654
1655 $this->customizer->add_control( new DimensionControl(
1656 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_top', [
1657 'type' => 'betterdocs-dimension',
1658 'section' => 'betterdocs_single_docs_settings',
1659 'settings' => 'betterdocs_doc_single_content_est_reading_margin_top',
1660 'label' => __( 'Top', 'betterdocs' ),
1661 'priority' => 155,
1662 'input_attrs' => [
1663 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1664 ]
1665 ] )
1666 );
1667
1668 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_right', [
1669 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_right'],
1670 'capability' => 'edit_theme_options',
1671 'transport' => 'postMessage',
1672 'sanitize_callback' => [$this->sanitizer, 'integer']
1673 ] );
1674
1675 $this->customizer->add_control( new DimensionControl(
1676 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_right', [
1677 'type' => 'betterdocs-dimension',
1678 'section' => 'betterdocs_single_docs_settings',
1679 'settings' => 'betterdocs_doc_single_content_est_reading_margin_right',
1680 'label' => __( 'Right', 'betterdocs' ),
1681 'priority' => 155,
1682 'input_attrs' => [
1683 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1684 ]
1685 ] )
1686 );
1687
1688 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_bottom', [
1689 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_bottom'],
1690 'capability' => 'edit_theme_options',
1691 'transport' => 'postMessage',
1692 'sanitize_callback' => [$this->sanitizer, 'integer']
1693 ] );
1694
1695 $this->customizer->add_control( new DimensionControl(
1696 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_bottom', [
1697 'type' => 'betterdocs-dimension',
1698 'section' => 'betterdocs_single_docs_settings',
1699 'settings' => 'betterdocs_doc_single_content_est_reading_margin_bottom',
1700 'label' => __( 'Bottom', 'betterdocs' ),
1701 'priority' => 155,
1702 'input_attrs' => [
1703 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1704 ]
1705 ] )
1706 );
1707
1708 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_left', [
1709 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_left'],
1710 'capability' => 'edit_theme_options',
1711 'transport' => 'postMessage',
1712 'sanitize_callback' => [$this->sanitizer, 'integer']
1713 ] );
1714
1715 $this->customizer->add_control( new DimensionControl(
1716 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_left', [
1717 'type' => 'betterdocs-dimension',
1718 'section' => 'betterdocs_single_docs_settings',
1719 'settings' => 'betterdocs_doc_single_content_est_reading_margin_left',
1720 'label' => __( 'Left', 'betterdocs' ),
1721 'priority' => 155,
1722 'input_attrs' => [
1723 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1724 ]
1725 ] )
1726 );
1727 }
1728
1729 public function betterdocs_doc_single_content_est_reading_padding() {
1730 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding', [
1731 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding'],
1732 'capability' => 'edit_theme_options',
1733 'transport' => 'postMessage',
1734 'sanitize_callback' => [$this->sanitizer, 'integer']
1735
1736 ] );
1737
1738 $this->customizer->add_control( new TitleControl(
1739 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding', [
1740 'type' => 'betterdocs-title',
1741 'section' => 'betterdocs_single_docs_settings',
1742 'settings' => 'betterdocs_doc_single_content_est_reading_padding',
1743 'label' => __( 'Padding', 'betterdocs' ),
1744 'priority' => 155,
1745 'input_attrs' => [
1746 'id' => 'betterdocs_doc_single_content_est_reading_padding',
1747 'class' => 'betterdocs-dimension'
1748 ]
1749 ] )
1750 );
1751
1752 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_top', [
1753 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_top'],
1754 'capability' => 'edit_theme_options',
1755 'transport' => 'postMessage',
1756 'sanitize_callback' => [$this->sanitizer, 'integer']
1757 ] );
1758
1759 $this->customizer->add_control( new DimensionControl(
1760 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_top', [
1761 'type' => 'betterdocs-dimension',
1762 'section' => 'betterdocs_single_docs_settings',
1763 'settings' => 'betterdocs_doc_single_content_est_reading_padding_top',
1764 'label' => __( 'Top', 'betterdocs' ),
1765 'priority' => 155,
1766 'input_attrs' => [
1767 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1768 ]
1769 ] )
1770 );
1771
1772 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_right', [
1773 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_right'],
1774 'capability' => 'edit_theme_options',
1775 'transport' => 'postMessage',
1776 'sanitize_callback' => [$this->sanitizer, 'integer']
1777
1778 ] );
1779
1780 $this->customizer->add_control( new DimensionControl(
1781 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_right', [
1782 'type' => 'betterdocs-dimension',
1783 'section' => 'betterdocs_single_docs_settings',
1784 'settings' => 'betterdocs_doc_single_content_est_reading_padding_right',
1785 'label' => __( 'Right', 'betterdocs' ),
1786 'priority' => 155,
1787 'input_attrs' => [
1788 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1789 ]
1790 ] )
1791 );
1792
1793 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_bottom', [
1794 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_bottom'],
1795 'capability' => 'edit_theme_options',
1796 'transport' => 'postMessage',
1797 'sanitize_callback' => [$this->sanitizer, 'integer']
1798
1799 ] );
1800
1801 $this->customizer->add_control( new DimensionControl(
1802 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_bottom', [
1803 'type' => 'betterdocs-dimension',
1804 'section' => 'betterdocs_single_docs_settings',
1805 'settings' => 'betterdocs_doc_single_content_est_reading_padding_bottom',
1806 'label' => __( 'Bottom', 'betterdocs' ),
1807 'priority' => 155,
1808 'input_attrs' => [
1809 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1810 ]
1811 ] )
1812 );
1813
1814 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_left', [
1815 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_left'],
1816 'capability' => 'edit_theme_options',
1817 'transport' => 'postMessage',
1818 'sanitize_callback' => [$this->sanitizer, 'integer']
1819
1820 ] );
1821
1822 $this->customizer->add_control( new DimensionControl(
1823 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_left', [
1824 'type' => 'betterdocs-dimension',
1825 'section' => 'betterdocs_single_docs_settings',
1826 'settings' => 'betterdocs_doc_single_content_est_reading_padding_left',
1827 'label' => __( 'Left', 'betterdocs' ),
1828 'priority' => 155,
1829 'input_attrs' => [
1830 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1831 ]
1832 ] )
1833 );
1834 }
1835
1836 public function doc_single_entry_content() {
1837 $this->customizer->add_setting( 'betterdocs_doc_single_entry_content', [
1838 'default' => $this->defaults['betterdocs_doc_single_entry_content'],
1839 'sanitize_callback' => 'esc_html'
1840 ] );
1841
1842 $this->customizer->add_control( new SeparatorControl(
1843 $this->customizer, 'betterdocs_doc_single_entry_content', [
1844 'label' => __( 'Entry Content', 'betterdocs' ),
1845 'priority' => 156,
1846 'settings' => 'betterdocs_doc_single_entry_content',
1847 'section' => 'betterdocs_single_docs_settings'
1848 ] )
1849 );
1850 }
1851
1852 public function single_content_font_size() {
1853 $this->customizer->add_setting( 'betterdocs_single_content_font_size', [
1854 'default' => $this->defaults['betterdocs_single_content_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_content_font_size', [
1863 'type' => 'betterdocs-range-value',
1864 'section' => 'betterdocs_single_docs_settings',
1865 'settings' => 'betterdocs_single_content_font_size',
1866 'label' => __( 'Font Size', 'betterdocs' ),
1867 'priority' => 157,
1868 'input_attrs' => [
1869 'class' => '',
1870 'min' => 0,
1871 'max' => 50,
1872 'step' => 1,
1873 'suffix' => 'px' // optional suffix
1874 ]
1875 ] )
1876 );
1877 }
1878
1879 public function single_content_font_color() {
1880 $this->customizer->add_setting( 'betterdocs_single_content_font_color', [
1881 'default' => $this->defaults['betterdocs_single_content_font_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_content_font_color',
1891 [
1892 'label' => __( 'Font Color', 'betterdocs' ),
1893 'priority' => 158,
1894 'section' => 'betterdocs_single_docs_settings',
1895 'settings' => 'betterdocs_single_content_font_color'
1896 ]
1897 )
1898 );
1899 }
1900
1901 public function social_share_title() {
1902 $this->customizer->add_setting( 'betterdocs_social_share_title', [
1903 'default' => '',
1904 'sanitize_callback' => 'esc_html'
1905 ] );
1906
1907 $this->customizer->add_control(
1908 new SeparatorControl(
1909 $this->customizer, 'betterdocs_social_share_title', [
1910 'label' => __( 'Social Share', 'betterdocs' ),
1911 'priority' => 164,
1912 'settings' => 'betterdocs_social_share_title',
1913 'section' => 'betterdocs_single_docs_settings'
1914 ]
1915 )
1916 );
1917 }
1918
1919 public function post_social_share() {
1920 $this->customizer->add_setting( 'betterdocs_post_social_share', [
1921 'default' => $this->defaults['betterdocs_post_social_share'],
1922 'capability' => 'edit_theme_options',
1923 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1924 ] );
1925
1926 $this->customizer->add_control(
1927 new ToggleControl(
1928 $this->customizer, 'betterdocs_post_social_share', [
1929 'label' => __( 'Enable Social Sharing?', 'betterdocs' ),
1930 'priority' => 165,
1931 'section' => 'betterdocs_single_docs_settings',
1932 'settings' => 'betterdocs_post_social_share',
1933 'type' => 'light' // light, ios, flat
1934 ]
1935 )
1936 );
1937 }
1938
1939 public function social_sharing_text() {
1940 $this->customizer->add_setting( 'betterdocs_social_sharing_text', [
1941 'default' => $this->defaults['betterdocs_social_sharing_text'],
1942 'capability' => 'edit_theme_options',
1943 'sanitize_callback' => 'esc_html'
1944 ] );
1945
1946 $this->customizer->add_control(
1947 new SelectControl(
1948 $this->customizer,
1949 'betterdocs_social_sharing_text',
1950 [
1951 'label' => __( 'Social Sharing Title', 'betterdocs' ),
1952 'priority' => 166,
1953 'section' => 'betterdocs_single_docs_settings',
1954 'settings' => 'betterdocs_social_sharing_text',
1955 'type' => 'text'
1956 ]
1957 )
1958 );
1959 }
1960
1961 public function post_social_share_text_color() {
1962 $this->customizer->add_setting( 'betterdocs_post_social_share_text_color', [
1963 'default' => $this->defaults['betterdocs_post_social_share_text_color'],
1964 'capability' => 'edit_theme_options',
1965 'transport' => 'postMessage',
1966 'sanitize_callback' => [$this->sanitizer, 'rgba']
1967 ] );
1968
1969 $this->customizer->add_control(
1970 new AlphaColorControl(
1971 $this->customizer,
1972 'betterdocs_post_social_share_text_color',
1973 [
1974 'label' => __( 'Title Text Color', 'betterdocs' ),
1975 'priority' => 167,
1976 'section' => 'betterdocs_single_docs_settings',
1977 'settings' => 'betterdocs_post_social_share_text_color'
1978 ]
1979 )
1980 );
1981 }
1982
1983 public function post_social_share_facebook() {
1984 $this->customizer->add_setting( 'betterdocs_post_social_share_facebook', [
1985 'default' => $this->defaults['betterdocs_post_social_share_facebook'],
1986 'capability' => 'edit_theme_options',
1987 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1988 ] );
1989
1990 $this->customizer->add_control( new ToggleControl(
1991 $this->customizer, 'betterdocs_post_social_share_facebook', [
1992 'label' => __( 'Facebook Sharing', 'betterdocs' ),
1993 'priority' => 168,
1994 'section' => 'betterdocs_single_docs_settings',
1995 'settings' => 'betterdocs_post_social_share_facebook',
1996 'type' => 'light' // light, ios, flat
1997 ] )
1998 );
1999 }
2000
2001 public function post_social_share_twitter() {
2002 $this->customizer->add_setting( 'betterdocs_post_social_share_twitter', [
2003 'default' => $this->defaults['betterdocs_post_social_share_twitter'],
2004 'capability' => 'edit_theme_options',
2005 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2006 ] );
2007
2008 $this->customizer->add_control( new ToggleControl(
2009 $this->customizer, 'betterdocs_post_social_share_twitter', [
2010 'label' => __( 'Twitter Sharing', 'betterdocs' ),
2011 'priority' => 169,
2012 'section' => 'betterdocs_single_docs_settings',
2013 'settings' => 'betterdocs_post_social_share_twitter',
2014 'type' => 'light' // light, ios, flat
2015 ] )
2016 );
2017 }
2018
2019 public function post_social_share_linkedin() {
2020 $this->customizer->add_setting( 'betterdocs_post_social_share_linkedin', [
2021 'default' => $this->defaults['betterdocs_post_social_share_linkedin'],
2022 'capability' => 'edit_theme_options',
2023 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2024 ] );
2025
2026 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_linkedin', [
2027 'label' => __( 'Linkedin Sharing', 'betterdocs' ),
2028 'priority' => 170,
2029 'section' => 'betterdocs_single_docs_settings',
2030 'settings' => 'betterdocs_post_social_share_linkedin',
2031 'type' => 'light' // light, ios, flat
2032 ] ) );
2033 }
2034
2035 public function post_social_share_pinterest() {
2036 $this->customizer->add_setting( 'betterdocs_post_social_share_pinterest', [
2037 'default' => $this->defaults['betterdocs_post_social_share_pinterest'],
2038 'capability' => 'edit_theme_options',
2039 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2040 ] );
2041
2042 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_pinterest', [
2043 'label' => __( 'Pinterest Sharing', 'betterdocs' ),
2044 'priority' => 171,
2045 'section' => 'betterdocs_single_docs_settings',
2046 'settings' => 'betterdocs_post_social_share_pinterest',
2047 'type' => 'light' // light, ios, flat
2048 ] ) );
2049 }
2050
2051 public function doc_single_entry_footer() {
2052 $this->customizer->add_setting( 'betterdocs_doc_single_entry_footer', [
2053 'default' => $this->defaults['betterdocs_doc_single_entry_footer'],
2054 'sanitize_callback' => 'esc_html'
2055 ] );
2056
2057 $this->customizer->add_control( new SeparatorControl(
2058 $this->customizer, 'betterdocs_doc_single_entry_footer', [
2059 'label' => __( 'Entry Footer', 'betterdocs' ),
2060 'priority' => 172,
2061 'settings' => 'betterdocs_doc_single_entry_footer',
2062 'section' => 'betterdocs_single_docs_settings'
2063 ] )
2064 );
2065 }
2066
2067 public function single_doc_feedback_icon_font_size() {
2068 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon_font_size', [
2069 'default' => $this->defaults['betterdocs_single_doc_feedback_icon_font_size'],
2070 'capability' => 'edit_theme_options',
2071 'transport' => 'postMessage',
2072 'sanitize_callback' => [$this->sanitizer, 'integer']
2073
2074 ] );
2075
2076 $this->customizer->add_control( new RangeValueControl(
2077 $this->customizer, 'betterdocs_single_doc_feedback_icon_font_size', [
2078 'type' => 'betterdocs-range-value',
2079 'section' => 'betterdocs_single_docs_settings',
2080 'settings' => 'betterdocs_single_doc_feedback_icon_font_size',
2081 'label' => __( 'Feedback Icon Size', 'betterdocs' ),
2082 'priority' => 173,
2083 'input_attrs' => [
2084 'class' => '',
2085 'min' => 0,
2086 'max' => 100,
2087 'step' => 1,
2088 'suffix' => 'px' //optional suffix
2089 ]
2090 ] )
2091 );
2092 }
2093
2094 public function single_doc_feedback_icon() {
2095 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon', [
2096 'default' => $this->defaults['betterdocs_single_doc_feedback_icon'],
2097 'capability' => 'edit_theme_options'
2098 ] );
2099
2100 $this->customizer->add_control( new WP_Customize_Image_Control(
2101 $this->customizer, 'betterdocs_single_doc_feedback_icon', [
2102 'section' => 'betterdocs_single_docs_settings',
2103 'settings' => 'betterdocs_single_doc_feedback_icon',
2104 'label' => __( 'Feedback Icon', 'betterdocs' ),
2105 'priority' => 173
2106 ] )
2107 );
2108 }
2109
2110 public function single_doc_feedback_link_color() {
2111 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_color', [
2112 'default' => $this->defaults['betterdocs_single_doc_feedback_link_color'],
2113 'capability' => 'edit_theme_options',
2114 'transport' => 'postMessage',
2115 'sanitize_callback' => [$this->sanitizer, 'rgba']
2116 ] );
2117
2118 $this->customizer->add_control(
2119 new AlphaColorControl(
2120 $this->customizer,
2121 'betterdocs_single_doc_feedback_link_color',
2122 [
2123 'label' => __( 'Feedback Link Color', 'betterdocs' ),
2124 'priority' => 174,
2125 'section' => 'betterdocs_single_docs_settings',
2126 'settings' => 'betterdocs_single_doc_feedback_link_color'
2127 ]
2128 )
2129 );
2130 }
2131
2132 public function single_doc_feedback_link_hover_color() {
2133 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_hover_color', [
2134 'default' => $this->defaults['betterdocs_single_doc_feedback_link_hover_color'],
2135 'capability' => 'edit_theme_options',
2136 'sanitize_callback' => [$this->sanitizer, 'rgba']
2137 ] );
2138
2139 $this->customizer->add_control(
2140 new AlphaColorControl(
2141 $this->customizer,
2142 'betterdocs_single_doc_feedback_link_hover_color',
2143 [
2144 'label' => __( 'Feedback Link Hover Color', 'betterdocs' ),
2145 'priority' => 175,
2146 'section' => 'betterdocs_single_docs_settings',
2147 'settings' => 'betterdocs_single_doc_feedback_link_hover_color'
2148 ]
2149 )
2150 );
2151 }
2152
2153 public function single_doc_feedback_link_font_size() {
2154 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_font_size', [
2155 'default' => $this->defaults['betterdocs_single_doc_feedback_link_font_size'],
2156 'capability' => 'edit_theme_options',
2157 'transport' => 'postMessage',
2158 'sanitize_callback' => [$this->sanitizer, 'integer']
2159
2160 ] );
2161
2162 $this->customizer->add_control( new RangeValueControl(
2163 $this->customizer, 'betterdocs_single_doc_feedback_link_font_size', [
2164 'type' => 'betterdocs-range-value',
2165 'section' => 'betterdocs_single_docs_settings',
2166 'settings' => 'betterdocs_single_doc_feedback_link_font_size',
2167 'label' => __( 'Feedback Link Font Size', 'betterdocs' ),
2168 'priority' => 175,
2169 'input_attrs' => [
2170 'class' => '',
2171 'min' => 0,
2172 'max' => 50,
2173 'step' => 1,
2174 'suffix' => 'px' //optional suffix
2175 ]
2176 ] )
2177 );
2178 }
2179
2180 public function feedback_form_title_tag() {
2181 $this->customizer->add_setting( 'betterdocs_feedback_form_title_tag', [
2182 'default' => $this->defaults['betterdocs_feedback_form_title_tag'],
2183 'capability' => 'edit_theme_options',
2184 'sanitize_callback' => [$this->sanitizer, 'select']
2185 ] );
2186
2187 $this->customizer->add_control(
2188 new WP_Customize_Control(
2189 $this->customizer,
2190 'betterdocs_feedback_form_title_tag',
2191 [
2192 'label' => __( 'Feedback Form Title Tag', 'betterdocs' ),
2193 'section' => 'betterdocs_single_docs_settings',
2194 'settings' => 'betterdocs_feedback_form_title_tag',
2195 'priority' => 175,
2196 'type' => 'select',
2197 'choices' => [
2198 'h1' => 'h1',
2199 'h2' => 'h2',
2200 'h3' => 'h3',
2201 'h4' => 'h4',
2202 'h5' => 'h5',
2203 'h6' => 'h6'
2204 ]
2205 ]
2206 )
2207 );
2208 }
2209
2210 public function single_doc_feedback_title_font_size() {
2211 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_font_size', [
2212 'default' => $this->defaults['betterdocs_single_doc_feedback_title_font_size'],
2213 'capability' => 'edit_theme_options',
2214 'transport' => 'postMessage',
2215 'sanitize_callback' => [$this->sanitizer, 'integer']
2216
2217 ] );
2218
2219 $this->customizer->add_control( new RangeValueControl(
2220 $this->customizer, 'betterdocs_single_doc_feedback_title_font_size', [
2221 'type' => 'betterdocs-range-value',
2222 'section' => 'betterdocs_single_docs_settings',
2223 'settings' => 'betterdocs_single_doc_feedback_title_font_size',
2224 'label' => __( 'Feedback Form Title Font Size', 'betterdocs' ),
2225 'priority' => 175,
2226 'input_attrs' => [
2227 'class' => '',
2228 'min' => 0,
2229 'max' => 100,
2230 'step' => 1,
2231 'suffix' => 'px' //optional suffix
2232 ]
2233 ] )
2234 );
2235 }
2236
2237 public function single_doc_feedback_title_color() {
2238 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_color', [
2239 'default' => $this->defaults['betterdocs_single_doc_feedback_title_color'],
2240 'capability' => 'edit_theme_options',
2241 'transport' => 'postMessage',
2242 'sanitize_callback' => [$this->sanitizer, 'rgba']
2243 ] );
2244
2245 $this->customizer->add_control(
2246 new AlphaColorControl(
2247 $this->customizer,
2248 'betterdocs_single_doc_feedback_title_color',
2249 [
2250 'label' => __( 'Feedback Form Title Color', 'betterdocs' ),
2251 'priority' => 175,
2252 'section' => 'betterdocs_single_docs_settings',
2253 'settings' => 'betterdocs_single_doc_feedback_title_color'
2254 ]
2255 )
2256 );
2257 }
2258
2259 public function single_doc_navigation_color() {
2260 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_color', [
2261 'default' => $this->defaults['betterdocs_single_doc_navigation_color'],
2262 'capability' => 'edit_theme_options',
2263 'transport' => 'postMessage',
2264 'sanitize_callback' => [$this->sanitizer, 'rgba']
2265 ] );
2266
2267 $this->customizer->add_control(
2268 new AlphaColorControl(
2269 $this->customizer,
2270 'betterdocs_single_doc_navigation_color',
2271 [
2272 'label' => __( 'Navigation Color', 'betterdocs' ),
2273 'priority' => 177,
2274 'section' => 'betterdocs_single_docs_settings',
2275 'settings' => 'betterdocs_single_doc_navigation_color'
2276 ]
2277 )
2278 );
2279 }
2280
2281 public function single_doc_navigation_font_size() {
2282 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_font_size', [
2283 'default' => $this->defaults['betterdocs_single_doc_navigation_font_size'],
2284 'capability' => 'edit_theme_options',
2285 'transport' => 'postMessage',
2286 'sanitize_callback' => [$this->sanitizer, 'integer']
2287
2288 ] );
2289
2290 $this->customizer->add_control( new RangeValueControl(
2291 $this->customizer, 'betterdocs_single_doc_navigation_font_size', [
2292 'type' => 'betterdocs-range-value',
2293 'section' => 'betterdocs_single_docs_settings',
2294 'settings' => 'betterdocs_single_doc_navigation_font_size',
2295 'label' => __( 'Navigation Font Size', 'betterdocs' ),
2296 'priority' => 178,
2297 'input_attrs' => [
2298 'class' => '',
2299 'min' => 0,
2300 'max' => 50,
2301 'step' => 1,
2302 'suffix' => 'px' //optional suffix
2303 ]
2304 ] )
2305 );
2306 }
2307
2308 public function single_doc_navigation_hover_color() {
2309 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_hover_color', [
2310 'default' => $this->defaults['betterdocs_single_doc_navigation_hover_color'],
2311 'capability' => 'edit_theme_options',
2312 'sanitize_callback' => [$this->sanitizer, 'rgba']
2313 ] );
2314
2315 $this->customizer->add_control(
2316 new AlphaColorControl(
2317 $this->customizer,
2318 'betterdocs_single_doc_navigation_hover_color',
2319 [
2320 'label' => __( 'Navigation Hover Color', 'betterdocs' ),
2321 'priority' => 179,
2322 'section' => 'betterdocs_single_docs_settings',
2323 'settings' => 'betterdocs_single_doc_navigation_hover_color'
2324 ]
2325 )
2326 );
2327 }
2328
2329 public function single_doc_navigation_arrow_color() {
2330 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_color', [
2331 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_color'],
2332 'capability' => 'edit_theme_options',
2333 'transport' => 'postMessage',
2334 'sanitize_callback' => [$this->sanitizer, 'rgba']
2335 ] );
2336
2337 $this->customizer->add_control(
2338 new AlphaColorControl(
2339 $this->customizer,
2340 'betterdocs_single_doc_navigation_arrow_color',
2341 [
2342 'label' => __( 'Navigation Arrow Color', 'betterdocs' ),
2343 'priority' => 180,
2344 'section' => 'betterdocs_single_docs_settings',
2345 'settings' => 'betterdocs_single_doc_navigation_arrow_color'
2346 ]
2347 )
2348 );
2349 }
2350
2351 public function single_doc_navigation_arrow_font_size() {
2352 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_font_size', [
2353 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_font_size'],
2354 'capability' => 'edit_theme_options',
2355 'transport' => 'postMessage',
2356 'sanitize_callback' => [$this->sanitizer, 'integer']
2357
2358 ] );
2359
2360 $this->customizer->add_control( new RangeValueControl(
2361 $this->customizer, 'betterdocs_single_doc_navigation_arrow_font_size', [
2362 'type' => 'betterdocs-range-value',
2363 'section' => 'betterdocs_single_docs_settings',
2364 'settings' => 'betterdocs_single_doc_navigation_arrow_font_size',
2365 'label' => __( 'Navigation Arrow Font Size', 'betterdocs' ),
2366 'priority' => 181,
2367 'input_attrs' => [
2368 'class' => '',
2369 'min' => 0,
2370 'max' => 50,
2371 'step' => 1,
2372 'suffix' => 'px' //optional suffix
2373 ]
2374 ] )
2375 );
2376 }
2377
2378 public function betterdocs_single_doc_lu_time_color() {
2379 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_color', [
2380 'default' => $this->defaults['betterdocs_single_doc_lu_time_color'],
2381 'capability' => 'edit_theme_options',
2382 'transport' => 'postMessage',
2383 'sanitize_callback' => [$this->sanitizer, 'rgba']
2384 ] );
2385
2386 $this->customizer->add_control(
2387 new AlphaColorControl(
2388 $this->customizer,
2389 'betterdocs_single_doc_lu_time_color',
2390 [
2391 'label' => __( 'Last Updated Time Color', 'betterdocs' ),
2392 'priority' => 182,
2393 'section' => 'betterdocs_single_docs_settings',
2394 'settings' => 'betterdocs_single_doc_lu_time_color'
2395 ]
2396 )
2397 );
2398 }
2399
2400 public function single_doc_lu_time_font_size() {
2401 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_font_size', [
2402 'default' => $this->defaults['betterdocs_single_doc_lu_time_font_size'],
2403 'capability' => 'edit_theme_options',
2404 'transport' => 'postMessage',
2405 'sanitize_callback' => [$this->sanitizer, 'integer']
2406
2407 ] );
2408
2409 $this->customizer->add_control( new RangeValueControl(
2410 $this->customizer, 'betterdocs_single_doc_lu_time_font_size', [
2411 'type' => 'betterdocs-range-value',
2412 'section' => 'betterdocs_single_docs_settings',
2413 'settings' => 'betterdocs_single_doc_lu_time_font_size',
2414 'label' => __( 'Last Updated Time Font Size', 'betterdocs' ),
2415 'priority' => 183,
2416 'input_attrs' => [
2417 'class' => '',
2418 'min' => 0,
2419 'max' => 50,
2420 'step' => 1,
2421 'suffix' => 'px' //optional suffix
2422 ]
2423 ] )
2424 );
2425 }
2426
2427 public function single_doc_powered_by_color() {
2428 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_color', [
2429 'default' => $this->defaults['betterdocs_single_doc_powered_by_color'],
2430 'capability' => 'edit_theme_options',
2431 'transport' => 'postMessage',
2432 'sanitize_callback' => [$this->sanitizer, 'rgba']
2433 ] );
2434
2435 $this->customizer->add_control(
2436 new AlphaColorControl(
2437 $this->customizer,
2438 'betterdocs_single_doc_powered_by_color',
2439 [
2440 'label' => __( 'Powered by Color', 'betterdocs' ),
2441 'priority' => 184,
2442 'section' => 'betterdocs_single_docs_settings',
2443 'settings' => 'betterdocs_single_doc_powered_by_color'
2444 ]
2445 )
2446 );
2447 }
2448
2449 public function single_doc_powered_by_font_size() {
2450 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_font_size', [
2451 'default' => $this->defaults['betterdocs_single_doc_powered_by_font_size'],
2452 'capability' => 'edit_theme_options',
2453 'transport' => 'postMessage',
2454 'sanitize_callback' => [$this->sanitizer, 'integer']
2455
2456 ] );
2457
2458 $this->customizer->add_control( new RangeValueControl(
2459 $this->customizer, 'betterdocs_single_doc_powered_by_font_size', [
2460 'type' => 'betterdocs-range-value',
2461 'section' => 'betterdocs_single_docs_settings',
2462 'settings' => 'betterdocs_single_doc_powered_by_font_size',
2463 'label' => __( 'Powered By Font Size', 'betterdocs' ),
2464 'priority' => 185,
2465 'input_attrs' => [
2466 'class' => '',
2467 'min' => 0,
2468 'max' => 50,
2469 'step' => 1,
2470 'suffix' => 'px' //optional suffix
2471 ]
2472 ] )
2473 );
2474 }
2475
2476 public function single_doc_powered_by_link_color() {
2477 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_link_color', [
2478 'default' => $this->defaults['betterdocs_single_doc_powered_by_link_color'],
2479 'capability' => 'edit_theme_options',
2480 'transport' => 'postMessage',
2481 'sanitize_callback' => [$this->sanitizer, 'rgba']
2482 ] );
2483
2484 $this->customizer->add_control(
2485 new AlphaColorControl(
2486 $this->customizer,
2487 'betterdocs_single_doc_powered_by_link_color',
2488 [
2489 'label' => __( 'Powered By Link Color', 'betterdocs' ),
2490 'priority' => 186,
2491 'section' => 'betterdocs_single_docs_settings',
2492 'settings' => 'betterdocs_single_doc_powered_by_link_color'
2493 ]
2494 )
2495 );
2496 }
2497
2498 public function reactions_title() {
2499 $this->customizer->add_setting( 'betterdocs_reactions_title', [
2500 'default' => '',
2501 'sanitize_callback' => 'esc_html'
2502 ] );
2503
2504 $this->customizer->add_control( new SeparatorControl(
2505 $this->customizer, 'betterdocs_reactions_title', [
2506 'label' => __( 'Reactions', 'betterdocs' ),
2507 'priority' => 159,
2508 'settings' => 'betterdocs_reactions_title',
2509 'section' => 'betterdocs_single_docs_settings'
2510 ] )
2511 );
2512 }
2513
2514 public function post_reactions() {
2515 $this->customizer->add_setting( 'betterdocs_post_reactions', [
2516 'default' => $this->defaults['betterdocs_post_reactions'],
2517 'capability' => 'edit_theme_options',
2518 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2519 ] );
2520
2521 $this->customizer->add_control( new ToggleControl(
2522 $this->customizer, 'betterdocs_post_reactions', [
2523 'label' => __( 'Enable Reactions?', 'betterdocs' ),
2524 'priority' => 160,
2525 'section' => 'betterdocs_single_docs_settings',
2526 'settings' => 'betterdocs_post_reactions',
2527 'type' => 'light' // light, ios, flat
2528 ] )
2529 );
2530 }
2531
2532 public function post_reactions_text() {
2533 $this->customizer->add_setting( 'betterdocs_post_reactions_text', [
2534 'default' => $this->defaults['betterdocs_post_reactions_text'],
2535 'capability' => 'edit_theme_options',
2536 'sanitize_callback' => 'esc_html'
2537 ] );
2538
2539 $this->customizer->add_control(
2540 new SelectControl(
2541 $this->customizer,
2542 'betterdocs_post_reactions_text',
2543 [
2544 'label' => __( 'Reactions Title', 'betterdocs' ),
2545 'priority' => 161,
2546 'section' => 'betterdocs_single_docs_settings',
2547 'settings' => 'betterdocs_post_reactions_text',
2548 'type' => 'text'
2549 ]
2550 )
2551 );
2552 }
2553
2554 public function post_reactions_text_color() {
2555 $this->customizer->add_setting( 'betterdocs_post_reactions_text_color', [
2556 'default' => $this->defaults['betterdocs_post_reactions_text_color'],
2557 'capability' => 'edit_theme_options',
2558 'transport' => 'postMessage',
2559 'sanitize_callback' => [$this->sanitizer, 'rgba']
2560 ] );
2561
2562 $this->customizer->add_control(
2563 new AlphaColorControl(
2564 $this->customizer,
2565 'betterdocs_post_reactions_text_color',
2566 [
2567 'label' => __( 'Reactions Text Color', 'betterdocs' ),
2568 'priority' => 162,
2569 'section' => 'betterdocs_single_docs_settings',
2570 'settings' => 'betterdocs_post_reactions_text_color'
2571 ]
2572 )
2573 );
2574 }
2575
2576 public function post_reactions_icon_color() {
2577 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_color', [
2578 'default' => $this->defaults['betterdocs_post_reactions_icon_color'],
2579 'capability' => 'edit_theme_options',
2580 'transport' => 'postMessage',
2581 'sanitize_callback' => [$this->sanitizer, 'rgba']
2582 ] );
2583
2584 $this->customizer->add_control(
2585 new AlphaColorControl(
2586 $this->customizer,
2587 'betterdocs_post_reactions_icon_color',
2588 [
2589 'label' => __( 'Reactions Icon Background Color', 'betterdocs' ),
2590 'priority' => 163,
2591 'section' => 'betterdocs_single_docs_settings',
2592 'settings' => 'betterdocs_post_reactions_icon_color'
2593 ]
2594 )
2595 );
2596 }
2597
2598 public function post_reactions_icon_svg_color() {
2599 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_svg_color', [
2600 'default' => $this->defaults['betterdocs_post_reactions_icon_svg_color'],
2601 'capability' => 'edit_theme_options',
2602 'transport' => 'postMessage',
2603 'sanitize_callback' => [$this->sanitizer, 'rgba']
2604 ] );
2605
2606 $this->customizer->add_control(
2607 new AlphaColorControl(
2608 $this->customizer,
2609 'betterdocs_post_reactions_icon_svg_color',
2610 [
2611 'label' => __( 'Reactions Icon Color', 'betterdocs' ),
2612 'priority' => 163,
2613 'section' => 'betterdocs_single_docs_settings',
2614 'settings' => 'betterdocs_post_reactions_icon_svg_color'
2615 ]
2616 )
2617 );
2618 }
2619
2620 public function post_reactions_icon_hover_bg_color() {
2621 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_bg_color', [
2622 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_bg_color'],
2623 'capability' => 'edit_theme_options',
2624 'sanitize_callback' => [$this->sanitizer, 'rgba']
2625 ] );
2626
2627 $this->customizer->add_control(
2628 new AlphaColorControl(
2629 $this->customizer,
2630 'betterdocs_post_reactions_icon_hover_bg_color',
2631 [
2632 'label' => __( 'Reactions Icon Hover Background Color', 'betterdocs' ),
2633 'priority' => 163,
2634 'section' => 'betterdocs_single_docs_settings',
2635 'settings' => 'betterdocs_post_reactions_icon_hover_bg_color'
2636 ]
2637 )
2638 );
2639 }
2640
2641 public function post_reactions_icon_hover_svg_color() {
2642 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_svg_color', [
2643 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_svg_color'],
2644 'capability' => 'edit_theme_options',
2645 'sanitize_callback' => [$this->sanitizer, 'rgba']
2646 ] );
2647
2648 $this->customizer->add_control(
2649 new AlphaColorControl(
2650 $this->customizer,
2651 'betterdocs_post_reactions_icon_hover_svg_color',
2652 [
2653 'label' => __( 'Reactions Icon Hover Color', 'betterdocs' ),
2654 'priority' => 163,
2655 'section' => 'betterdocs_single_docs_settings',
2656 'settings' => 'betterdocs_post_reactions_icon_hover_svg_color'
2657 ]
2658 )
2659 );
2660 }
2661
2662 public function attachments_heading() {
2663 $this->customizer->add_setting( 'betterdocs_single_doc_attachment_heading', [
2664 'default' => '',
2665 'sanitize_callback' => 'esc_html'
2666 ] );
2667
2668 $this->customizer->add_control( new SeparatorControl(
2669 $this->customizer, 'betterdocs_single_doc_attachment_heading', [
2670 'label' => __( 'Attachments', 'betterdocs' ),
2671 'priority' => 163,
2672 'settings' => 'betterdocs_single_doc_attachment_heading',
2673 'section' => 'betterdocs_single_docs_settings'
2674 ] )
2675 );
2676 }
2677
2678 public function betterdocs_doc_single_attachment_content_bg_color() {
2679 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_bg_color', [
2680 'default' => $this->defaults['betterdocs_doc_single_attachment_content_bg_color'],
2681 'capability' => 'edit_theme_options',
2682 'transport' => 'postMessage',
2683 'sanitize_callback' => [$this->sanitizer, 'rgba']
2684 ] );
2685
2686 $this->customizer->add_control(
2687 new AlphaColorControl(
2688 $this->customizer,
2689 'betterdocs_doc_single_attachment_content_bg_color',
2690 [
2691 'label' => __( 'Content Background Color', 'betterdocs' ),
2692 'section' => 'betterdocs_single_docs_settings',
2693 'settings' => 'betterdocs_doc_single_attachment_content_bg_color',
2694 'priority' => 163
2695 ]
2696 )
2697 );
2698 }
2699
2700 public function betterdocs_doc_single_attachment_content_padding() {
2701 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding', [
2702 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding'],
2703 'capability' => 'edit_theme_options',
2704 'transport' => 'postMessage',
2705 'sanitize_callback' => [$this->sanitizer, 'integer']
2706
2707 ] );
2708
2709 $this->customizer->add_control( new TitleControl(
2710 $this->customizer, 'betterdocs_doc_single_attachment_content_padding', [
2711 'type' => 'betterdocs-title',
2712 'section' => 'betterdocs_single_docs_settings',
2713 'settings' => 'betterdocs_doc_single_attachment_content_padding',
2714 'label' => __( 'Content Padding', 'betterdocs' ),
2715 'priority' => 163,
2716 'input_attrs' => [
2717 'id' => 'betterdocs_doc_single_attachment_content_padding',
2718 'class' => 'betterdocs-dimension'
2719 ]
2720 ] )
2721 );
2722
2723 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_top', [
2724 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_top'],
2725 'capability' => 'edit_theme_options',
2726 'transport' => 'postMessage',
2727 'sanitize_callback' => [$this->sanitizer, 'integer']
2728 ] );
2729
2730 $this->customizer->add_control( new DimensionControl(
2731 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_top', [
2732 'type' => 'betterdocs-dimension',
2733 'section' => 'betterdocs_single_docs_settings',
2734 'settings' => 'betterdocs_doc_single_attachment_content_padding_top',
2735 'label' => __( 'Top', 'betterdocs' ),
2736 'priority' => 163,
2737 'input_attrs' => [
2738 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2739 ]
2740 ] )
2741 );
2742
2743 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_right', [
2744 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_right'],
2745 'capability' => 'edit_theme_options',
2746 'transport' => 'postMessage',
2747 'sanitize_callback' => [$this->sanitizer, 'integer']
2748
2749 ] );
2750
2751 $this->customizer->add_control( new DimensionControl(
2752 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_right', [
2753 'type' => 'betterdocs-dimension',
2754 'section' => 'betterdocs_single_docs_settings',
2755 'settings' => 'betterdocs_doc_single_attachment_content_padding_right',
2756 'label' => __( 'Right', 'betterdocs' ),
2757 'priority' => 163,
2758 'input_attrs' => [
2759 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2760 ]
2761 ] )
2762 );
2763
2764 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_bottom', [
2765 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_bottom'],
2766 'capability' => 'edit_theme_options',
2767 'transport' => 'postMessage',
2768 'sanitize_callback' => [$this->sanitizer, 'integer']
2769
2770 ] );
2771
2772 $this->customizer->add_control( new DimensionControl(
2773 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_bottom', [
2774 'type' => 'betterdocs-dimension',
2775 'section' => 'betterdocs_single_docs_settings',
2776 'settings' => 'betterdocs_doc_single_attachment_content_padding_bottom',
2777 'label' => __( 'Bottom', 'betterdocs' ),
2778 'priority' => 163,
2779 'input_attrs' => [
2780 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2781 ]
2782 ] )
2783 );
2784
2785 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_left', [
2786 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_left'],
2787 'capability' => 'edit_theme_options',
2788 'transport' => 'postMessage',
2789 'sanitize_callback' => [$this->sanitizer, 'integer']
2790
2791 ] );
2792
2793 $this->customizer->add_control( new DimensionControl(
2794 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_left', [
2795 'type' => 'betterdocs-dimension',
2796 'section' => 'betterdocs_single_docs_settings',
2797 'settings' => 'betterdocs_doc_single_attachment_content_padding_left',
2798 'label' => __( 'Left', 'betterdocs' ),
2799 'priority' => 163,
2800 'input_attrs' => [
2801 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2802 ]
2803 ] )
2804 );
2805 }
2806
2807 public function betterdocs_doc_single_attachment_content_margin() {
2808 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin', [
2809 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin'],
2810 'capability' => 'edit_theme_options',
2811 'transport' => 'postMessage',
2812 'sanitize_callback' => [$this->sanitizer, 'integer']
2813
2814 ] );
2815
2816 $this->customizer->add_control( new TitleControl(
2817 $this->customizer, 'betterdocs_doc_single_attachment_content_margin', [
2818 'type' => 'betterdocs-title',
2819 'section' => 'betterdocs_single_docs_settings',
2820 'settings' => 'betterdocs_doc_single_attachment_content_margin',
2821 'label' => __( 'Content Margin', 'betterdocs' ),
2822 'priority' => 163,
2823 'input_attrs' => [
2824 'id' => 'betterdocs_doc_single_attachment_content_margin',
2825 'class' => 'betterdocs-dimension'
2826 ]
2827 ] )
2828 );
2829
2830 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_top', [
2831 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_top'],
2832 'capability' => 'edit_theme_options',
2833 'transport' => 'postMessage',
2834 'sanitize_callback' => [$this->sanitizer, 'integer']
2835 ] );
2836
2837 $this->customizer->add_control( new DimensionControl(
2838 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_top', [
2839 'type' => 'betterdocs-dimension',
2840 'section' => 'betterdocs_single_docs_settings',
2841 'settings' => 'betterdocs_doc_single_attachment_content_margin_top',
2842 'label' => __( 'Top', 'betterdocs' ),
2843 'priority' => 163,
2844 'input_attrs' => [
2845 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2846 ]
2847 ] )
2848 );
2849
2850 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_right', [
2851 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_right'],
2852 'capability' => 'edit_theme_options',
2853 'transport' => 'postMessage',
2854 'sanitize_callback' => [$this->sanitizer, 'integer']
2855
2856 ] );
2857
2858 $this->customizer->add_control( new DimensionControl(
2859 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_right', [
2860 'type' => 'betterdocs-dimension',
2861 'section' => 'betterdocs_single_docs_settings',
2862 'settings' => 'betterdocs_doc_single_attachment_content_margin_right',
2863 'label' => __( 'Right', 'betterdocs' ),
2864 'priority' => 163,
2865 'input_attrs' => [
2866 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2867 ]
2868 ] )
2869 );
2870
2871 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_bottom', [
2872 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_bottom'],
2873 'capability' => 'edit_theme_options',
2874 'transport' => 'postMessage',
2875 'sanitize_callback' => [$this->sanitizer, 'integer']
2876
2877 ] );
2878
2879 $this->customizer->add_control( new DimensionControl(
2880 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_bottom', [
2881 'type' => 'betterdocs-dimension',
2882 'section' => 'betterdocs_single_docs_settings',
2883 'settings' => 'betterdocs_doc_single_attachment_content_margin_bottom',
2884 'label' => __( 'Bottom', 'betterdocs' ),
2885 'priority' => 163,
2886 'input_attrs' => [
2887 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2888 ]
2889 ] )
2890 );
2891
2892 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_left', [
2893 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_left'],
2894 'capability' => 'edit_theme_options',
2895 'transport' => 'postMessage',
2896 'sanitize_callback' => [$this->sanitizer, 'integer']
2897
2898 ] );
2899
2900 $this->customizer->add_control( new DimensionControl(
2901 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_left', [
2902 'type' => 'betterdocs-dimension',
2903 'section' => 'betterdocs_single_docs_settings',
2904 'settings' => 'betterdocs_doc_single_attachment_content_margin_left',
2905 'label' => __( 'Left', 'betterdocs' ),
2906 'priority' => 163,
2907 'input_attrs' => [
2908 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2909 ]
2910 ] )
2911 );
2912 }
2913
2914 public function betterdocs_doc_single_attachment_label_color() {
2915 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_color', [
2916 'default' => $this->defaults['betterdocs_doc_single_attachment_label_color'],
2917 'capability' => 'edit_theme_options',
2918 'transport' => 'postMessage',
2919 'sanitize_callback' => [$this->sanitizer, 'rgba']
2920 ] );
2921
2922 $this->customizer->add_control(
2923 new AlphaColorControl(
2924 $this->customizer,
2925 'betterdocs_doc_single_attachment_label_color',
2926 [
2927 'label' => __( 'Label Color', 'betterdocs' ),
2928 'section' => 'betterdocs_single_docs_settings',
2929 'settings' => 'betterdocs_doc_single_attachment_label_color',
2930 'priority' => 163
2931 ]
2932 )
2933 );
2934 }
2935
2936 public function betterdocs_doc_single_attachment_label_padding() {
2937 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding', [
2938 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding'],
2939 'capability' => 'edit_theme_options',
2940 'transport' => 'postMessage',
2941 'sanitize_callback' => [$this->sanitizer, 'integer']
2942
2943 ] );
2944
2945 $this->customizer->add_control( new TitleControl(
2946 $this->customizer, 'betterdocs_doc_single_attachment_label_padding', [
2947 'type' => 'betterdocs-title',
2948 'section' => 'betterdocs_single_docs_settings',
2949 'settings' => 'betterdocs_doc_single_attachment_label_padding',
2950 'label' => __( 'Label Padding', 'betterdocs' ),
2951 'priority' => 163,
2952 'input_attrs' => [
2953 'id' => 'betterdocs_doc_single_attachment_label_padding',
2954 'class' => 'betterdocs-dimension'
2955 ]
2956 ] )
2957 );
2958
2959 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_top', [
2960 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_top'],
2961 'capability' => 'edit_theme_options',
2962 'transport' => 'postMessage',
2963 'sanitize_callback' => [$this->sanitizer, 'integer']
2964 ] );
2965
2966 $this->customizer->add_control( new DimensionControl(
2967 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_top', [
2968 'type' => 'betterdocs-dimension',
2969 'section' => 'betterdocs_single_docs_settings',
2970 'settings' => 'betterdocs_doc_single_attachment_label_padding_top',
2971 'label' => __( 'Top', 'betterdocs' ),
2972 'priority' => 163,
2973 'input_attrs' => [
2974 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2975 ]
2976 ] )
2977 );
2978
2979 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_right', [
2980 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_right'],
2981 'capability' => 'edit_theme_options',
2982 'transport' => 'postMessage',
2983 'sanitize_callback' => [$this->sanitizer, 'integer']
2984
2985 ] );
2986
2987 $this->customizer->add_control( new DimensionControl(
2988 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_right', [
2989 'type' => 'betterdocs-dimension',
2990 'section' => 'betterdocs_single_docs_settings',
2991 'settings' => 'betterdocs_doc_single_attachment_label_padding_right',
2992 'label' => __( 'Right', 'betterdocs' ),
2993 'priority' => 163,
2994 'input_attrs' => [
2995 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2996 ]
2997 ] )
2998 );
2999
3000 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_bottom', [
3001 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_bottom'],
3002 'capability' => 'edit_theme_options',
3003 'transport' => 'postMessage',
3004 'sanitize_callback' => [$this->sanitizer, 'integer']
3005
3006 ] );
3007
3008 $this->customizer->add_control( new DimensionControl(
3009 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_bottom', [
3010 'type' => 'betterdocs-dimension',
3011 'section' => 'betterdocs_single_docs_settings',
3012 'settings' => 'betterdocs_doc_single_attachment_label_padding_bottom',
3013 'label' => __( 'Bottom', 'betterdocs' ),
3014 'priority' => 163,
3015 'input_attrs' => [
3016 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
3017 ]
3018 ] )
3019 );
3020
3021 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_left', [
3022 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_left'],
3023 'capability' => 'edit_theme_options',
3024 'transport' => 'postMessage',
3025 'sanitize_callback' => [$this->sanitizer, 'integer']
3026
3027 ] );
3028
3029 $this->customizer->add_control( new DimensionControl(
3030 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_left', [
3031 'type' => 'betterdocs-dimension',
3032 'section' => 'betterdocs_single_docs_settings',
3033 'settings' => 'betterdocs_doc_single_attachment_label_padding_left',
3034 'label' => __( 'Left', 'betterdocs' ),
3035 'priority' => 163,
3036 'input_attrs' => [
3037 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
3038 ]
3039 ] )
3040 );
3041 }
3042
3043 public function betterdocs_doc_single_attachment_label_margin() {
3044 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin', [
3045 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin'],
3046 'capability' => 'edit_theme_options',
3047 'transport' => 'postMessage',
3048 'sanitize_callback' => [$this->sanitizer, 'integer']
3049
3050 ] );
3051
3052 $this->customizer->add_control( new TitleControl(
3053 $this->customizer, 'betterdocs_doc_single_attachment_label_margin', [
3054 'type' => 'betterdocs-title',
3055 'section' => 'betterdocs_single_docs_settings',
3056 'settings' => 'betterdocs_doc_single_attachment_label_margin',
3057 'label' => __( 'Label Margin', 'betterdocs' ),
3058 'priority' => 163,
3059 'input_attrs' => [
3060 'id' => 'betterdocs_doc_single_attachment_label_margin',
3061 'class' => 'betterdocs-dimension'
3062 ]
3063 ] )
3064 );
3065
3066 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_top', [
3067 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_top'],
3068 'capability' => 'edit_theme_options',
3069 'transport' => 'postMessage',
3070 'sanitize_callback' => [$this->sanitizer, 'integer']
3071 ] );
3072
3073 $this->customizer->add_control( new DimensionControl(
3074 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_top', [
3075 'type' => 'betterdocs-dimension',
3076 'section' => 'betterdocs_single_docs_settings',
3077 'settings' => 'betterdocs_doc_single_attachment_label_margin_top',
3078 'label' => __( 'Top', 'betterdocs' ),
3079 'priority' => 163,
3080 'input_attrs' => [
3081 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3082 ]
3083 ] )
3084 );
3085
3086 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_right', [
3087 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_right'],
3088 'capability' => 'edit_theme_options',
3089 'transport' => 'postMessage',
3090 'sanitize_callback' => [$this->sanitizer, 'integer']
3091
3092 ] );
3093
3094 $this->customizer->add_control( new DimensionControl(
3095 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_right', [
3096 'type' => 'betterdocs-dimension',
3097 'section' => 'betterdocs_single_docs_settings',
3098 'settings' => 'betterdocs_doc_single_attachment_label_margin_right',
3099 'label' => __( 'Right', 'betterdocs' ),
3100 'priority' => 163,
3101 'input_attrs' => [
3102 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3103 ]
3104 ] )
3105 );
3106
3107 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_bottom', [
3108 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_bottom'],
3109 'capability' => 'edit_theme_options',
3110 'transport' => 'postMessage',
3111 'sanitize_callback' => [$this->sanitizer, 'integer']
3112 ] );
3113
3114 $this->customizer->add_control( new DimensionControl(
3115 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_bottom', [
3116 'type' => 'betterdocs-dimension',
3117 'section' => 'betterdocs_single_docs_settings',
3118 'settings' => 'betterdocs_doc_single_attachment_label_margin_bottom',
3119 'label' => __( 'Bottom', 'betterdocs' ),
3120 'priority' => 163,
3121 'input_attrs' => [
3122 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3123 ]
3124 ] )
3125 );
3126
3127 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_left', [
3128 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_left'],
3129 'capability' => 'edit_theme_options',
3130 'transport' => 'postMessage',
3131 'sanitize_callback' => [$this->sanitizer, 'integer']
3132 ] );
3133
3134 $this->customizer->add_control( new DimensionControl(
3135 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_left', [
3136 'type' => 'betterdocs-dimension',
3137 'section' => 'betterdocs_single_docs_settings',
3138 'settings' => 'betterdocs_doc_single_attachment_label_margin_left',
3139 'label' => __( 'Left', 'betterdocs' ),
3140 'priority' => 163,
3141 'input_attrs' => [
3142 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3143 ]
3144 ] )
3145 );
3146 }
3147
3148 public function betterdocs_doc_single_attachment_list_font_size() {
3149 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_font_size', [
3150 'default' => $this->defaults['betterdocs_doc_single_attachment_list_font_size'],
3151 'capability' => 'edit_theme_options',
3152 'transport' => 'postMessage',
3153 'sanitize_callback' => [$this->sanitizer, 'integer']
3154
3155 ] );
3156
3157 $this->customizer->add_control( new RangeValueControl(
3158 $this->customizer, 'betterdocs_doc_single_attachment_list_font_size', [
3159 'type' => 'betterdocs-range-value',
3160 'section' => 'betterdocs_single_docs_settings',
3161 'settings' => 'betterdocs_doc_single_attachment_list_font_size',
3162 'label' => __( 'List Font Size', 'betterdocs' ),
3163 'priority' => 163,
3164 'input_attrs' => [
3165 'min' => 0,
3166 'max' => 50,
3167 'step' => 1,
3168 'suffix' => 'px' //optional suffix
3169 ]
3170 ] )
3171 );
3172 }
3173
3174 public function betterdocs_doc_single_attachment_list_font_weight() {
3175 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_font_weight', [
3176 'default' => $this->defaults['betterdocs_doc_single_attachment_list_font_weight'],
3177 'capability' => 'edit_theme_options',
3178 'sanitize_callback' => [$this->sanitizer, 'choices']
3179 ] );
3180
3181 $this->customizer->add_control(
3182 new WP_Customize_Control(
3183 $this->customizer,
3184 'betterdocs_doc_single_attachment_list_font_weight',
3185 [
3186 'label' => __( 'List Font Weight', 'betterdocs-pro' ),
3187 'section' => 'betterdocs_single_docs_settings',
3188 'settings' => 'betterdocs_doc_single_attachment_list_font_weight',
3189 'type' => 'select',
3190 'choices' => [
3191 'normal' => 'Normal',
3192 '100' => '100',
3193 '200' => '200',
3194 '300' => '300',
3195 '400' => '400',
3196 '500' => '500',
3197 '600' => '600',
3198 '700' => '700',
3199 '800' => '800',
3200 '900' => '900'
3201 ],
3202 'priority' => 163
3203 ]
3204 )
3205 );
3206 }
3207
3208 public function betterdocs_doc_single_attachment_list_extension_color() {
3209 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_color', [
3210 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_color'],
3211 'capability' => 'edit_theme_options',
3212 'transport' => 'postMessage',
3213 'sanitize_callback' => [$this->sanitizer, 'rgba']
3214 ] );
3215
3216 $this->customizer->add_control(
3217 new AlphaColorControl(
3218 $this->customizer,
3219 'betterdocs_doc_single_attachment_list_extension_color',
3220 [
3221 'label' => __( 'Extension Color', 'betterdocs' ),
3222 'section' => 'betterdocs_single_docs_settings',
3223 'settings' => 'betterdocs_doc_single_attachment_list_extension_color',
3224 'priority' => 163
3225 ]
3226 )
3227 );
3228 }
3229 public function betterdocs_doc_single_attachment_list_extension_font_size() {
3230 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_font_size', [
3231 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_font_size'],
3232 'capability' => 'edit_theme_options',
3233 'transport' => 'postMessage',
3234 'sanitize_callback' => [$this->sanitizer, 'integer']
3235
3236 ] );
3237
3238 $this->customizer->add_control( new RangeValueControl(
3239 $this->customizer, 'betterdocs_doc_single_attachment_list_extension_font_size', [
3240 'type' => 'betterdocs-range-value',
3241 'section' => 'betterdocs_single_docs_settings',
3242 'settings' => 'betterdocs_doc_single_attachment_list_extension_font_size',
3243 'label' => __( 'Extension Font Size', 'betterdocs' ),
3244 'priority' => 163,
3245 'input_attrs' => [
3246 'min' => 0,
3247 'max' => 50,
3248 'step' => 1,
3249 'suffix' => 'px' //optional suffix
3250 ]
3251 ] )
3252 );
3253 }
3254
3255 public function betterdocs_doc_single_attachment_list_extension_font_weight() {
3256 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_font_weight', [
3257 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_font_weight'],
3258 'capability' => 'edit_theme_options',
3259 'sanitize_callback' => [$this->sanitizer, 'choices']
3260 ] );
3261
3262 $this->customizer->add_control(
3263 new WP_Customize_Control(
3264 $this->customizer,
3265 'betterdocs_doc_single_attachment_list_extension_font_weight',
3266 [
3267 'label' => __( 'Extension Font Weight', 'betterdocs-pro' ),
3268 'section' => 'betterdocs_single_docs_settings',
3269 'settings' => 'betterdocs_doc_single_attachment_list_extension_font_weight',
3270 'type' => 'select',
3271 'choices' => [
3272 'normal' => 'Normal',
3273 '100' => '100',
3274 '200' => '200',
3275 '300' => '300',
3276 '400' => '400',
3277 '500' => '500',
3278 '600' => '600',
3279 '700' => '700',
3280 '800' => '800',
3281 '900' => '900'
3282 ],
3283 'priority' => 163
3284 ]
3285 )
3286 );
3287 }
3288
3289 public function betterdocs_doc_single_attachment_list_color() {
3290 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_color', [
3291 'default' => $this->defaults['betterdocs_doc_single_attachment_list_color'],
3292 'capability' => 'edit_theme_options',
3293 'transport' => 'postMessage',
3294 'sanitize_callback' => [$this->sanitizer, 'rgba']
3295 ] );
3296
3297 $this->customizer->add_control(
3298 new AlphaColorControl(
3299 $this->customizer,
3300 'betterdocs_doc_single_attachment_list_color',
3301 [
3302 'label' => __( 'List Color', 'betterdocs' ),
3303 'section' => 'betterdocs_single_docs_settings',
3304 'settings' => 'betterdocs_doc_single_attachment_list_color',
3305 'priority' => 163
3306 ]
3307 )
3308 );
3309 }
3310
3311 public function betterdocs_doc_single_attachment_list_background_color() {
3312 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_background_color', [
3313 'default' => $this->defaults['betterdocs_doc_single_attachment_list_background_color'],
3314 'capability' => 'edit_theme_options',
3315 'transport' => 'postMessage',
3316 'sanitize_callback' => [$this->sanitizer, 'rgba']
3317 ] );
3318
3319 $this->customizer->add_control(
3320 new AlphaColorControl(
3321 $this->customizer,
3322 'betterdocs_doc_single_attachment_list_background_color',
3323 [
3324 'label' => __( 'List Background Color', 'betterdocs' ),
3325 'section' => 'betterdocs_single_docs_settings',
3326 'settings' => 'betterdocs_doc_single_attachment_list_background_color',
3327 'priority' => 163
3328 ]
3329 )
3330 );
3331 }
3332
3333 public function betterdocs_doc_single_attachment_list_padding() {
3334 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding', [
3335 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding'],
3336 'capability' => 'edit_theme_options',
3337 'transport' => 'postMessage',
3338 'sanitize_callback' => [$this->sanitizer, 'integer']
3339
3340 ] );
3341
3342 $this->customizer->add_control( new TitleControl(
3343 $this->customizer, 'betterdocs_doc_single_attachment_list_padding', [
3344 'type' => 'betterdocs-title',
3345 'section' => 'betterdocs_single_docs_settings',
3346 'settings' => 'betterdocs_doc_single_attachment_list_padding',
3347 'label' => __( 'List Padding', 'betterdocs' ),
3348 'priority' => 163,
3349 'input_attrs' => [
3350 'id' => 'betterdocs_doc_single_attachment_list_padding',
3351 'class' => 'betterdocs-dimension'
3352 ]
3353 ] )
3354 );
3355
3356 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_top', [
3357 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_top'],
3358 'capability' => 'edit_theme_options',
3359 'transport' => 'postMessage',
3360 'sanitize_callback' => [$this->sanitizer, 'integer']
3361 ] );
3362
3363 $this->customizer->add_control( new DimensionControl(
3364 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_top', [
3365 'type' => 'betterdocs-dimension',
3366 'section' => 'betterdocs_single_docs_settings',
3367 'settings' => 'betterdocs_doc_single_attachment_list_padding_top',
3368 'label' => __( 'Top', 'betterdocs' ),
3369 'priority' => 163,
3370 'input_attrs' => [
3371 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3372 ]
3373 ] )
3374 );
3375
3376 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_right', [
3377 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_right'],
3378 'capability' => 'edit_theme_options',
3379 'transport' => 'postMessage',
3380 'sanitize_callback' => [$this->sanitizer, 'integer']
3381
3382 ] );
3383
3384 $this->customizer->add_control( new DimensionControl(
3385 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_right', [
3386 'type' => 'betterdocs-dimension',
3387 'section' => 'betterdocs_single_docs_settings',
3388 'settings' => 'betterdocs_doc_single_attachment_list_padding_right',
3389 'label' => __( 'Right', 'betterdocs' ),
3390 'priority' => 163,
3391 'input_attrs' => [
3392 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3393 ]
3394 ] )
3395 );
3396
3397 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_bottom', [
3398 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_bottom'],
3399 'capability' => 'edit_theme_options',
3400 'transport' => 'postMessage',
3401 'sanitize_callback' => [$this->sanitizer, 'integer']
3402 ] );
3403
3404 $this->customizer->add_control( new DimensionControl(
3405 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_bottom', [
3406 'type' => 'betterdocs-dimension',
3407 'section' => 'betterdocs_single_docs_settings',
3408 'settings' => 'betterdocs_doc_single_attachment_list_padding_bottom',
3409 'label' => __( 'Bottom', 'betterdocs' ),
3410 'priority' => 163,
3411 'input_attrs' => [
3412 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3413 ]
3414 ] )
3415 );
3416
3417 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_left', [
3418 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_left'],
3419 'capability' => 'edit_theme_options',
3420 'transport' => 'postMessage',
3421 'sanitize_callback' => [$this->sanitizer, 'integer']
3422 ] );
3423
3424 $this->customizer->add_control( new DimensionControl(
3425 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_left', [
3426 'type' => 'betterdocs-dimension',
3427 'section' => 'betterdocs_single_docs_settings',
3428 'settings' => 'betterdocs_doc_single_attachment_list_padding_left',
3429 'label' => __( 'Left', 'betterdocs' ),
3430 'priority' => 163,
3431 'input_attrs' => [
3432 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3433 ]
3434 ] )
3435 );
3436 }
3437
3438 public function betterdocs_doc_single_attachment_list_margin() {
3439 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin', [
3440 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin'],
3441 'capability' => 'edit_theme_options',
3442 'transport' => 'postMessage',
3443 'sanitize_callback' => [$this->sanitizer, 'integer']
3444
3445 ] );
3446
3447 $this->customizer->add_control( new TitleControl(
3448 $this->customizer, 'betterdocs_doc_single_attachment_list_margin', [
3449 'type' => 'betterdocs-title',
3450 'section' => 'betterdocs_single_docs_settings',
3451 'settings' => 'betterdocs_doc_single_attachment_list_margin',
3452 'label' => __( 'List Margin', 'betterdocs' ),
3453 'priority' => 163,
3454 'input_attrs' => [
3455 'id' => 'betterdocs_doc_single_attachment_list_margin',
3456 'class' => 'betterdocs-dimension'
3457 ]
3458 ] )
3459 );
3460
3461 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_top', [
3462 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_top'],
3463 'capability' => 'edit_theme_options',
3464 'transport' => 'postMessage',
3465 'sanitize_callback' => [$this->sanitizer, 'integer']
3466 ] );
3467
3468 $this->customizer->add_control( new DimensionControl(
3469 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_top', [
3470 'type' => 'betterdocs-dimension',
3471 'section' => 'betterdocs_single_docs_settings',
3472 'settings' => 'betterdocs_doc_single_attachment_list_margin_top',
3473 'label' => __( 'Top', 'betterdocs' ),
3474 'priority' => 163,
3475 'input_attrs' => [
3476 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3477 ]
3478 ] )
3479 );
3480
3481 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_right', [
3482 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_right'],
3483 'capability' => 'edit_theme_options',
3484 'transport' => 'postMessage',
3485 'sanitize_callback' => [$this->sanitizer, 'integer']
3486
3487 ] );
3488
3489 $this->customizer->add_control( new DimensionControl(
3490 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_right', [
3491 'type' => 'betterdocs-dimension',
3492 'section' => 'betterdocs_single_docs_settings',
3493 'settings' => 'betterdocs_doc_single_attachment_list_margin_right',
3494 'label' => __( 'Right', 'betterdocs' ),
3495 'priority' => 163,
3496 'input_attrs' => [
3497 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3498 ]
3499 ] )
3500 );
3501
3502 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_bottom', [
3503 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_bottom'],
3504 'capability' => 'edit_theme_options',
3505 'transport' => 'postMessage',
3506 'sanitize_callback' => [$this->sanitizer, 'integer']
3507 ] );
3508
3509 $this->customizer->add_control( new DimensionControl(
3510 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_bottom', [
3511 'type' => 'betterdocs-dimension',
3512 'section' => 'betterdocs_single_docs_settings',
3513 'settings' => 'betterdocs_doc_single_attachment_list_margin_bottom',
3514 'label' => __( 'Bottom', 'betterdocs' ),
3515 'priority' => 163,
3516 'input_attrs' => [
3517 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3518 ]
3519 ] )
3520 );
3521
3522 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_left', [
3523 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_left'],
3524 'capability' => 'edit_theme_options',
3525 'transport' => 'postMessage',
3526 'sanitize_callback' => [$this->sanitizer, 'integer']
3527 ] );
3528
3529 $this->customizer->add_control( new DimensionControl(
3530 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_left', [
3531 'type' => 'betterdocs-dimension',
3532 'section' => 'betterdocs_single_docs_settings',
3533 'settings' => 'betterdocs_doc_single_attachment_list_margin_left',
3534 'label' => __( 'Left', 'betterdocs' ),
3535 'priority' => 163,
3536 'input_attrs' => [
3537 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3538 ]
3539 ] )
3540 );
3541 }
3542
3543 public function betterdocs_doc_single_related_docs_heading() {
3544 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_heading', [
3545 'default' => 'betterdocs_doc_single_related_docs_heading',
3546 'sanitize_callback' => 'esc_html'
3547 ] );
3548
3549 $this->customizer->add_control( new SeparatorControl(
3550 $this->customizer, 'betterdocs_doc_single_related_docs_heading', [
3551 'label' => __( 'Related Docs', 'betterdocs' ),
3552 'priority' => 163,
3553 'settings' => 'betterdocs_doc_single_related_docs_heading',
3554 'section' => 'betterdocs_single_docs_settings'
3555 ] )
3556 );
3557 }
3558
3559 public function betterdocs_doc_single_related_docs_content_bg_color() {
3560 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_bg_color', [
3561 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_bg_color'],
3562 'capability' => 'edit_theme_options',
3563 'transport' => 'postMessage',
3564 'sanitize_callback' => [$this->sanitizer, 'rgba']
3565 ] );
3566
3567 $this->customizer->add_control(
3568 new AlphaColorControl(
3569 $this->customizer,
3570 'betterdocs_doc_single_related_docs_content_bg_color',
3571 [
3572 'label' => __( 'Content Background Color', 'betterdocs' ),
3573 'section' => 'betterdocs_single_docs_settings',
3574 'settings' => 'betterdocs_doc_single_related_docs_content_bg_color',
3575 'priority' => 163
3576 ]
3577 )
3578 );
3579 }
3580
3581 public function betterdocs_doc_single_related_docs_content_padding() {
3582 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding', [
3583 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding'],
3584 'capability' => 'edit_theme_options',
3585 'transport' => 'postMessage',
3586 'sanitize_callback' => [$this->sanitizer, 'integer']
3587
3588 ] );
3589
3590 $this->customizer->add_control( new TitleControl(
3591 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding', [
3592 'type' => 'betterdocs-title',
3593 'section' => 'betterdocs_single_docs_settings',
3594 'settings' => 'betterdocs_doc_single_related_docs_content_padding',
3595 'label' => __( 'Content Padding', 'betterdocs' ),
3596 'priority' => 163,
3597 'input_attrs' => [
3598 'id' => 'betterdocs_doc_single_related_docs_content_padding',
3599 'class' => 'betterdocs-dimension'
3600 ]
3601 ] )
3602 );
3603
3604 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_top', [
3605 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_top'],
3606 'capability' => 'edit_theme_options',
3607 'transport' => 'postMessage',
3608 'sanitize_callback' => [$this->sanitizer, 'integer']
3609 ] );
3610
3611 $this->customizer->add_control( new DimensionControl(
3612 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_top', [
3613 'type' => 'betterdocs-dimension',
3614 'section' => 'betterdocs_single_docs_settings',
3615 'settings' => 'betterdocs_doc_single_related_docs_content_padding_top',
3616 'label' => __( 'Top', 'betterdocs' ),
3617 'priority' => 163,
3618 'input_attrs' => [
3619 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3620 ]
3621 ] )
3622 );
3623
3624 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_right', [
3625 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_right'],
3626 'capability' => 'edit_theme_options',
3627 'transport' => 'postMessage',
3628 'sanitize_callback' => [$this->sanitizer, 'integer']
3629
3630 ] );
3631
3632 $this->customizer->add_control( new DimensionControl(
3633 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_right', [
3634 'type' => 'betterdocs-dimension',
3635 'section' => 'betterdocs_single_docs_settings',
3636 'settings' => 'betterdocs_doc_single_related_docs_content_padding_right',
3637 'label' => __( 'Right', 'betterdocs' ),
3638 'priority' => 163,
3639 'input_attrs' => [
3640 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3641 ]
3642 ] )
3643 );
3644
3645 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_bottom', [
3646 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_bottom'],
3647 'capability' => 'edit_theme_options',
3648 'transport' => 'postMessage',
3649 'sanitize_callback' => [$this->sanitizer, 'integer']
3650
3651 ] );
3652
3653 $this->customizer->add_control( new DimensionControl(
3654 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_bottom', [
3655 'type' => 'betterdocs-dimension',
3656 'section' => 'betterdocs_single_docs_settings',
3657 'settings' => 'betterdocs_doc_single_related_docs_content_padding_bottom',
3658 'label' => __( 'Bottom', 'betterdocs' ),
3659 'priority' => 163,
3660 'input_attrs' => [
3661 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3662 ]
3663 ] )
3664 );
3665
3666 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_left', [
3667 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_left'],
3668 'capability' => 'edit_theme_options',
3669 'transport' => 'postMessage',
3670 'sanitize_callback' => [$this->sanitizer, 'integer']
3671
3672 ] );
3673
3674 $this->customizer->add_control( new DimensionControl(
3675 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_left', [
3676 'type' => 'betterdocs-dimension',
3677 'section' => 'betterdocs_single_docs_settings',
3678 'settings' => 'betterdocs_doc_single_related_docs_content_padding_left',
3679 'label' => __( 'Left', 'betterdocs' ),
3680 'priority' => 163,
3681 'input_attrs' => [
3682 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3683 ]
3684 ] )
3685 );
3686 }
3687
3688 public function betterdocs_doc_single_related_docs_content_margin() {
3689 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin', [
3690 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin'],
3691 'capability' => 'edit_theme_options',
3692 'transport' => 'postMessage',
3693 'sanitize_callback' => [$this->sanitizer, 'integer']
3694
3695 ] );
3696
3697 $this->customizer->add_control( new TitleControl(
3698 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin', [
3699 'type' => 'betterdocs-title',
3700 'section' => 'betterdocs_single_docs_settings',
3701 'settings' => 'betterdocs_doc_single_related_docs_content_margin',
3702 'label' => __( 'Content Margin', 'betterdocs' ),
3703 'priority' => 163,
3704 'input_attrs' => [
3705 'id' => 'betterdocs_doc_single_related_docs_content_margin',
3706 'class' => 'betterdocs-dimension'
3707 ]
3708 ] )
3709 );
3710
3711 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_top', [
3712 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_top'],
3713 'capability' => 'edit_theme_options',
3714 'transport' => 'postMessage',
3715 'sanitize_callback' => [$this->sanitizer, 'integer']
3716 ] );
3717
3718 $this->customizer->add_control( new DimensionControl(
3719 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_top', [
3720 'type' => 'betterdocs-dimension',
3721 'section' => 'betterdocs_single_docs_settings',
3722 'settings' => 'betterdocs_doc_single_related_docs_content_margin_top',
3723 'label' => __( 'Top', 'betterdocs' ),
3724 'priority' => 163,
3725 'input_attrs' => [
3726 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3727 ]
3728 ] )
3729 );
3730
3731 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_right', [
3732 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_right'],
3733 'capability' => 'edit_theme_options',
3734 'transport' => 'postMessage',
3735 'sanitize_callback' => [$this->sanitizer, 'integer']
3736
3737 ] );
3738
3739 $this->customizer->add_control( new DimensionControl(
3740 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_right', [
3741 'type' => 'betterdocs-dimension',
3742 'section' => 'betterdocs_single_docs_settings',
3743 'settings' => 'betterdocs_doc_single_related_docs_content_margin_right',
3744 'label' => __( 'Right', 'betterdocs' ),
3745 'priority' => 163,
3746 'input_attrs' => [
3747 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3748 ]
3749 ] )
3750 );
3751
3752 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_bottom', [
3753 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_bottom'],
3754 'capability' => 'edit_theme_options',
3755 'transport' => 'postMessage',
3756 'sanitize_callback' => [$this->sanitizer, 'integer']
3757
3758 ] );
3759
3760 $this->customizer->add_control( new DimensionControl(
3761 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_bottom', [
3762 'type' => 'betterdocs-dimension',
3763 'section' => 'betterdocs_single_docs_settings',
3764 'settings' => 'betterdocs_doc_single_related_docs_content_margin_bottom',
3765 'label' => __( 'Bottom', 'betterdocs' ),
3766 'priority' => 163,
3767 'input_attrs' => [
3768 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3769 ]
3770 ] )
3771 );
3772
3773 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_left', [
3774 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_left'],
3775 'capability' => 'edit_theme_options',
3776 'transport' => 'postMessage',
3777 'sanitize_callback' => [$this->sanitizer, 'integer']
3778
3779 ] );
3780
3781 $this->customizer->add_control( new DimensionControl(
3782 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_left', [
3783 'type' => 'betterdocs-dimension',
3784 'section' => 'betterdocs_single_docs_settings',
3785 'settings' => 'betterdocs_doc_single_related_docs_content_margin_left',
3786 'label' => __( 'Left', 'betterdocs' ),
3787 'priority' => 163,
3788 'input_attrs' => [
3789 'class' => 'betterdocs_doc_single_related_docs_content_margin_left betterdocs-dimension'
3790 ]
3791 ] )
3792 );
3793 }
3794
3795 public function betterdocs_doc_single_related_docs_label_color() {
3796 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_color', [
3797 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_color'],
3798 'capability' => 'edit_theme_options',
3799 'transport' => 'postMessage',
3800 'sanitize_callback' => [$this->sanitizer, 'rgba']
3801 ] );
3802
3803 $this->customizer->add_control(
3804 new AlphaColorControl(
3805 $this->customizer,
3806 'betterdocs_doc_single_related_docs_label_color',
3807 [
3808 'label' => __( 'Label Color', 'betterdocs' ),
3809 'section' => 'betterdocs_single_docs_settings',
3810 'settings' => 'betterdocs_doc_single_related_docs_label_color',
3811 'priority' => 163
3812 ]
3813 )
3814 );
3815 }
3816
3817 public function betterdocs_doc_single_related_docs_label_padding() {
3818 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding', [
3819 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding'],
3820 'capability' => 'edit_theme_options',
3821 'transport' => 'postMessage',
3822 'sanitize_callback' => [$this->sanitizer, 'integer']
3823
3824 ] );
3825
3826 $this->customizer->add_control( new TitleControl(
3827 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding', [
3828 'type' => 'betterdocs-title',
3829 'section' => 'betterdocs_single_docs_settings',
3830 'settings' => 'betterdocs_doc_single_related_docs_label_padding',
3831 'label' => __( 'Label Padding', 'betterdocs' ),
3832 'priority' => 163,
3833 'input_attrs' => [
3834 'id' => 'betterdocs_doc_single_related_docs_label_padding',
3835 'class' => 'betterdocs-dimension'
3836 ]
3837 ] )
3838 );
3839
3840 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_top', [
3841 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_top'],
3842 'capability' => 'edit_theme_options',
3843 'transport' => 'postMessage',
3844 'sanitize_callback' => [$this->sanitizer, 'integer']
3845 ] );
3846
3847 $this->customizer->add_control( new DimensionControl(
3848 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_top', [
3849 'type' => 'betterdocs-dimension',
3850 'section' => 'betterdocs_single_docs_settings',
3851 'settings' => 'betterdocs_doc_single_related_docs_label_padding_top',
3852 'label' => __( 'Top', 'betterdocs' ),
3853 'priority' => 163,
3854 'input_attrs' => [
3855 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3856 ]
3857 ] )
3858 );
3859
3860 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_right', [
3861 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_right'],
3862 'capability' => 'edit_theme_options',
3863 'transport' => 'postMessage',
3864 'sanitize_callback' => [$this->sanitizer, 'integer']
3865
3866 ] );
3867
3868 $this->customizer->add_control( new DimensionControl(
3869 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_right', [
3870 'type' => 'betterdocs-dimension',
3871 'section' => 'betterdocs_single_docs_settings',
3872 'settings' => 'betterdocs_doc_single_related_docs_label_padding_right',
3873 'label' => __( 'Right', 'betterdocs' ),
3874 'priority' => 163,
3875 'input_attrs' => [
3876 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3877 ]
3878 ] )
3879 );
3880
3881 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_bottom', [
3882 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_bottom'],
3883 'capability' => 'edit_theme_options',
3884 'transport' => 'postMessage',
3885 'sanitize_callback' => [$this->sanitizer, 'integer']
3886
3887 ] );
3888
3889 $this->customizer->add_control( new DimensionControl(
3890 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_bottom', [
3891 'type' => 'betterdocs-dimension',
3892 'section' => 'betterdocs_single_docs_settings',
3893 'settings' => 'betterdocs_doc_single_related_docs_label_padding_bottom',
3894 'label' => __( 'Bottom', 'betterdocs' ),
3895 'priority' => 163,
3896 'input_attrs' => [
3897 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3898 ]
3899 ] )
3900 );
3901
3902 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_left', [
3903 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_left'],
3904 'capability' => 'edit_theme_options',
3905 'transport' => 'postMessage',
3906 'sanitize_callback' => [$this->sanitizer, 'integer']
3907
3908 ] );
3909
3910 $this->customizer->add_control( new DimensionControl(
3911 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_left', [
3912 'type' => 'betterdocs-dimension',
3913 'section' => 'betterdocs_single_docs_settings',
3914 'settings' => 'betterdocs_doc_single_related_docs_label_padding_left',
3915 'label' => __( 'Left', 'betterdocs' ),
3916 'priority' => 163,
3917 'input_attrs' => [
3918 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3919 ]
3920 ] )
3921 );
3922 }
3923
3924 public function betterdocs_doc_single_related_docs_label_margin() {
3925 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin', [
3926 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin'],
3927 'capability' => 'edit_theme_options',
3928 'transport' => 'postMessage',
3929 'sanitize_callback' => [$this->sanitizer, 'integer']
3930
3931 ] );
3932
3933 $this->customizer->add_control( new TitleControl(
3934 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin', [
3935 'type' => 'betterdocs-title',
3936 'section' => 'betterdocs_single_docs_settings',
3937 'settings' => 'betterdocs_doc_single_related_docs_label_margin',
3938 'label' => __( 'Label Margin', 'betterdocs' ),
3939 'priority' => 163,
3940 'input_attrs' => [
3941 'id' => 'betterdocs_doc_single_related_docs_label_margin',
3942 'class' => 'betterdocs-dimension'
3943 ]
3944 ] )
3945 );
3946
3947 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_top', [
3948 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_top'],
3949 'capability' => 'edit_theme_options',
3950 'transport' => 'postMessage',
3951 'sanitize_callback' => [$this->sanitizer, 'integer']
3952 ] );
3953
3954 $this->customizer->add_control( new DimensionControl(
3955 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_top', [
3956 'type' => 'betterdocs-dimension',
3957 'section' => 'betterdocs_single_docs_settings',
3958 'settings' => 'betterdocs_doc_single_related_docs_label_margin_top',
3959 'label' => __( 'Top', 'betterdocs' ),
3960 'priority' => 163,
3961 'input_attrs' => [
3962 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
3963 ]
3964 ] )
3965 );
3966
3967 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_right', [
3968 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_right'],
3969 'capability' => 'edit_theme_options',
3970 'transport' => 'postMessage',
3971 'sanitize_callback' => [$this->sanitizer, 'integer']
3972
3973 ] );
3974
3975 $this->customizer->add_control( new DimensionControl(
3976 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_right', [
3977 'type' => 'betterdocs-dimension',
3978 'section' => 'betterdocs_single_docs_settings',
3979 'settings' => 'betterdocs_doc_single_related_docs_label_margin_right',
3980 'label' => __( 'Right', 'betterdocs' ),
3981 'priority' => 163,
3982 'input_attrs' => [
3983 'class' => 'betterdocs_doc_single_related_docs_label_margin_right betterdocs-dimension'
3984 ]
3985 ] )
3986 );
3987
3988 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_bottom', [
3989 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_bottom'],
3990 'capability' => 'edit_theme_options',
3991 'transport' => 'postMessage',
3992 'sanitize_callback' => [$this->sanitizer, 'integer']
3993 ] );
3994
3995 $this->customizer->add_control( new DimensionControl(
3996 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_bottom', [
3997 'type' => 'betterdocs-dimension',
3998 'section' => 'betterdocs_single_docs_settings',
3999 'settings' => 'betterdocs_doc_single_related_docs_label_margin_bottom',
4000 'label' => __( 'Bottom', 'betterdocs' ),
4001 'priority' => 163,
4002 'input_attrs' => [
4003 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
4004 ]
4005 ] )
4006 );
4007
4008 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_left', [
4009 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_left'],
4010 'capability' => 'edit_theme_options',
4011 'transport' => 'postMessage',
4012 'sanitize_callback' => [$this->sanitizer, 'integer']
4013 ] );
4014
4015 $this->customizer->add_control( new DimensionControl(
4016 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_left', [
4017 'type' => 'betterdocs-dimension',
4018 'section' => 'betterdocs_single_docs_settings',
4019 'settings' => 'betterdocs_doc_single_related_docs_label_margin_left',
4020 'label' => __( 'Left', 'betterdocs' ),
4021 'priority' => 163,
4022 'input_attrs' => [
4023 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
4024 ]
4025 ] )
4026 );
4027 }
4028
4029 public function betterdocs_doc_related_docs_list_font_size() {
4030 $this->customizer->add_setting( 'betterdocs_doc_related_docs_list_font_size', [
4031 'default' => $this->defaults['betterdocs_doc_related_docs_list_font_size'],
4032 'capability' => 'edit_theme_options',
4033 'transport' => 'postMessage',
4034 'sanitize_callback' => [$this->sanitizer, 'integer']
4035
4036 ] );
4037
4038 $this->customizer->add_control( new RangeValueControl(
4039 $this->customizer, 'betterdocs_doc_related_docs_list_font_size', [
4040 'type' => 'betterdocs-range-value',
4041 'section' => 'betterdocs_single_docs_settings',
4042 'settings' => 'betterdocs_doc_related_docs_list_font_size',
4043 'label' => __( 'List Font Size', 'betterdocs' ),
4044 'priority' => 163,
4045 'input_attrs' => [
4046 'min' => 0,
4047 'max' => 50,
4048 'step' => 1,
4049 'suffix' => 'px' //optional suffix
4050 ]
4051 ] )
4052 );
4053 }
4054
4055 public function betterdocs_doc_related_docs_list_font_weight() {
4056 $this->customizer->add_setting( 'betterdocs_doc_related_docs_list_font_weight', [
4057 'default' => $this->defaults['betterdocs_doc_related_docs_list_font_weight'],
4058 'capability' => 'edit_theme_options',
4059 'sanitize_callback' => [$this->sanitizer, 'choices']
4060 ] );
4061
4062 $this->customizer->add_control(
4063 new WP_Customize_Control(
4064 $this->customizer,
4065 'betterdocs_doc_related_docs_list_font_weight',
4066 [
4067 'label' => __( 'List Font Weight', 'betterdocs-pro' ),
4068 'section' => 'betterdocs_single_docs_settings',
4069 'settings' => 'betterdocs_doc_related_docs_list_font_weight',
4070 'type' => 'select',
4071 'choices' => [
4072 'normal' => 'Normal',
4073 '100' => '100',
4074 '200' => '200',
4075 '300' => '300',
4076 '400' => '400',
4077 '500' => '500',
4078 '600' => '600',
4079 '700' => '700',
4080 '800' => '800',
4081 '900' => '900'
4082 ],
4083 'priority' => 163
4084 ]
4085 )
4086 );
4087 }
4088
4089
4090 public function betterdocs_doc_single_related_docs_list_color() {
4091 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_color', [
4092 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_color'],
4093 'capability' => 'edit_theme_options',
4094 'transport' => 'postMessage',
4095 'sanitize_callback' => [$this->sanitizer, 'rgba']
4096 ] );
4097
4098 $this->customizer->add_control(
4099 new AlphaColorControl(
4100 $this->customizer,
4101 'betterdocs_doc_single_related_docs_list_color',
4102 [
4103 'label' => __( 'List Color', 'betterdocs' ),
4104 'section' => 'betterdocs_single_docs_settings',
4105 'settings' => 'betterdocs_doc_single_related_docs_list_color',
4106 'priority' => 163
4107 ]
4108 )
4109 );
4110 }
4111
4112 public function betterdocs_doc_single_related_docs_list_background_color() {
4113 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_background_color', [
4114 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_background_color'],
4115 'capability' => 'edit_theme_options',
4116 'transport' => 'postMessage',
4117 'sanitize_callback' => [$this->sanitizer, 'rgba']
4118 ] );
4119
4120 $this->customizer->add_control(
4121 new AlphaColorControl(
4122 $this->customizer,
4123 'betterdocs_doc_single_related_docs_list_background_color',
4124 [
4125 'label' => __( 'List Background Color', 'betterdocs' ),
4126 'section' => 'betterdocs_single_docs_settings',
4127 'settings' => 'betterdocs_doc_single_related_docs_list_background_color',
4128 'priority' => 163
4129 ]
4130 )
4131 );
4132 }
4133
4134 public function betterdocs_doc_single_related_docs_list_padding() {
4135 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding', [
4136 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding'],
4137 'capability' => 'edit_theme_options',
4138 'transport' => 'postMessage',
4139 'sanitize_callback' => [$this->sanitizer, 'integer']
4140
4141 ] );
4142
4143 $this->customizer->add_control( new TitleControl(
4144 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding', [
4145 'type' => 'betterdocs-title',
4146 'section' => 'betterdocs_single_docs_settings',
4147 'settings' => 'betterdocs_doc_single_related_docs_list_padding',
4148 'label' => __( 'List Padding', 'betterdocs' ),
4149 'priority' => 163,
4150 'input_attrs' => [
4151 'id' => 'betterdocs_doc_single_related_docs_list_padding',
4152 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4153 ]
4154 ] )
4155 );
4156
4157 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_top', [
4158 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_top'],
4159 'capability' => 'edit_theme_options',
4160 'transport' => 'postMessage',
4161 'sanitize_callback' => [$this->sanitizer, 'integer']
4162 ] );
4163
4164 $this->customizer->add_control( new DimensionControl(
4165 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_top', [
4166 'type' => 'betterdocs-dimension',
4167 'section' => 'betterdocs_single_docs_settings',
4168 'settings' => 'betterdocs_doc_single_related_docs_list_padding_top',
4169 'label' => __( 'Top', 'betterdocs' ),
4170 'priority' => 163,
4171 'input_attrs' => [
4172 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4173 ]
4174 ] )
4175 );
4176
4177 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_right', [
4178 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_right'],
4179 'capability' => 'edit_theme_options',
4180 'transport' => 'postMessage',
4181 'sanitize_callback' => [$this->sanitizer, 'integer']
4182
4183 ] );
4184
4185 $this->customizer->add_control( new DimensionControl(
4186 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_right', [
4187 'type' => 'betterdocs-dimension',
4188 'section' => 'betterdocs_single_docs_settings',
4189 'settings' => 'betterdocs_doc_single_related_docs_list_padding_right',
4190 'label' => __( 'Right', 'betterdocs' ),
4191 'priority' => 163,
4192 'input_attrs' => [
4193 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4194 ]
4195 ] )
4196 );
4197
4198 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_bottom', [
4199 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_bottom'],
4200 'capability' => 'edit_theme_options',
4201 'transport' => 'postMessage',
4202 'sanitize_callback' => [$this->sanitizer, 'integer']
4203 ] );
4204
4205 $this->customizer->add_control( new DimensionControl(
4206 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_bottom', [
4207 'type' => 'betterdocs-dimension',
4208 'section' => 'betterdocs_single_docs_settings',
4209 'settings' => 'betterdocs_doc_single_related_docs_list_padding_bottom',
4210 'label' => __( 'Bottom', 'betterdocs' ),
4211 'priority' => 163,
4212 'input_attrs' => [
4213 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4214 ]
4215 ] )
4216 );
4217
4218 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_left', [
4219 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_left'],
4220 'capability' => 'edit_theme_options',
4221 'transport' => 'postMessage',
4222 'sanitize_callback' => [$this->sanitizer, 'integer']
4223 ] );
4224
4225 $this->customizer->add_control( new DimensionControl(
4226 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_left', [
4227 'type' => 'betterdocs-dimension',
4228 'section' => 'betterdocs_single_docs_settings',
4229 'settings' => 'betterdocs_doc_single_related_docs_list_padding_left',
4230 'label' => __( 'Left', 'betterdocs' ),
4231 'priority' => 163,
4232 'input_attrs' => [
4233 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4234 ]
4235 ] )
4236 );
4237 }
4238
4239 public function betterdocs_doc_single_related_docs_list_margin() {
4240 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin', [
4241 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin'],
4242 'capability' => 'edit_theme_options',
4243 'transport' => 'postMessage',
4244 'sanitize_callback' => [$this->sanitizer, 'integer']
4245
4246 ] );
4247
4248 $this->customizer->add_control( new TitleControl(
4249 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin', [
4250 'type' => 'betterdocs-title',
4251 'section' => 'betterdocs_single_docs_settings',
4252 'settings' => 'betterdocs_doc_single_related_docs_list_margin',
4253 'label' => __( 'List Margin', 'betterdocs' ),
4254 'priority' => 163,
4255 'input_attrs' => [
4256 'id' => 'betterdocs_doc_single_related_docs_list_margin',
4257 'class' => 'betterdocs-dimension'
4258 ]
4259 ] )
4260 );
4261
4262 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_top', [
4263 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_top'],
4264 'capability' => 'edit_theme_options',
4265 'transport' => 'postMessage',
4266 'sanitize_callback' => [$this->sanitizer, 'integer']
4267 ] );
4268
4269 $this->customizer->add_control( new DimensionControl(
4270 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_top', [
4271 'type' => 'betterdocs-dimension',
4272 'section' => 'betterdocs_single_docs_settings',
4273 'settings' => 'betterdocs_doc_single_related_docs_list_margin_top',
4274 'label' => __( 'Top', 'betterdocs' ),
4275 'priority' => 163,
4276 'input_attrs' => [
4277 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4278 ]
4279 ] )
4280 );
4281
4282 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_right', [
4283 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_right'],
4284 'capability' => 'edit_theme_options',
4285 'transport' => 'postMessage',
4286 'sanitize_callback' => [$this->sanitizer, 'integer']
4287
4288 ] );
4289
4290 $this->customizer->add_control( new DimensionControl(
4291 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_right', [
4292 'type' => 'betterdocs-dimension',
4293 'section' => 'betterdocs_single_docs_settings',
4294 'settings' => 'betterdocs_doc_single_related_docs_list_margin_right',
4295 'label' => __( 'Right', 'betterdocs' ),
4296 'priority' => 163,
4297 'input_attrs' => [
4298 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4299 ]
4300 ] )
4301 );
4302
4303 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_bottom', [
4304 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_bottom'],
4305 'capability' => 'edit_theme_options',
4306 'transport' => 'postMessage',
4307 'sanitize_callback' => [$this->sanitizer, 'integer']
4308 ] );
4309
4310 $this->customizer->add_control( new DimensionControl(
4311 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_bottom', [
4312 'type' => 'betterdocs-dimension',
4313 'section' => 'betterdocs_single_docs_settings',
4314 'settings' => 'betterdocs_doc_single_related_docs_list_margin_bottom',
4315 'label' => __( 'Bottom', 'betterdocs' ),
4316 'priority' => 163,
4317 'input_attrs' => [
4318 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4319 ]
4320 ] )
4321 );
4322
4323 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_left', [
4324 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_left'],
4325 'capability' => 'edit_theme_options',
4326 'transport' => 'postMessage',
4327 'sanitize_callback' => [$this->sanitizer, 'integer']
4328 ] );
4329
4330 $this->customizer->add_control( new DimensionControl(
4331 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_left', [
4332 'type' => 'betterdocs-dimension',
4333 'section' => 'betterdocs_single_docs_settings',
4334 'settings' => 'betterdocs_doc_single_related_docs_list_margin_left',
4335 'label' => __( 'Left', 'betterdocs' ),
4336 'priority' => 163,
4337 'input_attrs' => [
4338 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4339 ]
4340 ] )
4341 );
4342 }
4343 }
4344