PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.5.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.5.3
4.9.2 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 All 200 releases
betterdocs / includes / Admin / Customizer / Sections / SingleDoc.php

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

4,368 lines 197.2 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 'p' => 'p'
755 ],
756 'priority' => 124
757 ]
758 )
759 );
760 }
761
762 public function post_title_text_transform() {
763 $this->customizer->add_setting( 'betterdocs_post_title_text_transform', [
764 'default' => $this->defaults['betterdocs_post_title_text_transform'],
765 'capability' => 'edit_theme_options',
766 'sanitize_callback' => [$this->sanitizer, 'select']
767 ] );
768
769 $this->customizer->add_control(
770 new WP_Customize_Control(
771 $this->customizer,
772 'betterdocs_post_title_text_transform',
773 [
774 'label' => __( 'Text Transform', 'betterdocs' ),
775 'section' => 'betterdocs_single_docs_settings',
776 'settings' => 'betterdocs_post_title_text_transform',
777 'type' => 'select',
778 'choices' => [
779 'uppercase' => 'Uppercase',
780 'lowercase' => 'Lowercase',
781 'capitalize' => 'Capitalize',
782 'none' => 'Normal'
783 ],
784 'priority' => 124
785 ]
786 )
787 );
788 }
789
790 public function single_doc_title_font_size() {
791 $this->customizer->add_setting( 'betterdocs_single_doc_title_font_size', [
792 'default' => $this->defaults['betterdocs_single_doc_title_font_size'],
793 'capability' => 'edit_theme_options',
794 'transport' => 'postMessage',
795 'sanitize_callback' => [$this->sanitizer, 'integer']
796
797 ] );
798
799 $this->customizer->add_control( new RangeValueControl(
800 $this->customizer, 'betterdocs_single_doc_title_font_size', [
801 'type' => 'betterdocs-range-value',
802 'section' => 'betterdocs_single_docs_settings',
803 'settings' => 'betterdocs_single_doc_title_font_size',
804 'label' => __( 'Font Size', 'betterdocs' ),
805 'priority' => 125,
806 'input_attrs' => [
807 'min' => 0,
808 'max' => 50,
809 'step' => 1,
810 'suffix' => 'px' //optional suffix
811 ]
812 ] )
813 );
814 }
815
816 public function single_doc_title_color() {
817 $this->customizer->add_setting( 'betterdocs_single_doc_title_color', [
818 'capability' => 'edit_theme_options',
819 'default' => $this->defaults['betterdocs_single_doc_title_color'],
820 'transport' => 'postMessage',
821 'sanitize_callback' => [$this->sanitizer, 'rgba']
822 ] );
823
824 $this->customizer->add_control(
825 new AlphaColorControl(
826 $this->customizer,
827 'betterdocs_single_doc_title_color',
828 [
829 'label' => __( 'Color', 'betterdocs' ),
830 'priority' => 126,
831 'section' => 'betterdocs_single_docs_settings',
832 'settings' => 'betterdocs_single_doc_title_color'
833 ]
834 )
835 );
836 }
837
838 public function doc_single_toc_title() {
839 $this->customizer->add_setting( 'betterdocs_doc_single_toc_title', [
840 'default' => $this->defaults['betterdocs_doc_single_toc_title'],
841 'sanitize_callback' => 'esc_html'
842 ] );
843
844 $this->customizer->add_control( new SeparatorControl(
845 $this->customizer, 'betterdocs_doc_single_toc_title', [
846 'label' => __( 'Table of Contents', 'betterdocs' ),
847 'priority' => 132,
848 'settings' => 'betterdocs_doc_single_toc_title',
849 'section' => 'betterdocs_single_docs_settings'
850 ] )
851 );
852 }
853
854 public function sticky_toc_width() {
855 $this->customizer->add_setting( 'betterdocs_sticky_toc_width', [
856 'default' => $this->defaults['betterdocs_sticky_toc_width'],
857 'capability' => 'edit_theme_options',
858 'transport' => 'postMessage',
859 'sanitize_callback' => [$this->sanitizer, 'integer']
860
861 ] );
862
863 $this->customizer->add_control( new RangeValueControl(
864 $this->customizer, 'betterdocs_sticky_toc_width', [
865 'type' => 'betterdocs-range-value',
866 'section' => 'betterdocs_single_docs_settings',
867 'settings' => 'betterdocs_sticky_toc_width',
868 'label' => __( 'Sticky Toc Width', 'betterdocs' ),
869 'priority' => 133,
870 'input_attrs' => [
871 'class' => '',
872 'min' => 100,
873 'max' => 500,
874 'step' => 1,
875 'suffix' => 'px' //optional suffix
876 ]
877 ] )
878 );
879 }
880
881 public function sticky_toc_zindex() {
882 $this->customizer->add_setting( 'betterdocs_sticky_toc_zindex', [
883 'default' => $this->defaults['betterdocs_sticky_toc_zindex'],
884 'capability' => 'edit_theme_options',
885 'transport' => 'postMessage',
886 'sanitize_callback' => [$this->sanitizer, 'integer']
887 ] );
888
889 $this->customizer->add_control( new NumberControl(
890 $this->customizer, 'betterdocs_sticky_toc_zindex', [
891 'type' => 'betterdocs-number',
892 'section' => 'betterdocs_single_docs_settings',
893 'settings' => 'betterdocs_sticky_toc_zindex',
894 'label' => __( 'Sticky Toc z-index', 'betterdocs' ),
895 'priority' => 134
896 ] )
897 );
898 }
899
900 public function sticky_toc_margin_top() {
901 $this->customizer->add_setting( 'betterdocs_sticky_toc_margin_top', [
902 'default' => $this->defaults['betterdocs_sticky_toc_margin_top'],
903 'capability' => 'edit_theme_options',
904 'transport' => 'postMessage',
905 'sanitize_callback' => [$this->sanitizer, 'integer']
906
907 ] );
908
909 $this->customizer->add_control( new RangeValueControl(
910 $this->customizer, 'betterdocs_sticky_toc_margin_top', [
911 'type' => 'betterdocs-range-value',
912 'section' => 'betterdocs_single_docs_settings',
913 'settings' => 'betterdocs_sticky_toc_margin_top',
914 'label' => __( 'Sticky Toc Margin Top', 'betterdocs' ),
915 'priority' => 135,
916 'input_attrs' => [
917 'class' => '',
918 'min' => 0,
919 'max' => 500,
920 'step' => 1,
921 'suffix' => 'px' //optional suffix
922 ]
923 ] )
924 );
925 }
926
927 public function toc_bg_color() {
928 $this->customizer->add_setting( 'betterdocs_toc_bg_color', [
929 'capability' => 'edit_theme_options',
930 'default' => $this->defaults['betterdocs_toc_bg_color'],
931 'transport' => 'postMessage',
932 'sanitize_callback' => [$this->sanitizer, 'rgba']
933 ] );
934
935 $this->customizer->add_control(
936 new AlphaColorControl(
937 $this->customizer,
938 'betterdocs_toc_bg_color',
939 [
940 'label' => __( 'Background Color', 'betterdocs' ),
941 'priority' => 136,
942 'section' => 'betterdocs_single_docs_settings',
943 'settings' => 'betterdocs_toc_bg_color'
944 ]
945 )
946 );
947 }
948
949 public function doc_single_toc_padding() {
950 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding', [
951 'default' => $this->defaults['betterdocs_doc_single_toc_padding'],
952 'capability' => 'edit_theme_options',
953 'transport' => 'postMessage',
954 'sanitize_callback' => [$this->sanitizer, 'integer']
955
956 ] );
957
958 $this->customizer->add_control( new TitleControl(
959 $this->customizer, 'betterdocs_doc_single_toc_padding', [
960 'type' => 'betterdocs-title',
961 'section' => 'betterdocs_single_docs_settings',
962 'settings' => 'betterdocs_doc_single_toc_padding',
963 'label' => __( 'Content Area Padding', 'betterdocs' ),
964 'priority' => 137,
965 'input_attrs' => [
966 'id' => 'betterdocs_doc_single_toc_padding',
967 'class' => 'betterdocs-dimension'
968 ]
969 ] )
970 );
971
972 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_top', [
973 'default' => $this->defaults['betterdocs_doc_single_toc_padding_top'],
974 'capability' => 'edit_theme_options',
975 'transport' => 'postMessage',
976 'sanitize_callback' => [$this->sanitizer, 'integer']
977 ] );
978
979 $this->customizer->add_control( new DimensionControl(
980 $this->customizer, 'betterdocs_doc_single_toc_padding_top', [
981 'type' => 'betterdocs-dimension',
982 'section' => 'betterdocs_single_docs_settings',
983 'settings' => 'betterdocs_doc_single_toc_padding_top',
984 'label' => __( 'Top', 'betterdocs' ),
985 'priority' => 137,
986 'input_attrs' => [
987 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
988 ]
989 ] )
990 );
991
992 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_right', [
993 'default' => $this->defaults['betterdocs_doc_single_toc_padding_right'],
994 'capability' => 'edit_theme_options',
995 'transport' => 'postMessage',
996 'sanitize_callback' => [$this->sanitizer, 'integer']
997
998 ] );
999
1000 $this->customizer->add_control( new DimensionControl(
1001 $this->customizer, 'betterdocs_doc_single_toc_padding_right', [
1002 'type' => 'betterdocs-dimension',
1003 'section' => 'betterdocs_single_docs_settings',
1004 'settings' => 'betterdocs_doc_single_toc_padding_right',
1005 'label' => __( 'Right', 'betterdocs' ),
1006 'priority' => 137,
1007 'input_attrs' => [
1008 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1009 ]
1010 ] )
1011 );
1012
1013 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_bottom', [
1014 'default' => $this->defaults['betterdocs_doc_single_toc_padding_bottom'],
1015 'capability' => 'edit_theme_options',
1016 'transport' => 'postMessage',
1017 'sanitize_callback' => [$this->sanitizer, 'integer']
1018
1019 ] );
1020
1021 $this->customizer->add_control( new DimensionControl(
1022 $this->customizer, 'betterdocs_doc_single_toc_padding_bottom', [
1023 'type' => 'betterdocs-dimension',
1024 'section' => 'betterdocs_single_docs_settings',
1025 'settings' => 'betterdocs_doc_single_toc_padding_bottom',
1026 'label' => __( 'Bottom', 'betterdocs' ),
1027 'priority' => 137,
1028 'input_attrs' => [
1029 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1030 ]
1031 ] )
1032 );
1033
1034 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_left', [
1035 'default' => $this->defaults['betterdocs_doc_single_toc_padding_left'],
1036 'capability' => 'edit_theme_options',
1037 'transport' => 'postMessage',
1038 'sanitize_callback' => [$this->sanitizer, 'integer']
1039
1040 ] );
1041
1042 $this->customizer->add_control( new DimensionControl(
1043 $this->customizer, 'betterdocs_doc_single_toc_padding_left', [
1044 'type' => 'betterdocs-dimension',
1045 'section' => 'betterdocs_single_docs_settings',
1046 'settings' => 'betterdocs_doc_single_toc_padding_left',
1047 'label' => __( 'Left', 'betterdocs' ),
1048 'priority' => 137,
1049 'input_attrs' => [
1050 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1051 ]
1052 ] )
1053 );
1054 }
1055
1056 public function doc_single_toc_margin() {
1057 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin', [
1058 'default' => $this->defaults['betterdocs_doc_single_toc_margin'],
1059 'capability' => 'edit_theme_options',
1060 'transport' => 'postMessage',
1061 'sanitize_callback' => [$this->sanitizer, 'integer']
1062 ] );
1063
1064 $this->customizer->add_control( new TitleControl(
1065 $this->customizer, 'betterdocs_doc_single_toc_margin', [
1066 'type' => 'betterdocs-title',
1067 'section' => 'betterdocs_single_docs_settings',
1068 'settings' => 'betterdocs_doc_single_toc_margin',
1069 'label' => __( 'Content Area Margin', 'betterdocs' ),
1070 'priority' => 141,
1071 'input_attrs' => [
1072 'id' => 'betterdocs_doc_single_toc_margin',
1073 'class' => 'betterdocs-dimension'
1074 ]
1075 ] )
1076 );
1077
1078 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_top', [
1079 'default' => $this->defaults['betterdocs_doc_single_toc_margin_top'],
1080 'capability' => 'edit_theme_options',
1081 'transport' => 'postMessage',
1082 'sanitize_callback' => [$this->sanitizer, 'integer']
1083 ] );
1084
1085 $this->customizer->add_control( new DimensionControl(
1086 $this->customizer, 'betterdocs_doc_single_toc_margin_top', [
1087 'type' => 'betterdocs-dimension',
1088 'section' => 'betterdocs_single_docs_settings',
1089 'settings' => 'betterdocs_doc_single_toc_margin_top',
1090 'label' => __( 'Top', 'betterdocs' ),
1091 'priority' => 141,
1092 'input_attrs' => [
1093 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1094 ]
1095 ] )
1096 );
1097
1098 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_right', [
1099 'default' => $this->defaults['betterdocs_doc_single_toc_margin_right'],
1100 'capability' => 'edit_theme_options',
1101 'transport' => 'postMessage',
1102 'sanitize_callback' => [$this->sanitizer, 'integer']
1103 ] );
1104
1105 $this->customizer->add_control( new DimensionControl(
1106 $this->customizer, 'betterdocs_doc_single_toc_margin_right', [
1107 'type' => 'betterdocs-dimension',
1108 'section' => 'betterdocs_single_docs_settings',
1109 'settings' => 'betterdocs_doc_single_toc_margin_right',
1110 'label' => __( 'Right', 'betterdocs' ),
1111 'priority' => 141,
1112 'input_attrs' => [
1113 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1114 ]
1115 ] )
1116 );
1117
1118 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_bottom', [
1119 'default' => $this->defaults['betterdocs_doc_single_toc_margin_bottom'],
1120 'capability' => 'edit_theme_options',
1121 'transport' => 'postMessage',
1122 'sanitize_callback' => [$this->sanitizer, 'integer']
1123 ] );
1124
1125 $this->customizer->add_control( new DimensionControl(
1126 $this->customizer, 'betterdocs_doc_single_toc_margin_bottom', [
1127 'type' => 'betterdocs-dimension',
1128 'section' => 'betterdocs_single_docs_settings',
1129 'settings' => 'betterdocs_doc_single_toc_margin_bottom',
1130 'label' => __( 'Bottom', 'betterdocs' ),
1131 'priority' => 141,
1132 'input_attrs' => [
1133 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1134 ]
1135 ] )
1136 );
1137
1138 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_left', [
1139 'default' => $this->defaults['betterdocs_doc_single_toc_margin_left'],
1140 'capability' => 'edit_theme_options',
1141 'transport' => 'postMessage',
1142 'sanitize_callback' => [$this->sanitizer, 'integer']
1143 ] );
1144
1145 $this->customizer->add_control( new DimensionControl(
1146 $this->customizer, 'betterdocs_doc_single_toc_margin_left', [
1147 'type' => 'betterdocs-dimension',
1148 'section' => 'betterdocs_single_docs_settings',
1149 'settings' => 'betterdocs_doc_single_toc_margin_left',
1150 'label' => __( 'Left', 'betterdocs' ),
1151 'priority' => 141,
1152 'input_attrs' => [
1153 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1154 ]
1155 ] )
1156 );
1157 }
1158
1159 public function toc_title_color() {
1160 $this->customizer->add_setting( 'betterdocs_toc_title_color', [
1161 'capability' => 'edit_theme_options',
1162 'default' => $this->defaults['betterdocs_toc_title_color'],
1163 'transport' => 'postMessage',
1164 'sanitize_callback' => [$this->sanitizer, 'rgba']
1165 ] );
1166
1167 $this->customizer->add_control(
1168 new AlphaColorControl(
1169 $this->customizer,
1170 'betterdocs_toc_title_color',
1171 [
1172 'label' => __( 'Title Color', 'betterdocs' ),
1173 'priority' => 142,
1174 'section' => 'betterdocs_single_docs_settings',
1175 'settings' => 'betterdocs_toc_title_color'
1176 ]
1177 )
1178 );
1179 }
1180
1181 public function toc_title_font_size() {
1182 $this->customizer->add_setting( 'betterdocs_toc_title_font_size', [
1183 'default' => $this->defaults['betterdocs_toc_title_font_size'],
1184 'capability' => 'edit_theme_options',
1185 'transport' => 'postMessage',
1186 'sanitize_callback' => [$this->sanitizer, 'integer']
1187
1188 ] );
1189
1190 $this->customizer->add_control( new RangeValueControl(
1191 $this->customizer, 'betterdocs_toc_title_font_size', [
1192 'type' => 'betterdocs-range-value',
1193 'section' => 'betterdocs_single_docs_settings',
1194 'settings' => 'betterdocs_toc_title_font_size',
1195 'label' => __( 'Title Font Size', 'betterdocs' ),
1196 'priority' => 143,
1197 'input_attrs' => [
1198 'class' => '',
1199 'min' => 0,
1200 'max' => 50,
1201 'step' => 1,
1202 'suffix' => 'px' //optional suffix
1203 ]
1204 ] )
1205 );
1206 }
1207
1208 public function toc_list_item_color() {
1209 $this->customizer->add_setting( 'betterdocs_toc_list_item_color', [
1210 'default' => $this->defaults['betterdocs_toc_list_item_color'],
1211 'transport' => 'postMessage',
1212 'sanitize_callback' => [$this->sanitizer, 'rgba']
1213 ] );
1214
1215 $this->customizer->add_control(
1216 new AlphaColorControl(
1217 $this->customizer,
1218 'betterdocs_toc_list_item_color',
1219 [
1220 'label' => __( 'List Item Color', 'betterdocs' ),
1221 'priority' => 144,
1222 'section' => 'betterdocs_single_docs_settings',
1223 'settings' => 'betterdocs_toc_list_item_color'
1224 ]
1225 )
1226 );
1227 }
1228
1229 public function toc_list_item_hover_color() {
1230 $this->customizer->add_setting( 'betterdocs_toc_list_item_hover_color', [
1231 'capability' => 'edit_theme_options',
1232 'default' => $this->defaults['betterdocs_toc_list_item_hover_color'],
1233 'sanitize_callback' => [$this->sanitizer, 'rgba']
1234 ] );
1235
1236 $this->customizer->add_control(
1237 new AlphaColorControl(
1238 $this->customizer,
1239 'betterdocs_toc_list_item_hover_color',
1240 [
1241 'label' => __( 'List Item Hover Color', 'betterdocs' ),
1242 'priority' => 145,
1243 'section' => 'betterdocs_single_docs_settings',
1244 'settings' => 'betterdocs_toc_list_item_hover_color'
1245 ]
1246 )
1247 );
1248 }
1249
1250 public function toc_active_item_color() {
1251 $this->customizer->add_setting( 'betterdocs_toc_active_item_color', [
1252 'capability' => 'edit_theme_options',
1253 'default' => $this->defaults['betterdocs_toc_active_item_color'],
1254 'sanitize_callback' => [$this->sanitizer, 'rgba']
1255 ] );
1256
1257 $this->customizer->add_control(
1258 new AlphaColorControl(
1259 $this->customizer,
1260 'betterdocs_toc_active_item_color',
1261 [
1262 'label' => __( 'Active Item Color', 'betterdocs' ),
1263 'priority' => 146,
1264 'section' => 'betterdocs_single_docs_settings',
1265 'settings' => 'betterdocs_toc_active_item_color'
1266 ]
1267 )
1268 );
1269 }
1270
1271 public function toc_list_item_font_size() {
1272 $this->customizer->add_setting( 'betterdocs_toc_list_item_font_size', [
1273 'default' => $this->defaults['betterdocs_toc_list_item_font_size'],
1274 'capability' => 'edit_theme_options',
1275 'transport' => 'postMessage',
1276 'sanitize_callback' => [$this->sanitizer, 'integer']
1277
1278 ] );
1279
1280 $this->customizer->add_control( new RangeValueControl(
1281 $this->customizer, 'betterdocs_toc_list_item_font_size', [
1282 'type' => 'betterdocs-range-value',
1283 'section' => 'betterdocs_single_docs_settings',
1284 'settings' => 'betterdocs_toc_list_item_font_size',
1285 'label' => __( 'List Item Font Size', 'betterdocs' ),
1286 'priority' => 147,
1287 'input_attrs' => [
1288 'class' => '',
1289 'min' => 0,
1290 'max' => 50,
1291 'step' => 1,
1292 'suffix' => 'px' //optional suffix
1293 ]
1294 ] )
1295 );
1296 }
1297
1298 public function doc_single_toc_list_margin() {
1299 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin', [
1300 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin'],
1301 'capability' => 'edit_theme_options',
1302 'transport' => 'postMessage',
1303 'sanitize_callback' => [$this->sanitizer, 'integer']
1304
1305 ] );
1306
1307 $this->customizer->add_control( new TitleControl(
1308 $this->customizer, 'betterdocs_doc_single_toc_list_margin', [
1309 'type' => 'betterdocs-title',
1310 'section' => 'betterdocs_single_docs_settings',
1311 'settings' => 'betterdocs_doc_single_toc_list_margin',
1312 'label' => __( 'TOC List Margin', 'betterdocs' ),
1313 'priority' => 148,
1314 'input_attrs' => [
1315 'id' => 'betterdocs_doc_single_toc_list_margin',
1316 'class' => 'betterdocs-dimension'
1317 ]
1318 ] )
1319 );
1320
1321 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_top', [
1322 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_top'],
1323 'capability' => 'edit_theme_options',
1324 'transport' => 'postMessage',
1325 'sanitize_callback' => [$this->sanitizer, 'integer']
1326 ] );
1327
1328 $this->customizer->add_control( new DimensionControl(
1329 $this->customizer, 'betterdocs_doc_single_toc_list_margin_top', [
1330 'type' => 'betterdocs-dimension',
1331 'section' => 'betterdocs_single_docs_settings',
1332 'settings' => 'betterdocs_doc_single_toc_list_margin_top',
1333 'label' => __( 'Top', 'betterdocs' ),
1334 'priority' => 148,
1335 'input_attrs' => [
1336 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1337 ]
1338 ] )
1339 );
1340
1341 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_right', [
1342 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_right'],
1343 'capability' => 'edit_theme_options',
1344 'transport' => 'postMessage',
1345 'sanitize_callback' => [$this->sanitizer, 'integer']
1346
1347 ] );
1348
1349 $this->customizer->add_control( new DimensionControl(
1350 $this->customizer, 'betterdocs_doc_single_toc_list_margin_right', [
1351 'type' => 'betterdocs-dimension',
1352 'section' => 'betterdocs_single_docs_settings',
1353 'settings' => 'betterdocs_doc_single_toc_list_margin_right',
1354 'label' => __( 'Right', 'betterdocs' ),
1355 'priority' => 148,
1356 'input_attrs' => [
1357 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1358 ]
1359 ] )
1360 );
1361
1362 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_bottom', [
1363 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_bottom'],
1364 'capability' => 'edit_theme_options',
1365 'transport' => 'postMessage',
1366 'sanitize_callback' => [$this->sanitizer, 'integer']
1367
1368 ] );
1369
1370 $this->customizer->add_control( new DimensionControl(
1371 $this->customizer, 'betterdocs_doc_single_toc_list_margin_bottom', [
1372 'type' => 'betterdocs-dimension',
1373 'section' => 'betterdocs_single_docs_settings',
1374 'settings' => 'betterdocs_doc_single_toc_list_margin_bottom',
1375 'label' => __( 'Bottom', 'betterdocs' ),
1376 'priority' => 148,
1377 'input_attrs' => [
1378 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1379 ]
1380 ] )
1381 );
1382
1383 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_left', [
1384 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_left'],
1385 'capability' => 'edit_theme_options',
1386 'transport' => 'postMessage',
1387 'sanitize_callback' => [$this->sanitizer, 'integer']
1388
1389 ] );
1390
1391 $this->customizer->add_control( new DimensionControl(
1392 $this->customizer, 'betterdocs_doc_single_toc_list_margin_left', [
1393 'type' => 'betterdocs-dimension',
1394 'section' => 'betterdocs_single_docs_settings',
1395 'settings' => 'betterdocs_doc_single_toc_list_margin_left',
1396 'label' => __( 'Left', 'betterdocs' ),
1397 'priority' => 148,
1398 'input_attrs' => [
1399 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1400 ]
1401 ] )
1402 );
1403 }
1404
1405 public function toc_list_number_color() {
1406 $this->customizer->add_setting( 'betterdocs_toc_list_number_color', [
1407 'default' => $this->defaults['betterdocs_toc_list_number_color'],
1408 'capability' => 'edit_theme_options',
1409 'sanitize_callback' => [$this->sanitizer, 'rgba']
1410 ] );
1411
1412 $this->customizer->add_control(
1413 new AlphaColorControl(
1414 $this->customizer,
1415 'betterdocs_toc_list_number_color',
1416 [
1417 'label' => __( 'List Number Color', 'betterdocs' ),
1418 'priority' => 153,
1419 'section' => 'betterdocs_single_docs_settings',
1420 'settings' => 'betterdocs_toc_list_number_color'
1421 ]
1422 )
1423 );
1424 }
1425
1426 public function toc_list_number_font_size() {
1427 $this->customizer->add_setting( 'betterdocs_toc_list_number_font_size', [
1428 'default' => $this->defaults['betterdocs_toc_list_number_font_size'],
1429 'capability' => 'edit_theme_options',
1430 'sanitize_callback' => [$this->sanitizer, 'integer']
1431
1432 ] );
1433
1434 $this->customizer->add_control( new RangeValueControl(
1435 $this->customizer, 'betterdocs_toc_list_number_font_size', [
1436 'type' => 'betterdocs-range-value',
1437 'section' => 'betterdocs_single_docs_settings',
1438 'settings' => 'betterdocs_toc_list_number_font_size',
1439 'label' => __( 'List Number Font Size', 'betterdocs' ),
1440 'priority' => 154,
1441 'input_attrs' => [
1442 'class' => '',
1443 'min' => 0,
1444 'max' => 50,
1445 'step' => 1,
1446 'suffix' => 'px' //optional suffix
1447 ]
1448 ] )
1449 );
1450 }
1451
1452 public function toc_margin_bottom() {
1453 $this->customizer->add_setting( 'betterdocs_toc_margin_bottom', [
1454 'default' => $this->defaults['betterdocs_toc_margin_bottom'],
1455 'capability' => 'edit_theme_options',
1456 'transport' => 'postMessage',
1457 'sanitize_callback' => [$this->sanitizer, 'integer']
1458
1459 ] );
1460
1461 $this->customizer->add_control( new RangeValueControl(
1462 $this->customizer, 'betterdocs_toc_margin_bottom', [
1463 'type' => 'betterdocs-range-value',
1464 'section' => 'betterdocs_single_docs_settings',
1465 'settings' => 'betterdocs_toc_margin_bottom',
1466 'label' => __( 'TOC Margin Bottom', 'betterdocs' ),
1467 'priority' => 155,
1468 'input_attrs' => [
1469 'class' => '',
1470 'min' => 0,
1471 'max' => 500,
1472 'step' => 1,
1473 'suffix' => 'px' // optional suffix
1474 ]
1475 ] )
1476 );
1477 }
1478
1479 public function doc_estimate_reading_time_section() {
1480 $this->customizer->add_setting( 'betterdocs_doc_estimate_reading_time_section', [
1481 'default' => $this->defaults['betterdocs_doc_estimate_reading_time_section'],
1482 'sanitize_callback' => 'esc_html'
1483 ] );
1484
1485 $this->customizer->add_control( new SeparatorControl(
1486 $this->customizer, 'betterdocs_doc_estimate_reading_time_section', [
1487 'label' => __( 'Estimated Reading Time', 'betterdocs' ),
1488 'priority' => 155,
1489 'settings' => 'betterdocs_doc_estimate_reading_time_section',
1490 'section' => 'betterdocs_single_docs_settings'
1491 ] )
1492 );
1493 }
1494
1495 public function doc_erstimate_reading_time_bg_color() {
1496 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_bg_color', [
1497 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_bg_color'],
1498 'capability' => 'edit_theme_options',
1499 'transport' => 'postMessage',
1500 'sanitize_callback' => [$this->sanitizer, 'rgba']
1501 ] );
1502
1503 $this->customizer->add_control(
1504 new AlphaColorControl(
1505 $this->customizer,
1506 'betterdocs_doc_single_content_est_reading_bg_color',
1507 [
1508 'label' => __( 'Background Color', 'betterdocs' ),
1509 'priority' => 155,
1510 'section' => 'betterdocs_single_docs_settings',
1511 'settings' => 'betterdocs_doc_single_content_est_reading_bg_color'
1512 ]
1513 )
1514 );
1515 }
1516
1517 public function doc_estimate_reading_time_color() {
1518 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_color', [
1519 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_color'],
1520 'capability' => 'edit_theme_options',
1521 'transport' => 'postMessage',
1522 'sanitize_callback' => [$this->sanitizer, 'rgba']
1523 ] );
1524
1525 $this->customizer->add_control(
1526 new AlphaColorControl(
1527 $this->customizer,
1528 'betterdocs_doc_single_content_est_reading_color',
1529 [
1530 'label' => __( 'Color', 'betterdocs' ),
1531 'priority' => 155,
1532 'section' => 'betterdocs_single_docs_settings',
1533 'settings' => 'betterdocs_doc_single_content_est_reading_color'
1534 ]
1535 )
1536 );
1537 }
1538
1539 public function betterdocs_doc_single_content_est_reading_font_size() {
1540 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_font_size', [
1541 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_font_size'],
1542 'capability' => 'edit_theme_options',
1543 'transport' => 'postMessage',
1544 'sanitize_callback' => [$this->sanitizer, 'integer']
1545
1546 ] );
1547
1548 $this->customizer->add_control( new RangeValueControl(
1549 $this->customizer, 'betterdocs_doc_single_content_est_reading_font_size', [
1550 'type' => 'betterdocs-range-value',
1551 'section' => 'betterdocs_single_docs_settings',
1552 'settings' => 'betterdocs_doc_single_content_est_reading_font_size',
1553 'label' => __( 'Font Size', 'betterdocs' ),
1554 'priority' => 155,
1555 'input_attrs' => [
1556 'min' => 0,
1557 'max' => 50,
1558 'step' => 1,
1559 'suffix' => 'px' //optional suffix
1560 ]
1561 ] )
1562 );
1563 }
1564
1565 public function betterdocs_doc_single_content_est_reading_border_radius() {
1566 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_border_radius', [
1567 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_border_radius'],
1568 'capability' => 'edit_theme_options',
1569 'transport' => 'postMessage',
1570 'sanitize_callback' => [$this->sanitizer, 'integer']
1571
1572 ] );
1573
1574 $this->customizer->add_control( new RangeValueControl(
1575 $this->customizer, 'betterdocs_doc_single_content_est_reading_border_radius', [
1576 'type' => 'betterdocs-range-value',
1577 'section' => 'betterdocs_single_docs_settings',
1578 'settings' => 'betterdocs_doc_single_content_est_reading_border_radius',
1579 'label' => __( 'Border Radius', 'betterdocs' ),
1580 'input_attrs' => [
1581 'class' => '',
1582 'min' => 0,
1583 'max' => 100,
1584 'step' => 1,
1585 'suffix' => 'px' //optional suffix
1586 ],
1587 'priority' => 155
1588 ] )
1589 );
1590 }
1591
1592 public function betterdocs_doc_single_content_est_reading_font_weight() {
1593 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_font_weight', [
1594 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_font_weight'],
1595 'capability' => 'edit_theme_options',
1596 'transport' => 'postMessage',
1597 'sanitize_callback' => [$this->sanitizer, 'choices']
1598 ] );
1599
1600 $this->customizer->add_control(
1601 new WP_Customize_Control(
1602 $this->customizer,
1603 'betterdocs_doc_single_content_est_reading_font_weight',
1604 [
1605 'label' => __( 'Font Weight', 'betterdocs-pro' ),
1606 'section' => 'betterdocs_single_docs_settings',
1607 'settings' => 'betterdocs_doc_single_content_est_reading_font_weight',
1608 'type' => 'select',
1609 'choices' => [
1610 'normal' => 'Normal',
1611 '100' => '100',
1612 '200' => '200',
1613 '300' => '300',
1614 '400' => '400',
1615 '500' => '500',
1616 '600' => '600',
1617 '700' => '700',
1618 '800' => '800',
1619 '900' => '900'
1620 ],
1621 'priority' => 155
1622 ]
1623 )
1624 );
1625 }
1626
1627 public function betterdocs_doc_single_content_est_reading_margin() {
1628 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin', [
1629 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin'],
1630 'capability' => 'edit_theme_options',
1631 'transport' => 'postMessage',
1632 'sanitize_callback' => [$this->sanitizer, 'integer']
1633 ] );
1634
1635 $this->customizer->add_control( new TitleControl(
1636 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin', [
1637 'type' => 'betterdocs-title',
1638 'section' => 'betterdocs_single_docs_settings',
1639 'settings' => 'betterdocs_doc_single_content_est_reading_margin',
1640 'label' => __( 'Margin', 'betterdocs' ),
1641 'priority' => 155,
1642 'input_attrs' => [
1643 'id' => 'betterdocs_doc_single_content_est_reading_margin',
1644 'class' => 'betterdocs-dimension'
1645 ]
1646 ] )
1647 );
1648
1649 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_top', [
1650 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_top'],
1651 'capability' => 'edit_theme_options',
1652 'transport' => 'postMessage',
1653 'sanitize_callback' => [$this->sanitizer, 'integer']
1654 ] );
1655
1656 $this->customizer->add_control( new DimensionControl(
1657 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_top', [
1658 'type' => 'betterdocs-dimension',
1659 'section' => 'betterdocs_single_docs_settings',
1660 'settings' => 'betterdocs_doc_single_content_est_reading_margin_top',
1661 'label' => __( 'Top', 'betterdocs' ),
1662 'priority' => 155,
1663 'input_attrs' => [
1664 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1665 ]
1666 ] )
1667 );
1668
1669 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_right', [
1670 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_right'],
1671 'capability' => 'edit_theme_options',
1672 'transport' => 'postMessage',
1673 'sanitize_callback' => [$this->sanitizer, 'integer']
1674 ] );
1675
1676 $this->customizer->add_control( new DimensionControl(
1677 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_right', [
1678 'type' => 'betterdocs-dimension',
1679 'section' => 'betterdocs_single_docs_settings',
1680 'settings' => 'betterdocs_doc_single_content_est_reading_margin_right',
1681 'label' => __( 'Right', 'betterdocs' ),
1682 'priority' => 155,
1683 'input_attrs' => [
1684 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1685 ]
1686 ] )
1687 );
1688
1689 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_bottom', [
1690 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_bottom'],
1691 'capability' => 'edit_theme_options',
1692 'transport' => 'postMessage',
1693 'sanitize_callback' => [$this->sanitizer, 'integer']
1694 ] );
1695
1696 $this->customizer->add_control( new DimensionControl(
1697 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_bottom', [
1698 'type' => 'betterdocs-dimension',
1699 'section' => 'betterdocs_single_docs_settings',
1700 'settings' => 'betterdocs_doc_single_content_est_reading_margin_bottom',
1701 'label' => __( 'Bottom', 'betterdocs' ),
1702 'priority' => 155,
1703 'input_attrs' => [
1704 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1705 ]
1706 ] )
1707 );
1708
1709 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_margin_left', [
1710 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_margin_left'],
1711 'capability' => 'edit_theme_options',
1712 'transport' => 'postMessage',
1713 'sanitize_callback' => [$this->sanitizer, 'integer']
1714 ] );
1715
1716 $this->customizer->add_control( new DimensionControl(
1717 $this->customizer, 'betterdocs_doc_single_content_est_reading_margin_left', [
1718 'type' => 'betterdocs-dimension',
1719 'section' => 'betterdocs_single_docs_settings',
1720 'settings' => 'betterdocs_doc_single_content_est_reading_margin_left',
1721 'label' => __( 'Left', 'betterdocs' ),
1722 'priority' => 155,
1723 'input_attrs' => [
1724 'class' => 'betterdocs_doc_single_content_est_reading_margin betterdocs-dimension'
1725 ]
1726 ] )
1727 );
1728 }
1729
1730 public function betterdocs_doc_single_content_est_reading_padding() {
1731 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding', [
1732 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding'],
1733 'capability' => 'edit_theme_options',
1734 'transport' => 'postMessage',
1735 'sanitize_callback' => [$this->sanitizer, 'integer']
1736
1737 ] );
1738
1739 $this->customizer->add_control( new TitleControl(
1740 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding', [
1741 'type' => 'betterdocs-title',
1742 'section' => 'betterdocs_single_docs_settings',
1743 'settings' => 'betterdocs_doc_single_content_est_reading_padding',
1744 'label' => __( 'Padding', 'betterdocs' ),
1745 'priority' => 155,
1746 'input_attrs' => [
1747 'id' => 'betterdocs_doc_single_content_est_reading_padding',
1748 'class' => 'betterdocs-dimension'
1749 ]
1750 ] )
1751 );
1752
1753 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_top', [
1754 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_top'],
1755 'capability' => 'edit_theme_options',
1756 'transport' => 'postMessage',
1757 'sanitize_callback' => [$this->sanitizer, 'integer']
1758 ] );
1759
1760 $this->customizer->add_control( new DimensionControl(
1761 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_top', [
1762 'type' => 'betterdocs-dimension',
1763 'section' => 'betterdocs_single_docs_settings',
1764 'settings' => 'betterdocs_doc_single_content_est_reading_padding_top',
1765 'label' => __( 'Top', 'betterdocs' ),
1766 'priority' => 155,
1767 'input_attrs' => [
1768 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1769 ]
1770 ] )
1771 );
1772
1773 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_right', [
1774 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_right'],
1775 'capability' => 'edit_theme_options',
1776 'transport' => 'postMessage',
1777 'sanitize_callback' => [$this->sanitizer, 'integer']
1778
1779 ] );
1780
1781 $this->customizer->add_control( new DimensionControl(
1782 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_right', [
1783 'type' => 'betterdocs-dimension',
1784 'section' => 'betterdocs_single_docs_settings',
1785 'settings' => 'betterdocs_doc_single_content_est_reading_padding_right',
1786 'label' => __( 'Right', 'betterdocs' ),
1787 'priority' => 155,
1788 'input_attrs' => [
1789 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1790 ]
1791 ] )
1792 );
1793
1794 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_bottom', [
1795 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_bottom'],
1796 'capability' => 'edit_theme_options',
1797 'transport' => 'postMessage',
1798 'sanitize_callback' => [$this->sanitizer, 'integer']
1799
1800 ] );
1801
1802 $this->customizer->add_control( new DimensionControl(
1803 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_bottom', [
1804 'type' => 'betterdocs-dimension',
1805 'section' => 'betterdocs_single_docs_settings',
1806 'settings' => 'betterdocs_doc_single_content_est_reading_padding_bottom',
1807 'label' => __( 'Bottom', 'betterdocs' ),
1808 'priority' => 155,
1809 'input_attrs' => [
1810 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1811 ]
1812 ] )
1813 );
1814
1815 $this->customizer->add_setting( 'betterdocs_doc_single_content_est_reading_padding_left', [
1816 'default' => $this->defaults['betterdocs_doc_single_content_est_reading_padding_left'],
1817 'capability' => 'edit_theme_options',
1818 'transport' => 'postMessage',
1819 'sanitize_callback' => [$this->sanitizer, 'integer']
1820
1821 ] );
1822
1823 $this->customizer->add_control( new DimensionControl(
1824 $this->customizer, 'betterdocs_doc_single_content_est_reading_padding_left', [
1825 'type' => 'betterdocs-dimension',
1826 'section' => 'betterdocs_single_docs_settings',
1827 'settings' => 'betterdocs_doc_single_content_est_reading_padding_left',
1828 'label' => __( 'Left', 'betterdocs' ),
1829 'priority' => 155,
1830 'input_attrs' => [
1831 'class' => 'betterdocs_doc_single_content_est_reading_padding betterdocs-dimension'
1832 ]
1833 ] )
1834 );
1835 }
1836
1837 public function doc_single_entry_content() {
1838 $this->customizer->add_setting( 'betterdocs_doc_single_entry_content', [
1839 'default' => $this->defaults['betterdocs_doc_single_entry_content'],
1840 'sanitize_callback' => 'esc_html'
1841 ] );
1842
1843 $this->customizer->add_control( new SeparatorControl(
1844 $this->customizer, 'betterdocs_doc_single_entry_content', [
1845 'label' => __( 'Entry Content', 'betterdocs' ),
1846 'priority' => 156,
1847 'settings' => 'betterdocs_doc_single_entry_content',
1848 'section' => 'betterdocs_single_docs_settings'
1849 ] )
1850 );
1851 }
1852
1853 public function single_content_font_size() {
1854 $this->customizer->add_setting( 'betterdocs_single_content_font_size', [
1855 'default' => $this->defaults['betterdocs_single_content_font_size'],
1856 'capability' => 'edit_theme_options',
1857 'transport' => 'postMessage',
1858 'sanitize_callback' => [$this->sanitizer, 'integer']
1859
1860 ] );
1861
1862 $this->customizer->add_control( new RangeValueControl(
1863 $this->customizer, 'betterdocs_single_content_font_size', [
1864 'type' => 'betterdocs-range-value',
1865 'section' => 'betterdocs_single_docs_settings',
1866 'settings' => 'betterdocs_single_content_font_size',
1867 'label' => __( 'Font Size', 'betterdocs' ),
1868 'priority' => 157,
1869 'input_attrs' => [
1870 'class' => '',
1871 'min' => 0,
1872 'max' => 50,
1873 'step' => 1,
1874 'suffix' => 'px' // optional suffix
1875 ]
1876 ] )
1877 );
1878 }
1879
1880 public function single_content_font_color() {
1881 $this->customizer->add_setting( 'betterdocs_single_content_font_color', [
1882 'default' => $this->defaults['betterdocs_single_content_font_color'],
1883 'capability' => 'edit_theme_options',
1884 'transport' => 'postMessage',
1885 'sanitize_callback' => [$this->sanitizer, 'rgba']
1886 ] );
1887
1888 $this->customizer->add_control(
1889 new AlphaColorControl(
1890 $this->customizer,
1891 'betterdocs_single_content_font_color',
1892 [
1893 'label' => __( 'Font Color', 'betterdocs' ),
1894 'priority' => 158,
1895 'section' => 'betterdocs_single_docs_settings',
1896 'settings' => 'betterdocs_single_content_font_color'
1897 ]
1898 )
1899 );
1900 }
1901
1902 public function social_share_title() {
1903 $this->customizer->add_setting( 'betterdocs_social_share_title', [
1904 'default' => '',
1905 'sanitize_callback' => 'esc_html'
1906 ] );
1907
1908 $this->customizer->add_control(
1909 new SeparatorControl(
1910 $this->customizer, 'betterdocs_social_share_title', [
1911 'label' => __( 'Social Share', 'betterdocs' ),
1912 'priority' => 164,
1913 'settings' => 'betterdocs_social_share_title',
1914 'section' => 'betterdocs_single_docs_settings'
1915 ]
1916 )
1917 );
1918 }
1919
1920 public function post_social_share() {
1921 $this->customizer->add_setting( 'betterdocs_post_social_share', [
1922 'default' => $this->defaults['betterdocs_post_social_share'],
1923 'capability' => 'edit_theme_options',
1924 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1925 ] );
1926
1927 $this->customizer->add_control(
1928 new ToggleControl(
1929 $this->customizer, 'betterdocs_post_social_share', [
1930 'label' => __( 'Enable Social Sharing?', 'betterdocs' ),
1931 'priority' => 165,
1932 'section' => 'betterdocs_single_docs_settings',
1933 'settings' => 'betterdocs_post_social_share',
1934 'type' => 'light' // light, ios, flat
1935 ]
1936 )
1937 );
1938 }
1939
1940 public function social_sharing_text() {
1941 $this->customizer->add_setting( 'betterdocs_social_sharing_text', [
1942 'default' => $this->defaults['betterdocs_social_sharing_text'],
1943 'capability' => 'edit_theme_options',
1944 'sanitize_callback' => 'esc_html'
1945 ] );
1946
1947 $this->customizer->add_control(
1948 new SelectControl(
1949 $this->customizer,
1950 'betterdocs_social_sharing_text',
1951 [
1952 'label' => __( 'Social Sharing Title', 'betterdocs' ),
1953 'priority' => 166,
1954 'section' => 'betterdocs_single_docs_settings',
1955 'settings' => 'betterdocs_social_sharing_text',
1956 'type' => 'text'
1957 ]
1958 )
1959 );
1960 }
1961
1962 public function post_social_share_text_color() {
1963 $this->customizer->add_setting( 'betterdocs_post_social_share_text_color', [
1964 'default' => $this->defaults['betterdocs_post_social_share_text_color'],
1965 'capability' => 'edit_theme_options',
1966 'transport' => 'postMessage',
1967 'sanitize_callback' => [$this->sanitizer, 'rgba']
1968 ] );
1969
1970 $this->customizer->add_control(
1971 new AlphaColorControl(
1972 $this->customizer,
1973 'betterdocs_post_social_share_text_color',
1974 [
1975 'label' => __( 'Title Text Color', 'betterdocs' ),
1976 'priority' => 167,
1977 'section' => 'betterdocs_single_docs_settings',
1978 'settings' => 'betterdocs_post_social_share_text_color'
1979 ]
1980 )
1981 );
1982 }
1983
1984 public function post_social_share_facebook() {
1985 $this->customizer->add_setting( 'betterdocs_post_social_share_facebook', [
1986 'default' => $this->defaults['betterdocs_post_social_share_facebook'],
1987 'capability' => 'edit_theme_options',
1988 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1989 ] );
1990
1991 $this->customizer->add_control( new ToggleControl(
1992 $this->customizer, 'betterdocs_post_social_share_facebook', [
1993 'label' => __( 'Facebook Sharing', 'betterdocs' ),
1994 'priority' => 168,
1995 'section' => 'betterdocs_single_docs_settings',
1996 'settings' => 'betterdocs_post_social_share_facebook',
1997 'type' => 'light' // light, ios, flat
1998 ] )
1999 );
2000 }
2001
2002 public function post_social_share_twitter() {
2003 $this->customizer->add_setting( 'betterdocs_post_social_share_twitter', [
2004 'default' => $this->defaults['betterdocs_post_social_share_twitter'],
2005 'capability' => 'edit_theme_options',
2006 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2007 ] );
2008
2009 $this->customizer->add_control( new ToggleControl(
2010 $this->customizer, 'betterdocs_post_social_share_twitter', [
2011 'label' => __( 'Twitter Sharing', 'betterdocs' ),
2012 'priority' => 169,
2013 'section' => 'betterdocs_single_docs_settings',
2014 'settings' => 'betterdocs_post_social_share_twitter',
2015 'type' => 'light' // light, ios, flat
2016 ] )
2017 );
2018 }
2019
2020 public function post_social_share_linkedin() {
2021 $this->customizer->add_setting( 'betterdocs_post_social_share_linkedin', [
2022 'default' => $this->defaults['betterdocs_post_social_share_linkedin'],
2023 'capability' => 'edit_theme_options',
2024 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2025 ] );
2026
2027 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_linkedin', [
2028 'label' => __( 'Linkedin Sharing', 'betterdocs' ),
2029 'priority' => 170,
2030 'section' => 'betterdocs_single_docs_settings',
2031 'settings' => 'betterdocs_post_social_share_linkedin',
2032 'type' => 'light' // light, ios, flat
2033 ] ) );
2034 }
2035
2036 public function post_social_share_pinterest() {
2037 $this->customizer->add_setting( 'betterdocs_post_social_share_pinterest', [
2038 'default' => $this->defaults['betterdocs_post_social_share_pinterest'],
2039 'capability' => 'edit_theme_options',
2040 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2041 ] );
2042
2043 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_pinterest', [
2044 'label' => __( 'Pinterest Sharing', 'betterdocs' ),
2045 'priority' => 171,
2046 'section' => 'betterdocs_single_docs_settings',
2047 'settings' => 'betterdocs_post_social_share_pinterest',
2048 'type' => 'light' // light, ios, flat
2049 ] ) );
2050 }
2051
2052 public function doc_single_entry_footer() {
2053 $this->customizer->add_setting( 'betterdocs_doc_single_entry_footer', [
2054 'default' => $this->defaults['betterdocs_doc_single_entry_footer'],
2055 'sanitize_callback' => 'esc_html'
2056 ] );
2057
2058 $this->customizer->add_control( new SeparatorControl(
2059 $this->customizer, 'betterdocs_doc_single_entry_footer', [
2060 'label' => __( 'Entry Footer', 'betterdocs' ),
2061 'priority' => 172,
2062 'settings' => 'betterdocs_doc_single_entry_footer',
2063 'section' => 'betterdocs_single_docs_settings'
2064 ] )
2065 );
2066 }
2067
2068 public function single_doc_feedback_icon_font_size() {
2069 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon_font_size', [
2070 'default' => $this->defaults['betterdocs_single_doc_feedback_icon_font_size'],
2071 'capability' => 'edit_theme_options',
2072 'transport' => 'postMessage',
2073 'sanitize_callback' => [$this->sanitizer, 'integer']
2074
2075 ] );
2076
2077 $this->customizer->add_control( new RangeValueControl(
2078 $this->customizer, 'betterdocs_single_doc_feedback_icon_font_size', [
2079 'type' => 'betterdocs-range-value',
2080 'section' => 'betterdocs_single_docs_settings',
2081 'settings' => 'betterdocs_single_doc_feedback_icon_font_size',
2082 'label' => __( 'Feedback Icon Size', 'betterdocs' ),
2083 'priority' => 173,
2084 'input_attrs' => [
2085 'class' => '',
2086 'min' => 0,
2087 'max' => 100,
2088 'step' => 1,
2089 'suffix' => 'px' //optional suffix
2090 ]
2091 ] )
2092 );
2093 }
2094
2095 public function single_doc_feedback_icon() {
2096 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon', [
2097 'default' => $this->defaults['betterdocs_single_doc_feedback_icon'],
2098 'capability' => 'edit_theme_options'
2099 ] );
2100
2101 $this->customizer->add_control( new WP_Customize_Image_Control(
2102 $this->customizer, 'betterdocs_single_doc_feedback_icon', [
2103 'section' => 'betterdocs_single_docs_settings',
2104 'settings' => 'betterdocs_single_doc_feedback_icon',
2105 'label' => __( 'Feedback Icon', 'betterdocs' ),
2106 'priority' => 173
2107 ] )
2108 );
2109 }
2110
2111 public function single_doc_feedback_link_color() {
2112 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_color', [
2113 'default' => $this->defaults['betterdocs_single_doc_feedback_link_color'],
2114 'capability' => 'edit_theme_options',
2115 'transport' => 'postMessage',
2116 'sanitize_callback' => [$this->sanitizer, 'rgba']
2117 ] );
2118
2119 $this->customizer->add_control(
2120 new AlphaColorControl(
2121 $this->customizer,
2122 'betterdocs_single_doc_feedback_link_color',
2123 [
2124 'label' => __( 'Feedback Link Color', 'betterdocs' ),
2125 'priority' => 174,
2126 'section' => 'betterdocs_single_docs_settings',
2127 'settings' => 'betterdocs_single_doc_feedback_link_color'
2128 ]
2129 )
2130 );
2131 }
2132
2133 public function single_doc_feedback_link_hover_color() {
2134 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_hover_color', [
2135 'default' => $this->defaults['betterdocs_single_doc_feedback_link_hover_color'],
2136 'capability' => 'edit_theme_options',
2137 'sanitize_callback' => [$this->sanitizer, 'rgba']
2138 ] );
2139
2140 $this->customizer->add_control(
2141 new AlphaColorControl(
2142 $this->customizer,
2143 'betterdocs_single_doc_feedback_link_hover_color',
2144 [
2145 'label' => __( 'Feedback Link Hover Color', 'betterdocs' ),
2146 'priority' => 175,
2147 'section' => 'betterdocs_single_docs_settings',
2148 'settings' => 'betterdocs_single_doc_feedback_link_hover_color'
2149 ]
2150 )
2151 );
2152 }
2153
2154 public function single_doc_feedback_link_font_size() {
2155 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_font_size', [
2156 'default' => $this->defaults['betterdocs_single_doc_feedback_link_font_size'],
2157 'capability' => 'edit_theme_options',
2158 'transport' => 'postMessage',
2159 'sanitize_callback' => [$this->sanitizer, 'integer']
2160
2161 ] );
2162
2163 $this->customizer->add_control( new RangeValueControl(
2164 $this->customizer, 'betterdocs_single_doc_feedback_link_font_size', [
2165 'type' => 'betterdocs-range-value',
2166 'section' => 'betterdocs_single_docs_settings',
2167 'settings' => 'betterdocs_single_doc_feedback_link_font_size',
2168 'label' => __( 'Feedback Link Font Size', 'betterdocs' ),
2169 'priority' => 175,
2170 'input_attrs' => [
2171 'class' => '',
2172 'min' => 0,
2173 'max' => 50,
2174 'step' => 1,
2175 'suffix' => 'px' //optional suffix
2176 ]
2177 ] )
2178 );
2179 }
2180
2181 public function feedback_form_title_tag() {
2182 $this->customizer->add_setting( 'betterdocs_feedback_form_title_tag', [
2183 'default' => $this->defaults['betterdocs_feedback_form_title_tag'],
2184 'capability' => 'edit_theme_options',
2185 'sanitize_callback' => [$this->sanitizer, 'select']
2186 ] );
2187
2188 $this->customizer->add_control(
2189 new WP_Customize_Control(
2190 $this->customizer,
2191 'betterdocs_feedback_form_title_tag',
2192 [
2193 'label' => __( 'Feedback Form Title Tag', 'betterdocs' ),
2194 'section' => 'betterdocs_single_docs_settings',
2195 'settings' => 'betterdocs_feedback_form_title_tag',
2196 'priority' => 175,
2197 'type' => 'select',
2198 'choices' => [
2199 'h1' => 'h1',
2200 'h2' => 'h2',
2201 'h3' => 'h3',
2202 'h4' => 'h4',
2203 'h5' => 'h5',
2204 'h6' => 'h6',
2205 'p' => 'p'
2206 ]
2207 ]
2208 )
2209 );
2210 }
2211
2212 public function single_doc_feedback_title_font_size() {
2213 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_font_size', [
2214 'default' => $this->defaults['betterdocs_single_doc_feedback_title_font_size'],
2215 'capability' => 'edit_theme_options',
2216 'transport' => 'postMessage',
2217 'sanitize_callback' => [$this->sanitizer, 'integer']
2218
2219 ] );
2220
2221 $this->customizer->add_control( new RangeValueControl(
2222 $this->customizer, 'betterdocs_single_doc_feedback_title_font_size', [
2223 'type' => 'betterdocs-range-value',
2224 'section' => 'betterdocs_single_docs_settings',
2225 'settings' => 'betterdocs_single_doc_feedback_title_font_size',
2226 'label' => __( 'Feedback Form Title Font Size', 'betterdocs' ),
2227 'priority' => 175,
2228 'input_attrs' => [
2229 'class' => '',
2230 'min' => 0,
2231 'max' => 100,
2232 'step' => 1,
2233 'suffix' => 'px' //optional suffix
2234 ]
2235 ] )
2236 );
2237 }
2238
2239 public function single_doc_feedback_title_color() {
2240 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_color', [
2241 'default' => $this->defaults['betterdocs_single_doc_feedback_title_color'],
2242 'capability' => 'edit_theme_options',
2243 'transport' => 'postMessage',
2244 'sanitize_callback' => [$this->sanitizer, 'rgba']
2245 ] );
2246
2247 $this->customizer->add_control(
2248 new AlphaColorControl(
2249 $this->customizer,
2250 'betterdocs_single_doc_feedback_title_color',
2251 [
2252 'label' => __( 'Feedback Form Title Color', 'betterdocs' ),
2253 'priority' => 175,
2254 'section' => 'betterdocs_single_docs_settings',
2255 'settings' => 'betterdocs_single_doc_feedback_title_color'
2256 ]
2257 )
2258 );
2259 }
2260
2261 public function single_doc_navigation_color() {
2262 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_color', [
2263 'default' => $this->defaults['betterdocs_single_doc_navigation_color'],
2264 'capability' => 'edit_theme_options',
2265 'transport' => 'postMessage',
2266 'sanitize_callback' => [$this->sanitizer, 'rgba']
2267 ] );
2268
2269 $this->customizer->add_control(
2270 new AlphaColorControl(
2271 $this->customizer,
2272 'betterdocs_single_doc_navigation_color',
2273 [
2274 'label' => __( 'Navigation Color', 'betterdocs' ),
2275 'priority' => 177,
2276 'section' => 'betterdocs_single_docs_settings',
2277 'settings' => 'betterdocs_single_doc_navigation_color'
2278 ]
2279 )
2280 );
2281 }
2282
2283 public function single_doc_navigation_font_size() {
2284 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_font_size', [
2285 'default' => $this->defaults['betterdocs_single_doc_navigation_font_size'],
2286 'capability' => 'edit_theme_options',
2287 'transport' => 'postMessage',
2288 'sanitize_callback' => [$this->sanitizer, 'integer']
2289
2290 ] );
2291
2292 $this->customizer->add_control( new RangeValueControl(
2293 $this->customizer, 'betterdocs_single_doc_navigation_font_size', [
2294 'type' => 'betterdocs-range-value',
2295 'section' => 'betterdocs_single_docs_settings',
2296 'settings' => 'betterdocs_single_doc_navigation_font_size',
2297 'label' => __( 'Navigation Font Size', 'betterdocs' ),
2298 'priority' => 178,
2299 'input_attrs' => [
2300 'class' => '',
2301 'min' => 0,
2302 'max' => 50,
2303 'step' => 1,
2304 'suffix' => 'px' //optional suffix
2305 ]
2306 ] )
2307 );
2308 }
2309
2310 public function single_doc_navigation_hover_color() {
2311 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_hover_color', [
2312 'default' => $this->defaults['betterdocs_single_doc_navigation_hover_color'],
2313 'capability' => 'edit_theme_options',
2314 'sanitize_callback' => [$this->sanitizer, 'rgba']
2315 ] );
2316
2317 $this->customizer->add_control(
2318 new AlphaColorControl(
2319 $this->customizer,
2320 'betterdocs_single_doc_navigation_hover_color',
2321 [
2322 'label' => __( 'Navigation Hover Color', 'betterdocs' ),
2323 'priority' => 179,
2324 'section' => 'betterdocs_single_docs_settings',
2325 'settings' => 'betterdocs_single_doc_navigation_hover_color'
2326 ]
2327 )
2328 );
2329 }
2330
2331 public function single_doc_navigation_arrow_color() {
2332 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_color', [
2333 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_color'],
2334 'capability' => 'edit_theme_options',
2335 'transport' => 'postMessage',
2336 'sanitize_callback' => [$this->sanitizer, 'rgba']
2337 ] );
2338
2339 $this->customizer->add_control(
2340 new AlphaColorControl(
2341 $this->customizer,
2342 'betterdocs_single_doc_navigation_arrow_color',
2343 [
2344 'label' => __( 'Navigation Arrow Color', 'betterdocs' ),
2345 'priority' => 180,
2346 'section' => 'betterdocs_single_docs_settings',
2347 'settings' => 'betterdocs_single_doc_navigation_arrow_color'
2348 ]
2349 )
2350 );
2351 }
2352
2353 public function single_doc_navigation_arrow_font_size() {
2354 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_font_size', [
2355 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_font_size'],
2356 'capability' => 'edit_theme_options',
2357 'transport' => 'postMessage',
2358 'sanitize_callback' => [$this->sanitizer, 'integer']
2359
2360 ] );
2361
2362 $this->customizer->add_control( new RangeValueControl(
2363 $this->customizer, 'betterdocs_single_doc_navigation_arrow_font_size', [
2364 'type' => 'betterdocs-range-value',
2365 'section' => 'betterdocs_single_docs_settings',
2366 'settings' => 'betterdocs_single_doc_navigation_arrow_font_size',
2367 'label' => __( 'Navigation Arrow Font Size', 'betterdocs' ),
2368 'priority' => 181,
2369 'input_attrs' => [
2370 'class' => '',
2371 'min' => 0,
2372 'max' => 50,
2373 'step' => 1,
2374 'suffix' => 'px' //optional suffix
2375 ]
2376 ] )
2377 );
2378 }
2379
2380 public function betterdocs_single_doc_lu_time_color() {
2381 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_color', [
2382 'default' => $this->defaults['betterdocs_single_doc_lu_time_color'],
2383 'capability' => 'edit_theme_options',
2384 'transport' => 'postMessage',
2385 'sanitize_callback' => [$this->sanitizer, 'rgba']
2386 ] );
2387
2388 $this->customizer->add_control(
2389 new AlphaColorControl(
2390 $this->customizer,
2391 'betterdocs_single_doc_lu_time_color',
2392 [
2393 'label' => __( 'Last Updated Time Color', 'betterdocs' ),
2394 'priority' => 182,
2395 'section' => 'betterdocs_single_docs_settings',
2396 'settings' => 'betterdocs_single_doc_lu_time_color'
2397 ]
2398 )
2399 );
2400 }
2401
2402 public function single_doc_lu_time_font_size() {
2403 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_font_size', [
2404 'default' => $this->defaults['betterdocs_single_doc_lu_time_font_size'],
2405 'capability' => 'edit_theme_options',
2406 'transport' => 'postMessage',
2407 'sanitize_callback' => [$this->sanitizer, 'integer']
2408
2409 ] );
2410
2411 $this->customizer->add_control( new RangeValueControl(
2412 $this->customizer, 'betterdocs_single_doc_lu_time_font_size', [
2413 'type' => 'betterdocs-range-value',
2414 'section' => 'betterdocs_single_docs_settings',
2415 'settings' => 'betterdocs_single_doc_lu_time_font_size',
2416 'label' => __( 'Last Updated Time Font Size', 'betterdocs' ),
2417 'priority' => 183,
2418 'input_attrs' => [
2419 'class' => '',
2420 'min' => 0,
2421 'max' => 50,
2422 'step' => 1,
2423 'suffix' => 'px' //optional suffix
2424 ]
2425 ] )
2426 );
2427 }
2428
2429 public function single_doc_powered_by_color() {
2430 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_color', [
2431 'default' => $this->defaults['betterdocs_single_doc_powered_by_color'],
2432 'capability' => 'edit_theme_options',
2433 'transport' => 'postMessage',
2434 'sanitize_callback' => [$this->sanitizer, 'rgba']
2435 ] );
2436
2437 $this->customizer->add_control(
2438 new AlphaColorControl(
2439 $this->customizer,
2440 'betterdocs_single_doc_powered_by_color',
2441 [
2442 'label' => __( 'Powered by Color', 'betterdocs' ),
2443 'priority' => 184,
2444 'section' => 'betterdocs_single_docs_settings',
2445 'settings' => 'betterdocs_single_doc_powered_by_color'
2446 ]
2447 )
2448 );
2449 }
2450
2451 public function single_doc_powered_by_font_size() {
2452 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_font_size', [
2453 'default' => $this->defaults['betterdocs_single_doc_powered_by_font_size'],
2454 'capability' => 'edit_theme_options',
2455 'transport' => 'postMessage',
2456 'sanitize_callback' => [$this->sanitizer, 'integer']
2457
2458 ] );
2459
2460 $this->customizer->add_control( new RangeValueControl(
2461 $this->customizer, 'betterdocs_single_doc_powered_by_font_size', [
2462 'type' => 'betterdocs-range-value',
2463 'section' => 'betterdocs_single_docs_settings',
2464 'settings' => 'betterdocs_single_doc_powered_by_font_size',
2465 'label' => __( 'Powered By Font Size', 'betterdocs' ),
2466 'priority' => 185,
2467 'input_attrs' => [
2468 'class' => '',
2469 'min' => 0,
2470 'max' => 50,
2471 'step' => 1,
2472 'suffix' => 'px' //optional suffix
2473 ]
2474 ] )
2475 );
2476 }
2477
2478 public function single_doc_powered_by_link_color() {
2479 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_link_color', [
2480 'default' => $this->defaults['betterdocs_single_doc_powered_by_link_color'],
2481 'capability' => 'edit_theme_options',
2482 'transport' => 'postMessage',
2483 'sanitize_callback' => [$this->sanitizer, 'rgba']
2484 ] );
2485
2486 $this->customizer->add_control(
2487 new AlphaColorControl(
2488 $this->customizer,
2489 'betterdocs_single_doc_powered_by_link_color',
2490 [
2491 'label' => __( 'Powered By Link Color', 'betterdocs' ),
2492 'priority' => 186,
2493 'section' => 'betterdocs_single_docs_settings',
2494 'settings' => 'betterdocs_single_doc_powered_by_link_color'
2495 ]
2496 )
2497 );
2498 }
2499
2500 public function reactions_title() {
2501 $this->customizer->add_setting( 'betterdocs_reactions_title', [
2502 'default' => '',
2503 'sanitize_callback' => 'esc_html'
2504 ] );
2505
2506 $this->customizer->add_control( new SeparatorControl(
2507 $this->customizer, 'betterdocs_reactions_title', [
2508 'label' => __( 'Reactions', 'betterdocs' ),
2509 'priority' => 159,
2510 'settings' => 'betterdocs_reactions_title',
2511 'section' => 'betterdocs_single_docs_settings'
2512 ] )
2513 );
2514 }
2515
2516 public function post_reactions() {
2517 $this->customizer->add_setting( 'betterdocs_post_reactions', [
2518 'default' => $this->defaults['betterdocs_post_reactions'],
2519 'capability' => 'edit_theme_options',
2520 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2521 ] );
2522
2523 $this->customizer->add_control( new ToggleControl(
2524 $this->customizer, 'betterdocs_post_reactions', [
2525 'label' => __( 'Enable Reactions?', 'betterdocs' ),
2526 'priority' => 160,
2527 'section' => 'betterdocs_single_docs_settings',
2528 'settings' => 'betterdocs_post_reactions',
2529 'type' => 'light' // light, ios, flat
2530 ] )
2531 );
2532 }
2533
2534 public function post_reactions_text() {
2535 $this->customizer->add_setting( 'betterdocs_post_reactions_text', [
2536 'default' => $this->defaults['betterdocs_post_reactions_text'],
2537 'capability' => 'edit_theme_options',
2538 'sanitize_callback' => 'esc_html'
2539 ] );
2540
2541 $this->customizer->add_control(
2542 new SelectControl(
2543 $this->customizer,
2544 'betterdocs_post_reactions_text',
2545 [
2546 'label' => __( 'Reactions Title', 'betterdocs' ),
2547 'priority' => 161,
2548 'section' => 'betterdocs_single_docs_settings',
2549 'settings' => 'betterdocs_post_reactions_text',
2550 'type' => 'text'
2551 ]
2552 )
2553 );
2554 }
2555
2556 public function reactions_background_color() {
2557 $this->customizer->add_setting( 'reactions_background_color', [
2558 'default' => $this->defaults['reactions_background_color'],
2559 'capability' => 'edit_theme_options',
2560 'transport' => 'postMessage',
2561 'sanitize_callback' => [$this->sanitizer, 'rgba']
2562 ] );
2563
2564 $this->customizer->add_control(
2565 new AlphaColorControl(
2566 $this->customizer,
2567 'reactions_background_color',
2568 [
2569 'label' => __( 'Reactions Background Color', 'betterdocs' ),
2570 'priority' => 162,
2571 'section' => 'betterdocs_single_docs_settings',
2572 'settings' => 'reactions_background_color'
2573 ]
2574 )
2575 );
2576 }
2577
2578 public function post_reactions_text_color() {
2579 $this->customizer->add_setting( 'betterdocs_post_reactions_text_color', [
2580 'default' => $this->defaults['betterdocs_post_reactions_text_color'],
2581 'capability' => 'edit_theme_options',
2582 'transport' => 'postMessage',
2583 'sanitize_callback' => [$this->sanitizer, 'rgba']
2584 ] );
2585
2586 $this->customizer->add_control(
2587 new AlphaColorControl(
2588 $this->customizer,
2589 'betterdocs_post_reactions_text_color',
2590 [
2591 'label' => __( 'Reactions Text Color', 'betterdocs' ),
2592 'priority' => 162,
2593 'section' => 'betterdocs_single_docs_settings',
2594 'settings' => 'betterdocs_post_reactions_text_color'
2595 ]
2596 )
2597 );
2598 }
2599
2600 public function post_reactions_icon_color() {
2601 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_color', [
2602 'default' => $this->defaults['betterdocs_post_reactions_icon_color'],
2603 'capability' => 'edit_theme_options',
2604 'transport' => 'postMessage',
2605 'sanitize_callback' => [$this->sanitizer, 'rgba']
2606 ] );
2607
2608 $this->customizer->add_control(
2609 new AlphaColorControl(
2610 $this->customizer,
2611 'betterdocs_post_reactions_icon_color',
2612 [
2613 'label' => __( 'Reactions Icon Background Color', 'betterdocs' ),
2614 'priority' => 163,
2615 'section' => 'betterdocs_single_docs_settings',
2616 'settings' => 'betterdocs_post_reactions_icon_color'
2617 ]
2618 )
2619 );
2620 }
2621
2622 public function post_reactions_icon_svg_color() {
2623 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_svg_color', [
2624 'default' => $this->defaults['betterdocs_post_reactions_icon_svg_color'],
2625 'capability' => 'edit_theme_options',
2626 'transport' => 'postMessage',
2627 'sanitize_callback' => [$this->sanitizer, 'rgba']
2628 ] );
2629
2630 $this->customizer->add_control(
2631 new AlphaColorControl(
2632 $this->customizer,
2633 'betterdocs_post_reactions_icon_svg_color',
2634 [
2635 'label' => __( 'Reactions Icon Color', 'betterdocs' ),
2636 'priority' => 163,
2637 'section' => 'betterdocs_single_docs_settings',
2638 'settings' => 'betterdocs_post_reactions_icon_svg_color'
2639 ]
2640 )
2641 );
2642 }
2643
2644 public function post_reactions_icon_hover_bg_color() {
2645 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_bg_color', [
2646 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_bg_color'],
2647 'capability' => 'edit_theme_options',
2648 'sanitize_callback' => [$this->sanitizer, 'rgba']
2649 ] );
2650
2651 $this->customizer->add_control(
2652 new AlphaColorControl(
2653 $this->customizer,
2654 'betterdocs_post_reactions_icon_hover_bg_color',
2655 [
2656 'label' => __( 'Reactions Icon Hover Background Color', 'betterdocs' ),
2657 'priority' => 163,
2658 'section' => 'betterdocs_single_docs_settings',
2659 'settings' => 'betterdocs_post_reactions_icon_hover_bg_color'
2660 ]
2661 )
2662 );
2663 }
2664
2665 public function post_reactions_icon_hover_svg_color() {
2666 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_svg_color', [
2667 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_svg_color'],
2668 'capability' => 'edit_theme_options',
2669 'sanitize_callback' => [$this->sanitizer, 'rgba']
2670 ] );
2671
2672 $this->customizer->add_control(
2673 new AlphaColorControl(
2674 $this->customizer,
2675 'betterdocs_post_reactions_icon_hover_svg_color',
2676 [
2677 'label' => __( 'Reactions Icon Hover Color', 'betterdocs' ),
2678 'priority' => 163,
2679 'section' => 'betterdocs_single_docs_settings',
2680 'settings' => 'betterdocs_post_reactions_icon_hover_svg_color'
2681 ]
2682 )
2683 );
2684 }
2685
2686 public function attachments_heading() {
2687 $this->customizer->add_setting( 'betterdocs_single_doc_attachment_heading', [
2688 'default' => '',
2689 'sanitize_callback' => 'esc_html'
2690 ] );
2691
2692 $this->customizer->add_control( new SeparatorControl(
2693 $this->customizer, 'betterdocs_single_doc_attachment_heading', [
2694 'label' => __( 'Attachments', 'betterdocs' ),
2695 'priority' => 163,
2696 'settings' => 'betterdocs_single_doc_attachment_heading',
2697 'section' => 'betterdocs_single_docs_settings'
2698 ] )
2699 );
2700 }
2701
2702 public function betterdocs_doc_single_attachment_content_bg_color() {
2703 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_bg_color', [
2704 'default' => $this->defaults['betterdocs_doc_single_attachment_content_bg_color'],
2705 'capability' => 'edit_theme_options',
2706 'transport' => 'postMessage',
2707 'sanitize_callback' => [$this->sanitizer, 'rgba']
2708 ] );
2709
2710 $this->customizer->add_control(
2711 new AlphaColorControl(
2712 $this->customizer,
2713 'betterdocs_doc_single_attachment_content_bg_color',
2714 [
2715 'label' => __( 'Content Background Color', 'betterdocs' ),
2716 'section' => 'betterdocs_single_docs_settings',
2717 'settings' => 'betterdocs_doc_single_attachment_content_bg_color',
2718 'priority' => 163
2719 ]
2720 )
2721 );
2722 }
2723
2724 public function betterdocs_doc_single_attachment_content_padding() {
2725 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding', [
2726 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding'],
2727 'capability' => 'edit_theme_options',
2728 'transport' => 'postMessage',
2729 'sanitize_callback' => [$this->sanitizer, 'integer']
2730
2731 ] );
2732
2733 $this->customizer->add_control( new TitleControl(
2734 $this->customizer, 'betterdocs_doc_single_attachment_content_padding', [
2735 'type' => 'betterdocs-title',
2736 'section' => 'betterdocs_single_docs_settings',
2737 'settings' => 'betterdocs_doc_single_attachment_content_padding',
2738 'label' => __( 'Content Padding', 'betterdocs' ),
2739 'priority' => 163,
2740 'input_attrs' => [
2741 'id' => 'betterdocs_doc_single_attachment_content_padding',
2742 'class' => 'betterdocs-dimension'
2743 ]
2744 ] )
2745 );
2746
2747 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_top', [
2748 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_top'],
2749 'capability' => 'edit_theme_options',
2750 'transport' => 'postMessage',
2751 'sanitize_callback' => [$this->sanitizer, 'integer']
2752 ] );
2753
2754 $this->customizer->add_control( new DimensionControl(
2755 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_top', [
2756 'type' => 'betterdocs-dimension',
2757 'section' => 'betterdocs_single_docs_settings',
2758 'settings' => 'betterdocs_doc_single_attachment_content_padding_top',
2759 'label' => __( 'Top', 'betterdocs' ),
2760 'priority' => 163,
2761 'input_attrs' => [
2762 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2763 ]
2764 ] )
2765 );
2766
2767 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_right', [
2768 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_right'],
2769 'capability' => 'edit_theme_options',
2770 'transport' => 'postMessage',
2771 'sanitize_callback' => [$this->sanitizer, 'integer']
2772
2773 ] );
2774
2775 $this->customizer->add_control( new DimensionControl(
2776 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_right', [
2777 'type' => 'betterdocs-dimension',
2778 'section' => 'betterdocs_single_docs_settings',
2779 'settings' => 'betterdocs_doc_single_attachment_content_padding_right',
2780 'label' => __( 'Right', 'betterdocs' ),
2781 'priority' => 163,
2782 'input_attrs' => [
2783 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2784 ]
2785 ] )
2786 );
2787
2788 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_bottom', [
2789 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_bottom'],
2790 'capability' => 'edit_theme_options',
2791 'transport' => 'postMessage',
2792 'sanitize_callback' => [$this->sanitizer, 'integer']
2793
2794 ] );
2795
2796 $this->customizer->add_control( new DimensionControl(
2797 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_bottom', [
2798 'type' => 'betterdocs-dimension',
2799 'section' => 'betterdocs_single_docs_settings',
2800 'settings' => 'betterdocs_doc_single_attachment_content_padding_bottom',
2801 'label' => __( 'Bottom', 'betterdocs' ),
2802 'priority' => 163,
2803 'input_attrs' => [
2804 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2805 ]
2806 ] )
2807 );
2808
2809 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_left', [
2810 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_left'],
2811 'capability' => 'edit_theme_options',
2812 'transport' => 'postMessage',
2813 'sanitize_callback' => [$this->sanitizer, 'integer']
2814
2815 ] );
2816
2817 $this->customizer->add_control( new DimensionControl(
2818 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_left', [
2819 'type' => 'betterdocs-dimension',
2820 'section' => 'betterdocs_single_docs_settings',
2821 'settings' => 'betterdocs_doc_single_attachment_content_padding_left',
2822 'label' => __( 'Left', 'betterdocs' ),
2823 'priority' => 163,
2824 'input_attrs' => [
2825 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2826 ]
2827 ] )
2828 );
2829 }
2830
2831 public function betterdocs_doc_single_attachment_content_margin() {
2832 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin', [
2833 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin'],
2834 'capability' => 'edit_theme_options',
2835 'transport' => 'postMessage',
2836 'sanitize_callback' => [$this->sanitizer, 'integer']
2837
2838 ] );
2839
2840 $this->customizer->add_control( new TitleControl(
2841 $this->customizer, 'betterdocs_doc_single_attachment_content_margin', [
2842 'type' => 'betterdocs-title',
2843 'section' => 'betterdocs_single_docs_settings',
2844 'settings' => 'betterdocs_doc_single_attachment_content_margin',
2845 'label' => __( 'Content Margin', 'betterdocs' ),
2846 'priority' => 163,
2847 'input_attrs' => [
2848 'id' => 'betterdocs_doc_single_attachment_content_margin',
2849 'class' => 'betterdocs-dimension'
2850 ]
2851 ] )
2852 );
2853
2854 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_top', [
2855 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_top'],
2856 'capability' => 'edit_theme_options',
2857 'transport' => 'postMessage',
2858 'sanitize_callback' => [$this->sanitizer, 'integer']
2859 ] );
2860
2861 $this->customizer->add_control( new DimensionControl(
2862 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_top', [
2863 'type' => 'betterdocs-dimension',
2864 'section' => 'betterdocs_single_docs_settings',
2865 'settings' => 'betterdocs_doc_single_attachment_content_margin_top',
2866 'label' => __( 'Top', 'betterdocs' ),
2867 'priority' => 163,
2868 'input_attrs' => [
2869 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2870 ]
2871 ] )
2872 );
2873
2874 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_right', [
2875 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_right'],
2876 'capability' => 'edit_theme_options',
2877 'transport' => 'postMessage',
2878 'sanitize_callback' => [$this->sanitizer, 'integer']
2879
2880 ] );
2881
2882 $this->customizer->add_control( new DimensionControl(
2883 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_right', [
2884 'type' => 'betterdocs-dimension',
2885 'section' => 'betterdocs_single_docs_settings',
2886 'settings' => 'betterdocs_doc_single_attachment_content_margin_right',
2887 'label' => __( 'Right', 'betterdocs' ),
2888 'priority' => 163,
2889 'input_attrs' => [
2890 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2891 ]
2892 ] )
2893 );
2894
2895 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_bottom', [
2896 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_bottom'],
2897 'capability' => 'edit_theme_options',
2898 'transport' => 'postMessage',
2899 'sanitize_callback' => [$this->sanitizer, 'integer']
2900
2901 ] );
2902
2903 $this->customizer->add_control( new DimensionControl(
2904 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_bottom', [
2905 'type' => 'betterdocs-dimension',
2906 'section' => 'betterdocs_single_docs_settings',
2907 'settings' => 'betterdocs_doc_single_attachment_content_margin_bottom',
2908 'label' => __( 'Bottom', 'betterdocs' ),
2909 'priority' => 163,
2910 'input_attrs' => [
2911 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2912 ]
2913 ] )
2914 );
2915
2916 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_left', [
2917 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_left'],
2918 'capability' => 'edit_theme_options',
2919 'transport' => 'postMessage',
2920 'sanitize_callback' => [$this->sanitizer, 'integer']
2921
2922 ] );
2923
2924 $this->customizer->add_control( new DimensionControl(
2925 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_left', [
2926 'type' => 'betterdocs-dimension',
2927 'section' => 'betterdocs_single_docs_settings',
2928 'settings' => 'betterdocs_doc_single_attachment_content_margin_left',
2929 'label' => __( 'Left', 'betterdocs' ),
2930 'priority' => 163,
2931 'input_attrs' => [
2932 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2933 ]
2934 ] )
2935 );
2936 }
2937
2938 public function betterdocs_doc_single_attachment_label_color() {
2939 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_color', [
2940 'default' => $this->defaults['betterdocs_doc_single_attachment_label_color'],
2941 'capability' => 'edit_theme_options',
2942 'transport' => 'postMessage',
2943 'sanitize_callback' => [$this->sanitizer, 'rgba']
2944 ] );
2945
2946 $this->customizer->add_control(
2947 new AlphaColorControl(
2948 $this->customizer,
2949 'betterdocs_doc_single_attachment_label_color',
2950 [
2951 'label' => __( 'Label Color', 'betterdocs' ),
2952 'section' => 'betterdocs_single_docs_settings',
2953 'settings' => 'betterdocs_doc_single_attachment_label_color',
2954 'priority' => 163
2955 ]
2956 )
2957 );
2958 }
2959
2960 public function betterdocs_doc_single_attachment_label_padding() {
2961 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding', [
2962 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding'],
2963 'capability' => 'edit_theme_options',
2964 'transport' => 'postMessage',
2965 'sanitize_callback' => [$this->sanitizer, 'integer']
2966
2967 ] );
2968
2969 $this->customizer->add_control( new TitleControl(
2970 $this->customizer, 'betterdocs_doc_single_attachment_label_padding', [
2971 'type' => 'betterdocs-title',
2972 'section' => 'betterdocs_single_docs_settings',
2973 'settings' => 'betterdocs_doc_single_attachment_label_padding',
2974 'label' => __( 'Label Padding', 'betterdocs' ),
2975 'priority' => 163,
2976 'input_attrs' => [
2977 'id' => 'betterdocs_doc_single_attachment_label_padding',
2978 'class' => 'betterdocs-dimension'
2979 ]
2980 ] )
2981 );
2982
2983 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_top', [
2984 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_top'],
2985 'capability' => 'edit_theme_options',
2986 'transport' => 'postMessage',
2987 'sanitize_callback' => [$this->sanitizer, 'integer']
2988 ] );
2989
2990 $this->customizer->add_control( new DimensionControl(
2991 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_top', [
2992 'type' => 'betterdocs-dimension',
2993 'section' => 'betterdocs_single_docs_settings',
2994 'settings' => 'betterdocs_doc_single_attachment_label_padding_top',
2995 'label' => __( 'Top', 'betterdocs' ),
2996 'priority' => 163,
2997 'input_attrs' => [
2998 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2999 ]
3000 ] )
3001 );
3002
3003 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_right', [
3004 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_right'],
3005 'capability' => 'edit_theme_options',
3006 'transport' => 'postMessage',
3007 'sanitize_callback' => [$this->sanitizer, 'integer']
3008
3009 ] );
3010
3011 $this->customizer->add_control( new DimensionControl(
3012 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_right', [
3013 'type' => 'betterdocs-dimension',
3014 'section' => 'betterdocs_single_docs_settings',
3015 'settings' => 'betterdocs_doc_single_attachment_label_padding_right',
3016 'label' => __( 'Right', 'betterdocs' ),
3017 'priority' => 163,
3018 'input_attrs' => [
3019 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
3020 ]
3021 ] )
3022 );
3023
3024 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_bottom', [
3025 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_bottom'],
3026 'capability' => 'edit_theme_options',
3027 'transport' => 'postMessage',
3028 'sanitize_callback' => [$this->sanitizer, 'integer']
3029
3030 ] );
3031
3032 $this->customizer->add_control( new DimensionControl(
3033 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_bottom', [
3034 'type' => 'betterdocs-dimension',
3035 'section' => 'betterdocs_single_docs_settings',
3036 'settings' => 'betterdocs_doc_single_attachment_label_padding_bottom',
3037 'label' => __( 'Bottom', 'betterdocs' ),
3038 'priority' => 163,
3039 'input_attrs' => [
3040 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
3041 ]
3042 ] )
3043 );
3044
3045 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_left', [
3046 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_left'],
3047 'capability' => 'edit_theme_options',
3048 'transport' => 'postMessage',
3049 'sanitize_callback' => [$this->sanitizer, 'integer']
3050
3051 ] );
3052
3053 $this->customizer->add_control( new DimensionControl(
3054 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_left', [
3055 'type' => 'betterdocs-dimension',
3056 'section' => 'betterdocs_single_docs_settings',
3057 'settings' => 'betterdocs_doc_single_attachment_label_padding_left',
3058 'label' => __( 'Left', 'betterdocs' ),
3059 'priority' => 163,
3060 'input_attrs' => [
3061 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
3062 ]
3063 ] )
3064 );
3065 }
3066
3067 public function betterdocs_doc_single_attachment_label_margin() {
3068 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin', [
3069 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin'],
3070 'capability' => 'edit_theme_options',
3071 'transport' => 'postMessage',
3072 'sanitize_callback' => [$this->sanitizer, 'integer']
3073
3074 ] );
3075
3076 $this->customizer->add_control( new TitleControl(
3077 $this->customizer, 'betterdocs_doc_single_attachment_label_margin', [
3078 'type' => 'betterdocs-title',
3079 'section' => 'betterdocs_single_docs_settings',
3080 'settings' => 'betterdocs_doc_single_attachment_label_margin',
3081 'label' => __( 'Label Margin', 'betterdocs' ),
3082 'priority' => 163,
3083 'input_attrs' => [
3084 'id' => 'betterdocs_doc_single_attachment_label_margin',
3085 'class' => 'betterdocs-dimension'
3086 ]
3087 ] )
3088 );
3089
3090 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_top', [
3091 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_top'],
3092 'capability' => 'edit_theme_options',
3093 'transport' => 'postMessage',
3094 'sanitize_callback' => [$this->sanitizer, 'integer']
3095 ] );
3096
3097 $this->customizer->add_control( new DimensionControl(
3098 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_top', [
3099 'type' => 'betterdocs-dimension',
3100 'section' => 'betterdocs_single_docs_settings',
3101 'settings' => 'betterdocs_doc_single_attachment_label_margin_top',
3102 'label' => __( 'Top', 'betterdocs' ),
3103 'priority' => 163,
3104 'input_attrs' => [
3105 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3106 ]
3107 ] )
3108 );
3109
3110 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_right', [
3111 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_right'],
3112 'capability' => 'edit_theme_options',
3113 'transport' => 'postMessage',
3114 'sanitize_callback' => [$this->sanitizer, 'integer']
3115
3116 ] );
3117
3118 $this->customizer->add_control( new DimensionControl(
3119 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_right', [
3120 'type' => 'betterdocs-dimension',
3121 'section' => 'betterdocs_single_docs_settings',
3122 'settings' => 'betterdocs_doc_single_attachment_label_margin_right',
3123 'label' => __( 'Right', 'betterdocs' ),
3124 'priority' => 163,
3125 'input_attrs' => [
3126 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3127 ]
3128 ] )
3129 );
3130
3131 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_bottom', [
3132 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_bottom'],
3133 'capability' => 'edit_theme_options',
3134 'transport' => 'postMessage',
3135 'sanitize_callback' => [$this->sanitizer, 'integer']
3136 ] );
3137
3138 $this->customizer->add_control( new DimensionControl(
3139 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_bottom', [
3140 'type' => 'betterdocs-dimension',
3141 'section' => 'betterdocs_single_docs_settings',
3142 'settings' => 'betterdocs_doc_single_attachment_label_margin_bottom',
3143 'label' => __( 'Bottom', 'betterdocs' ),
3144 'priority' => 163,
3145 'input_attrs' => [
3146 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3147 ]
3148 ] )
3149 );
3150
3151 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_left', [
3152 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_left'],
3153 'capability' => 'edit_theme_options',
3154 'transport' => 'postMessage',
3155 'sanitize_callback' => [$this->sanitizer, 'integer']
3156 ] );
3157
3158 $this->customizer->add_control( new DimensionControl(
3159 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_left', [
3160 'type' => 'betterdocs-dimension',
3161 'section' => 'betterdocs_single_docs_settings',
3162 'settings' => 'betterdocs_doc_single_attachment_label_margin_left',
3163 'label' => __( 'Left', 'betterdocs' ),
3164 'priority' => 163,
3165 'input_attrs' => [
3166 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
3167 ]
3168 ] )
3169 );
3170 }
3171
3172 public function betterdocs_doc_single_attachment_list_font_size() {
3173 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_font_size', [
3174 'default' => $this->defaults['betterdocs_doc_single_attachment_list_font_size'],
3175 'capability' => 'edit_theme_options',
3176 'transport' => 'postMessage',
3177 'sanitize_callback' => [$this->sanitizer, 'integer']
3178
3179 ] );
3180
3181 $this->customizer->add_control( new RangeValueControl(
3182 $this->customizer, 'betterdocs_doc_single_attachment_list_font_size', [
3183 'type' => 'betterdocs-range-value',
3184 'section' => 'betterdocs_single_docs_settings',
3185 'settings' => 'betterdocs_doc_single_attachment_list_font_size',
3186 'label' => __( 'List Font Size', 'betterdocs' ),
3187 'priority' => 163,
3188 'input_attrs' => [
3189 'min' => 0,
3190 'max' => 50,
3191 'step' => 1,
3192 'suffix' => 'px' //optional suffix
3193 ]
3194 ] )
3195 );
3196 }
3197
3198 public function betterdocs_doc_single_attachment_list_font_weight() {
3199 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_font_weight', [
3200 'default' => $this->defaults['betterdocs_doc_single_attachment_list_font_weight'],
3201 'capability' => 'edit_theme_options',
3202 'sanitize_callback' => [$this->sanitizer, 'choices']
3203 ] );
3204
3205 $this->customizer->add_control(
3206 new WP_Customize_Control(
3207 $this->customizer,
3208 'betterdocs_doc_single_attachment_list_font_weight',
3209 [
3210 'label' => __( 'List Font Weight', 'betterdocs-pro' ),
3211 'section' => 'betterdocs_single_docs_settings',
3212 'settings' => 'betterdocs_doc_single_attachment_list_font_weight',
3213 'type' => 'select',
3214 'choices' => [
3215 'normal' => 'Normal',
3216 '100' => '100',
3217 '200' => '200',
3218 '300' => '300',
3219 '400' => '400',
3220 '500' => '500',
3221 '600' => '600',
3222 '700' => '700',
3223 '800' => '800',
3224 '900' => '900'
3225 ],
3226 'priority' => 163
3227 ]
3228 )
3229 );
3230 }
3231
3232 public function betterdocs_doc_single_attachment_list_extension_color() {
3233 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_color', [
3234 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_color'],
3235 'capability' => 'edit_theme_options',
3236 'transport' => 'postMessage',
3237 'sanitize_callback' => [$this->sanitizer, 'rgba']
3238 ] );
3239
3240 $this->customizer->add_control(
3241 new AlphaColorControl(
3242 $this->customizer,
3243 'betterdocs_doc_single_attachment_list_extension_color',
3244 [
3245 'label' => __( 'Extension Color', 'betterdocs' ),
3246 'section' => 'betterdocs_single_docs_settings',
3247 'settings' => 'betterdocs_doc_single_attachment_list_extension_color',
3248 'priority' => 163
3249 ]
3250 )
3251 );
3252 }
3253 public function betterdocs_doc_single_attachment_list_extension_font_size() {
3254 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_font_size', [
3255 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_font_size'],
3256 'capability' => 'edit_theme_options',
3257 'transport' => 'postMessage',
3258 'sanitize_callback' => [$this->sanitizer, 'integer']
3259
3260 ] );
3261
3262 $this->customizer->add_control( new RangeValueControl(
3263 $this->customizer, 'betterdocs_doc_single_attachment_list_extension_font_size', [
3264 'type' => 'betterdocs-range-value',
3265 'section' => 'betterdocs_single_docs_settings',
3266 'settings' => 'betterdocs_doc_single_attachment_list_extension_font_size',
3267 'label' => __( 'Extension Font Size', 'betterdocs' ),
3268 'priority' => 163,
3269 'input_attrs' => [
3270 'min' => 0,
3271 'max' => 50,
3272 'step' => 1,
3273 'suffix' => 'px' //optional suffix
3274 ]
3275 ] )
3276 );
3277 }
3278
3279 public function betterdocs_doc_single_attachment_list_extension_font_weight() {
3280 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_font_weight', [
3281 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_font_weight'],
3282 'capability' => 'edit_theme_options',
3283 'sanitize_callback' => [$this->sanitizer, 'choices']
3284 ] );
3285
3286 $this->customizer->add_control(
3287 new WP_Customize_Control(
3288 $this->customizer,
3289 'betterdocs_doc_single_attachment_list_extension_font_weight',
3290 [
3291 'label' => __( 'Extension Font Weight', 'betterdocs-pro' ),
3292 'section' => 'betterdocs_single_docs_settings',
3293 'settings' => 'betterdocs_doc_single_attachment_list_extension_font_weight',
3294 'type' => 'select',
3295 'choices' => [
3296 'normal' => 'Normal',
3297 '100' => '100',
3298 '200' => '200',
3299 '300' => '300',
3300 '400' => '400',
3301 '500' => '500',
3302 '600' => '600',
3303 '700' => '700',
3304 '800' => '800',
3305 '900' => '900'
3306 ],
3307 'priority' => 163
3308 ]
3309 )
3310 );
3311 }
3312
3313 public function betterdocs_doc_single_attachment_list_color() {
3314 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_color', [
3315 'default' => $this->defaults['betterdocs_doc_single_attachment_list_color'],
3316 'capability' => 'edit_theme_options',
3317 'transport' => 'postMessage',
3318 'sanitize_callback' => [$this->sanitizer, 'rgba']
3319 ] );
3320
3321 $this->customizer->add_control(
3322 new AlphaColorControl(
3323 $this->customizer,
3324 'betterdocs_doc_single_attachment_list_color',
3325 [
3326 'label' => __( 'List Color', 'betterdocs' ),
3327 'section' => 'betterdocs_single_docs_settings',
3328 'settings' => 'betterdocs_doc_single_attachment_list_color',
3329 'priority' => 163
3330 ]
3331 )
3332 );
3333 }
3334
3335 public function betterdocs_doc_single_attachment_list_background_color() {
3336 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_background_color', [
3337 'default' => $this->defaults['betterdocs_doc_single_attachment_list_background_color'],
3338 'capability' => 'edit_theme_options',
3339 'transport' => 'postMessage',
3340 'sanitize_callback' => [$this->sanitizer, 'rgba']
3341 ] );
3342
3343 $this->customizer->add_control(
3344 new AlphaColorControl(
3345 $this->customizer,
3346 'betterdocs_doc_single_attachment_list_background_color',
3347 [
3348 'label' => __( 'List Background Color', 'betterdocs' ),
3349 'section' => 'betterdocs_single_docs_settings',
3350 'settings' => 'betterdocs_doc_single_attachment_list_background_color',
3351 'priority' => 163
3352 ]
3353 )
3354 );
3355 }
3356
3357 public function betterdocs_doc_single_attachment_list_padding() {
3358 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding', [
3359 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding'],
3360 'capability' => 'edit_theme_options',
3361 'transport' => 'postMessage',
3362 'sanitize_callback' => [$this->sanitizer, 'integer']
3363
3364 ] );
3365
3366 $this->customizer->add_control( new TitleControl(
3367 $this->customizer, 'betterdocs_doc_single_attachment_list_padding', [
3368 'type' => 'betterdocs-title',
3369 'section' => 'betterdocs_single_docs_settings',
3370 'settings' => 'betterdocs_doc_single_attachment_list_padding',
3371 'label' => __( 'List Padding', 'betterdocs' ),
3372 'priority' => 163,
3373 'input_attrs' => [
3374 'id' => 'betterdocs_doc_single_attachment_list_padding',
3375 'class' => 'betterdocs-dimension'
3376 ]
3377 ] )
3378 );
3379
3380 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_top', [
3381 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_top'],
3382 'capability' => 'edit_theme_options',
3383 'transport' => 'postMessage',
3384 'sanitize_callback' => [$this->sanitizer, 'integer']
3385 ] );
3386
3387 $this->customizer->add_control( new DimensionControl(
3388 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_top', [
3389 'type' => 'betterdocs-dimension',
3390 'section' => 'betterdocs_single_docs_settings',
3391 'settings' => 'betterdocs_doc_single_attachment_list_padding_top',
3392 'label' => __( 'Top', 'betterdocs' ),
3393 'priority' => 163,
3394 'input_attrs' => [
3395 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3396 ]
3397 ] )
3398 );
3399
3400 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_right', [
3401 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_right'],
3402 'capability' => 'edit_theme_options',
3403 'transport' => 'postMessage',
3404 'sanitize_callback' => [$this->sanitizer, 'integer']
3405
3406 ] );
3407
3408 $this->customizer->add_control( new DimensionControl(
3409 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_right', [
3410 'type' => 'betterdocs-dimension',
3411 'section' => 'betterdocs_single_docs_settings',
3412 'settings' => 'betterdocs_doc_single_attachment_list_padding_right',
3413 'label' => __( 'Right', 'betterdocs' ),
3414 'priority' => 163,
3415 'input_attrs' => [
3416 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3417 ]
3418 ] )
3419 );
3420
3421 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_bottom', [
3422 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_bottom'],
3423 'capability' => 'edit_theme_options',
3424 'transport' => 'postMessage',
3425 'sanitize_callback' => [$this->sanitizer, 'integer']
3426 ] );
3427
3428 $this->customizer->add_control( new DimensionControl(
3429 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_bottom', [
3430 'type' => 'betterdocs-dimension',
3431 'section' => 'betterdocs_single_docs_settings',
3432 'settings' => 'betterdocs_doc_single_attachment_list_padding_bottom',
3433 'label' => __( 'Bottom', 'betterdocs' ),
3434 'priority' => 163,
3435 'input_attrs' => [
3436 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3437 ]
3438 ] )
3439 );
3440
3441 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_left', [
3442 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_left'],
3443 'capability' => 'edit_theme_options',
3444 'transport' => 'postMessage',
3445 'sanitize_callback' => [$this->sanitizer, 'integer']
3446 ] );
3447
3448 $this->customizer->add_control( new DimensionControl(
3449 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_left', [
3450 'type' => 'betterdocs-dimension',
3451 'section' => 'betterdocs_single_docs_settings',
3452 'settings' => 'betterdocs_doc_single_attachment_list_padding_left',
3453 'label' => __( 'Left', 'betterdocs' ),
3454 'priority' => 163,
3455 'input_attrs' => [
3456 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3457 ]
3458 ] )
3459 );
3460 }
3461
3462 public function betterdocs_doc_single_attachment_list_margin() {
3463 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin', [
3464 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin'],
3465 'capability' => 'edit_theme_options',
3466 'transport' => 'postMessage',
3467 'sanitize_callback' => [$this->sanitizer, 'integer']
3468
3469 ] );
3470
3471 $this->customizer->add_control( new TitleControl(
3472 $this->customizer, 'betterdocs_doc_single_attachment_list_margin', [
3473 'type' => 'betterdocs-title',
3474 'section' => 'betterdocs_single_docs_settings',
3475 'settings' => 'betterdocs_doc_single_attachment_list_margin',
3476 'label' => __( 'List Margin', 'betterdocs' ),
3477 'priority' => 163,
3478 'input_attrs' => [
3479 'id' => 'betterdocs_doc_single_attachment_list_margin',
3480 'class' => 'betterdocs-dimension'
3481 ]
3482 ] )
3483 );
3484
3485 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_top', [
3486 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_top'],
3487 'capability' => 'edit_theme_options',
3488 'transport' => 'postMessage',
3489 'sanitize_callback' => [$this->sanitizer, 'integer']
3490 ] );
3491
3492 $this->customizer->add_control( new DimensionControl(
3493 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_top', [
3494 'type' => 'betterdocs-dimension',
3495 'section' => 'betterdocs_single_docs_settings',
3496 'settings' => 'betterdocs_doc_single_attachment_list_margin_top',
3497 'label' => __( 'Top', 'betterdocs' ),
3498 'priority' => 163,
3499 'input_attrs' => [
3500 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3501 ]
3502 ] )
3503 );
3504
3505 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_right', [
3506 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_right'],
3507 'capability' => 'edit_theme_options',
3508 'transport' => 'postMessage',
3509 'sanitize_callback' => [$this->sanitizer, 'integer']
3510
3511 ] );
3512
3513 $this->customizer->add_control( new DimensionControl(
3514 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_right', [
3515 'type' => 'betterdocs-dimension',
3516 'section' => 'betterdocs_single_docs_settings',
3517 'settings' => 'betterdocs_doc_single_attachment_list_margin_right',
3518 'label' => __( 'Right', 'betterdocs' ),
3519 'priority' => 163,
3520 'input_attrs' => [
3521 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3522 ]
3523 ] )
3524 );
3525
3526 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_bottom', [
3527 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_bottom'],
3528 'capability' => 'edit_theme_options',
3529 'transport' => 'postMessage',
3530 'sanitize_callback' => [$this->sanitizer, 'integer']
3531 ] );
3532
3533 $this->customizer->add_control( new DimensionControl(
3534 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_bottom', [
3535 'type' => 'betterdocs-dimension',
3536 'section' => 'betterdocs_single_docs_settings',
3537 'settings' => 'betterdocs_doc_single_attachment_list_margin_bottom',
3538 'label' => __( 'Bottom', 'betterdocs' ),
3539 'priority' => 163,
3540 'input_attrs' => [
3541 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3542 ]
3543 ] )
3544 );
3545
3546 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_left', [
3547 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_left'],
3548 'capability' => 'edit_theme_options',
3549 'transport' => 'postMessage',
3550 'sanitize_callback' => [$this->sanitizer, 'integer']
3551 ] );
3552
3553 $this->customizer->add_control( new DimensionControl(
3554 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_left', [
3555 'type' => 'betterdocs-dimension',
3556 'section' => 'betterdocs_single_docs_settings',
3557 'settings' => 'betterdocs_doc_single_attachment_list_margin_left',
3558 'label' => __( 'Left', 'betterdocs' ),
3559 'priority' => 163,
3560 'input_attrs' => [
3561 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3562 ]
3563 ] )
3564 );
3565 }
3566
3567 public function betterdocs_doc_single_related_docs_heading() {
3568 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_heading', [
3569 'default' => 'betterdocs_doc_single_related_docs_heading',
3570 'sanitize_callback' => 'esc_html'
3571 ] );
3572
3573 $this->customizer->add_control( new SeparatorControl(
3574 $this->customizer, 'betterdocs_doc_single_related_docs_heading', [
3575 'label' => __( 'Related Docs', 'betterdocs' ),
3576 'priority' => 163,
3577 'settings' => 'betterdocs_doc_single_related_docs_heading',
3578 'section' => 'betterdocs_single_docs_settings'
3579 ] )
3580 );
3581 }
3582
3583 public function betterdocs_doc_single_related_docs_content_bg_color() {
3584 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_bg_color', [
3585 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_bg_color'],
3586 'capability' => 'edit_theme_options',
3587 'transport' => 'postMessage',
3588 'sanitize_callback' => [$this->sanitizer, 'rgba']
3589 ] );
3590
3591 $this->customizer->add_control(
3592 new AlphaColorControl(
3593 $this->customizer,
3594 'betterdocs_doc_single_related_docs_content_bg_color',
3595 [
3596 'label' => __( 'Content Background Color', 'betterdocs' ),
3597 'section' => 'betterdocs_single_docs_settings',
3598 'settings' => 'betterdocs_doc_single_related_docs_content_bg_color',
3599 'priority' => 163
3600 ]
3601 )
3602 );
3603 }
3604
3605 public function betterdocs_doc_single_related_docs_content_padding() {
3606 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding', [
3607 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding'],
3608 'capability' => 'edit_theme_options',
3609 'transport' => 'postMessage',
3610 'sanitize_callback' => [$this->sanitizer, 'integer']
3611
3612 ] );
3613
3614 $this->customizer->add_control( new TitleControl(
3615 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding', [
3616 'type' => 'betterdocs-title',
3617 'section' => 'betterdocs_single_docs_settings',
3618 'settings' => 'betterdocs_doc_single_related_docs_content_padding',
3619 'label' => __( 'Content Padding', 'betterdocs' ),
3620 'priority' => 163,
3621 'input_attrs' => [
3622 'id' => 'betterdocs_doc_single_related_docs_content_padding',
3623 'class' => 'betterdocs-dimension'
3624 ]
3625 ] )
3626 );
3627
3628 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_top', [
3629 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_top'],
3630 'capability' => 'edit_theme_options',
3631 'transport' => 'postMessage',
3632 'sanitize_callback' => [$this->sanitizer, 'integer']
3633 ] );
3634
3635 $this->customizer->add_control( new DimensionControl(
3636 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_top', [
3637 'type' => 'betterdocs-dimension',
3638 'section' => 'betterdocs_single_docs_settings',
3639 'settings' => 'betterdocs_doc_single_related_docs_content_padding_top',
3640 'label' => __( 'Top', 'betterdocs' ),
3641 'priority' => 163,
3642 'input_attrs' => [
3643 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3644 ]
3645 ] )
3646 );
3647
3648 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_right', [
3649 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_right'],
3650 'capability' => 'edit_theme_options',
3651 'transport' => 'postMessage',
3652 'sanitize_callback' => [$this->sanitizer, 'integer']
3653
3654 ] );
3655
3656 $this->customizer->add_control( new DimensionControl(
3657 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_right', [
3658 'type' => 'betterdocs-dimension',
3659 'section' => 'betterdocs_single_docs_settings',
3660 'settings' => 'betterdocs_doc_single_related_docs_content_padding_right',
3661 'label' => __( 'Right', 'betterdocs' ),
3662 'priority' => 163,
3663 'input_attrs' => [
3664 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3665 ]
3666 ] )
3667 );
3668
3669 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_bottom', [
3670 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_bottom'],
3671 'capability' => 'edit_theme_options',
3672 'transport' => 'postMessage',
3673 'sanitize_callback' => [$this->sanitizer, 'integer']
3674
3675 ] );
3676
3677 $this->customizer->add_control( new DimensionControl(
3678 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_bottom', [
3679 'type' => 'betterdocs-dimension',
3680 'section' => 'betterdocs_single_docs_settings',
3681 'settings' => 'betterdocs_doc_single_related_docs_content_padding_bottom',
3682 'label' => __( 'Bottom', 'betterdocs' ),
3683 'priority' => 163,
3684 'input_attrs' => [
3685 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3686 ]
3687 ] )
3688 );
3689
3690 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_left', [
3691 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_left'],
3692 'capability' => 'edit_theme_options',
3693 'transport' => 'postMessage',
3694 'sanitize_callback' => [$this->sanitizer, 'integer']
3695
3696 ] );
3697
3698 $this->customizer->add_control( new DimensionControl(
3699 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_left', [
3700 'type' => 'betterdocs-dimension',
3701 'section' => 'betterdocs_single_docs_settings',
3702 'settings' => 'betterdocs_doc_single_related_docs_content_padding_left',
3703 'label' => __( 'Left', 'betterdocs' ),
3704 'priority' => 163,
3705 'input_attrs' => [
3706 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3707 ]
3708 ] )
3709 );
3710 }
3711
3712 public function betterdocs_doc_single_related_docs_content_margin() {
3713 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin', [
3714 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin'],
3715 'capability' => 'edit_theme_options',
3716 'transport' => 'postMessage',
3717 'sanitize_callback' => [$this->sanitizer, 'integer']
3718
3719 ] );
3720
3721 $this->customizer->add_control( new TitleControl(
3722 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin', [
3723 'type' => 'betterdocs-title',
3724 'section' => 'betterdocs_single_docs_settings',
3725 'settings' => 'betterdocs_doc_single_related_docs_content_margin',
3726 'label' => __( 'Content Margin', 'betterdocs' ),
3727 'priority' => 163,
3728 'input_attrs' => [
3729 'id' => 'betterdocs_doc_single_related_docs_content_margin',
3730 'class' => 'betterdocs-dimension'
3731 ]
3732 ] )
3733 );
3734
3735 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_top', [
3736 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_top'],
3737 'capability' => 'edit_theme_options',
3738 'transport' => 'postMessage',
3739 'sanitize_callback' => [$this->sanitizer, 'integer']
3740 ] );
3741
3742 $this->customizer->add_control( new DimensionControl(
3743 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_top', [
3744 'type' => 'betterdocs-dimension',
3745 'section' => 'betterdocs_single_docs_settings',
3746 'settings' => 'betterdocs_doc_single_related_docs_content_margin_top',
3747 'label' => __( 'Top', 'betterdocs' ),
3748 'priority' => 163,
3749 'input_attrs' => [
3750 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3751 ]
3752 ] )
3753 );
3754
3755 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_right', [
3756 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_right'],
3757 'capability' => 'edit_theme_options',
3758 'transport' => 'postMessage',
3759 'sanitize_callback' => [$this->sanitizer, 'integer']
3760
3761 ] );
3762
3763 $this->customizer->add_control( new DimensionControl(
3764 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_right', [
3765 'type' => 'betterdocs-dimension',
3766 'section' => 'betterdocs_single_docs_settings',
3767 'settings' => 'betterdocs_doc_single_related_docs_content_margin_right',
3768 'label' => __( 'Right', 'betterdocs' ),
3769 'priority' => 163,
3770 'input_attrs' => [
3771 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3772 ]
3773 ] )
3774 );
3775
3776 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_bottom', [
3777 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_bottom'],
3778 'capability' => 'edit_theme_options',
3779 'transport' => 'postMessage',
3780 'sanitize_callback' => [$this->sanitizer, 'integer']
3781
3782 ] );
3783
3784 $this->customizer->add_control( new DimensionControl(
3785 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_bottom', [
3786 'type' => 'betterdocs-dimension',
3787 'section' => 'betterdocs_single_docs_settings',
3788 'settings' => 'betterdocs_doc_single_related_docs_content_margin_bottom',
3789 'label' => __( 'Bottom', 'betterdocs' ),
3790 'priority' => 163,
3791 'input_attrs' => [
3792 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3793 ]
3794 ] )
3795 );
3796
3797 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_left', [
3798 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_left'],
3799 'capability' => 'edit_theme_options',
3800 'transport' => 'postMessage',
3801 'sanitize_callback' => [$this->sanitizer, 'integer']
3802
3803 ] );
3804
3805 $this->customizer->add_control( new DimensionControl(
3806 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_left', [
3807 'type' => 'betterdocs-dimension',
3808 'section' => 'betterdocs_single_docs_settings',
3809 'settings' => 'betterdocs_doc_single_related_docs_content_margin_left',
3810 'label' => __( 'Left', 'betterdocs' ),
3811 'priority' => 163,
3812 'input_attrs' => [
3813 'class' => 'betterdocs_doc_single_related_docs_content_margin_left betterdocs-dimension'
3814 ]
3815 ] )
3816 );
3817 }
3818
3819 public function betterdocs_doc_single_related_docs_label_color() {
3820 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_color', [
3821 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_color'],
3822 'capability' => 'edit_theme_options',
3823 'transport' => 'postMessage',
3824 'sanitize_callback' => [$this->sanitizer, 'rgba']
3825 ] );
3826
3827 $this->customizer->add_control(
3828 new AlphaColorControl(
3829 $this->customizer,
3830 'betterdocs_doc_single_related_docs_label_color',
3831 [
3832 'label' => __( 'Label Color', 'betterdocs' ),
3833 'section' => 'betterdocs_single_docs_settings',
3834 'settings' => 'betterdocs_doc_single_related_docs_label_color',
3835 'priority' => 163
3836 ]
3837 )
3838 );
3839 }
3840
3841 public function betterdocs_doc_single_related_docs_label_padding() {
3842 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding', [
3843 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding'],
3844 'capability' => 'edit_theme_options',
3845 'transport' => 'postMessage',
3846 'sanitize_callback' => [$this->sanitizer, 'integer']
3847
3848 ] );
3849
3850 $this->customizer->add_control( new TitleControl(
3851 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding', [
3852 'type' => 'betterdocs-title',
3853 'section' => 'betterdocs_single_docs_settings',
3854 'settings' => 'betterdocs_doc_single_related_docs_label_padding',
3855 'label' => __( 'Label Padding', 'betterdocs' ),
3856 'priority' => 163,
3857 'input_attrs' => [
3858 'id' => 'betterdocs_doc_single_related_docs_label_padding',
3859 'class' => 'betterdocs-dimension'
3860 ]
3861 ] )
3862 );
3863
3864 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_top', [
3865 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_top'],
3866 'capability' => 'edit_theme_options',
3867 'transport' => 'postMessage',
3868 'sanitize_callback' => [$this->sanitizer, 'integer']
3869 ] );
3870
3871 $this->customizer->add_control( new DimensionControl(
3872 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_top', [
3873 'type' => 'betterdocs-dimension',
3874 'section' => 'betterdocs_single_docs_settings',
3875 'settings' => 'betterdocs_doc_single_related_docs_label_padding_top',
3876 'label' => __( 'Top', 'betterdocs' ),
3877 'priority' => 163,
3878 'input_attrs' => [
3879 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3880 ]
3881 ] )
3882 );
3883
3884 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_right', [
3885 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_right'],
3886 'capability' => 'edit_theme_options',
3887 'transport' => 'postMessage',
3888 'sanitize_callback' => [$this->sanitizer, 'integer']
3889
3890 ] );
3891
3892 $this->customizer->add_control( new DimensionControl(
3893 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_right', [
3894 'type' => 'betterdocs-dimension',
3895 'section' => 'betterdocs_single_docs_settings',
3896 'settings' => 'betterdocs_doc_single_related_docs_label_padding_right',
3897 'label' => __( 'Right', 'betterdocs' ),
3898 'priority' => 163,
3899 'input_attrs' => [
3900 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3901 ]
3902 ] )
3903 );
3904
3905 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_bottom', [
3906 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_bottom'],
3907 'capability' => 'edit_theme_options',
3908 'transport' => 'postMessage',
3909 'sanitize_callback' => [$this->sanitizer, 'integer']
3910
3911 ] );
3912
3913 $this->customizer->add_control( new DimensionControl(
3914 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_bottom', [
3915 'type' => 'betterdocs-dimension',
3916 'section' => 'betterdocs_single_docs_settings',
3917 'settings' => 'betterdocs_doc_single_related_docs_label_padding_bottom',
3918 'label' => __( 'Bottom', 'betterdocs' ),
3919 'priority' => 163,
3920 'input_attrs' => [
3921 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3922 ]
3923 ] )
3924 );
3925
3926 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_left', [
3927 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_left'],
3928 'capability' => 'edit_theme_options',
3929 'transport' => 'postMessage',
3930 'sanitize_callback' => [$this->sanitizer, 'integer']
3931
3932 ] );
3933
3934 $this->customizer->add_control( new DimensionControl(
3935 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_left', [
3936 'type' => 'betterdocs-dimension',
3937 'section' => 'betterdocs_single_docs_settings',
3938 'settings' => 'betterdocs_doc_single_related_docs_label_padding_left',
3939 'label' => __( 'Left', 'betterdocs' ),
3940 'priority' => 163,
3941 'input_attrs' => [
3942 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3943 ]
3944 ] )
3945 );
3946 }
3947
3948 public function betterdocs_doc_single_related_docs_label_margin() {
3949 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin', [
3950 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin'],
3951 'capability' => 'edit_theme_options',
3952 'transport' => 'postMessage',
3953 'sanitize_callback' => [$this->sanitizer, 'integer']
3954
3955 ] );
3956
3957 $this->customizer->add_control( new TitleControl(
3958 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin', [
3959 'type' => 'betterdocs-title',
3960 'section' => 'betterdocs_single_docs_settings',
3961 'settings' => 'betterdocs_doc_single_related_docs_label_margin',
3962 'label' => __( 'Label Margin', 'betterdocs' ),
3963 'priority' => 163,
3964 'input_attrs' => [
3965 'id' => 'betterdocs_doc_single_related_docs_label_margin',
3966 'class' => 'betterdocs-dimension'
3967 ]
3968 ] )
3969 );
3970
3971 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_top', [
3972 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_top'],
3973 'capability' => 'edit_theme_options',
3974 'transport' => 'postMessage',
3975 'sanitize_callback' => [$this->sanitizer, 'integer']
3976 ] );
3977
3978 $this->customizer->add_control( new DimensionControl(
3979 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_top', [
3980 'type' => 'betterdocs-dimension',
3981 'section' => 'betterdocs_single_docs_settings',
3982 'settings' => 'betterdocs_doc_single_related_docs_label_margin_top',
3983 'label' => __( 'Top', 'betterdocs' ),
3984 'priority' => 163,
3985 'input_attrs' => [
3986 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
3987 ]
3988 ] )
3989 );
3990
3991 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_right', [
3992 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_right'],
3993 'capability' => 'edit_theme_options',
3994 'transport' => 'postMessage',
3995 'sanitize_callback' => [$this->sanitizer, 'integer']
3996
3997 ] );
3998
3999 $this->customizer->add_control( new DimensionControl(
4000 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_right', [
4001 'type' => 'betterdocs-dimension',
4002 'section' => 'betterdocs_single_docs_settings',
4003 'settings' => 'betterdocs_doc_single_related_docs_label_margin_right',
4004 'label' => __( 'Right', 'betterdocs' ),
4005 'priority' => 163,
4006 'input_attrs' => [
4007 'class' => 'betterdocs_doc_single_related_docs_label_margin_right betterdocs-dimension'
4008 ]
4009 ] )
4010 );
4011
4012 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_bottom', [
4013 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_bottom'],
4014 'capability' => 'edit_theme_options',
4015 'transport' => 'postMessage',
4016 'sanitize_callback' => [$this->sanitizer, 'integer']
4017 ] );
4018
4019 $this->customizer->add_control( new DimensionControl(
4020 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_bottom', [
4021 'type' => 'betterdocs-dimension',
4022 'section' => 'betterdocs_single_docs_settings',
4023 'settings' => 'betterdocs_doc_single_related_docs_label_margin_bottom',
4024 'label' => __( 'Bottom', 'betterdocs' ),
4025 'priority' => 163,
4026 'input_attrs' => [
4027 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
4028 ]
4029 ] )
4030 );
4031
4032 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_left', [
4033 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_left'],
4034 'capability' => 'edit_theme_options',
4035 'transport' => 'postMessage',
4036 'sanitize_callback' => [$this->sanitizer, 'integer']
4037 ] );
4038
4039 $this->customizer->add_control( new DimensionControl(
4040 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_left', [
4041 'type' => 'betterdocs-dimension',
4042 'section' => 'betterdocs_single_docs_settings',
4043 'settings' => 'betterdocs_doc_single_related_docs_label_margin_left',
4044 'label' => __( 'Left', 'betterdocs' ),
4045 'priority' => 163,
4046 'input_attrs' => [
4047 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
4048 ]
4049 ] )
4050 );
4051 }
4052
4053 public function betterdocs_doc_related_docs_list_font_size() {
4054 $this->customizer->add_setting( 'betterdocs_doc_related_docs_list_font_size', [
4055 'default' => $this->defaults['betterdocs_doc_related_docs_list_font_size'],
4056 'capability' => 'edit_theme_options',
4057 'transport' => 'postMessage',
4058 'sanitize_callback' => [$this->sanitizer, 'integer']
4059
4060 ] );
4061
4062 $this->customizer->add_control( new RangeValueControl(
4063 $this->customizer, 'betterdocs_doc_related_docs_list_font_size', [
4064 'type' => 'betterdocs-range-value',
4065 'section' => 'betterdocs_single_docs_settings',
4066 'settings' => 'betterdocs_doc_related_docs_list_font_size',
4067 'label' => __( 'List Font Size', 'betterdocs' ),
4068 'priority' => 163,
4069 'input_attrs' => [
4070 'min' => 0,
4071 'max' => 50,
4072 'step' => 1,
4073 'suffix' => 'px' //optional suffix
4074 ]
4075 ] )
4076 );
4077 }
4078
4079 public function betterdocs_doc_related_docs_list_font_weight() {
4080 $this->customizer->add_setting( 'betterdocs_doc_related_docs_list_font_weight', [
4081 'default' => $this->defaults['betterdocs_doc_related_docs_list_font_weight'],
4082 'capability' => 'edit_theme_options',
4083 'sanitize_callback' => [$this->sanitizer, 'choices']
4084 ] );
4085
4086 $this->customizer->add_control(
4087 new WP_Customize_Control(
4088 $this->customizer,
4089 'betterdocs_doc_related_docs_list_font_weight',
4090 [
4091 'label' => __( 'List Font Weight', 'betterdocs-pro' ),
4092 'section' => 'betterdocs_single_docs_settings',
4093 'settings' => 'betterdocs_doc_related_docs_list_font_weight',
4094 'type' => 'select',
4095 'choices' => [
4096 'normal' => 'Normal',
4097 '100' => '100',
4098 '200' => '200',
4099 '300' => '300',
4100 '400' => '400',
4101 '500' => '500',
4102 '600' => '600',
4103 '700' => '700',
4104 '800' => '800',
4105 '900' => '900'
4106 ],
4107 'priority' => 163
4108 ]
4109 )
4110 );
4111 }
4112
4113
4114 public function betterdocs_doc_single_related_docs_list_color() {
4115 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_color', [
4116 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_color'],
4117 'capability' => 'edit_theme_options',
4118 'transport' => 'postMessage',
4119 'sanitize_callback' => [$this->sanitizer, 'rgba']
4120 ] );
4121
4122 $this->customizer->add_control(
4123 new AlphaColorControl(
4124 $this->customizer,
4125 'betterdocs_doc_single_related_docs_list_color',
4126 [
4127 'label' => __( 'List Color', 'betterdocs' ),
4128 'section' => 'betterdocs_single_docs_settings',
4129 'settings' => 'betterdocs_doc_single_related_docs_list_color',
4130 'priority' => 163
4131 ]
4132 )
4133 );
4134 }
4135
4136 public function betterdocs_doc_single_related_docs_list_background_color() {
4137 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_background_color', [
4138 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_background_color'],
4139 'capability' => 'edit_theme_options',
4140 'transport' => 'postMessage',
4141 'sanitize_callback' => [$this->sanitizer, 'rgba']
4142 ] );
4143
4144 $this->customizer->add_control(
4145 new AlphaColorControl(
4146 $this->customizer,
4147 'betterdocs_doc_single_related_docs_list_background_color',
4148 [
4149 'label' => __( 'List Background Color', 'betterdocs' ),
4150 'section' => 'betterdocs_single_docs_settings',
4151 'settings' => 'betterdocs_doc_single_related_docs_list_background_color',
4152 'priority' => 163
4153 ]
4154 )
4155 );
4156 }
4157
4158 public function betterdocs_doc_single_related_docs_list_padding() {
4159 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding', [
4160 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding'],
4161 'capability' => 'edit_theme_options',
4162 'transport' => 'postMessage',
4163 'sanitize_callback' => [$this->sanitizer, 'integer']
4164
4165 ] );
4166
4167 $this->customizer->add_control( new TitleControl(
4168 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding', [
4169 'type' => 'betterdocs-title',
4170 'section' => 'betterdocs_single_docs_settings',
4171 'settings' => 'betterdocs_doc_single_related_docs_list_padding',
4172 'label' => __( 'List Padding', 'betterdocs' ),
4173 'priority' => 163,
4174 'input_attrs' => [
4175 'id' => 'betterdocs_doc_single_related_docs_list_padding',
4176 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4177 ]
4178 ] )
4179 );
4180
4181 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_top', [
4182 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_top'],
4183 'capability' => 'edit_theme_options',
4184 'transport' => 'postMessage',
4185 'sanitize_callback' => [$this->sanitizer, 'integer']
4186 ] );
4187
4188 $this->customizer->add_control( new DimensionControl(
4189 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_top', [
4190 'type' => 'betterdocs-dimension',
4191 'section' => 'betterdocs_single_docs_settings',
4192 'settings' => 'betterdocs_doc_single_related_docs_list_padding_top',
4193 'label' => __( 'Top', 'betterdocs' ),
4194 'priority' => 163,
4195 'input_attrs' => [
4196 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4197 ]
4198 ] )
4199 );
4200
4201 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_right', [
4202 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_right'],
4203 'capability' => 'edit_theme_options',
4204 'transport' => 'postMessage',
4205 'sanitize_callback' => [$this->sanitizer, 'integer']
4206
4207 ] );
4208
4209 $this->customizer->add_control( new DimensionControl(
4210 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_right', [
4211 'type' => 'betterdocs-dimension',
4212 'section' => 'betterdocs_single_docs_settings',
4213 'settings' => 'betterdocs_doc_single_related_docs_list_padding_right',
4214 'label' => __( 'Right', 'betterdocs' ),
4215 'priority' => 163,
4216 'input_attrs' => [
4217 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4218 ]
4219 ] )
4220 );
4221
4222 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_bottom', [
4223 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_bottom'],
4224 'capability' => 'edit_theme_options',
4225 'transport' => 'postMessage',
4226 'sanitize_callback' => [$this->sanitizer, 'integer']
4227 ] );
4228
4229 $this->customizer->add_control( new DimensionControl(
4230 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_bottom', [
4231 'type' => 'betterdocs-dimension',
4232 'section' => 'betterdocs_single_docs_settings',
4233 'settings' => 'betterdocs_doc_single_related_docs_list_padding_bottom',
4234 'label' => __( 'Bottom', 'betterdocs' ),
4235 'priority' => 163,
4236 'input_attrs' => [
4237 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4238 ]
4239 ] )
4240 );
4241
4242 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_left', [
4243 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_left'],
4244 'capability' => 'edit_theme_options',
4245 'transport' => 'postMessage',
4246 'sanitize_callback' => [$this->sanitizer, 'integer']
4247 ] );
4248
4249 $this->customizer->add_control( new DimensionControl(
4250 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_left', [
4251 'type' => 'betterdocs-dimension',
4252 'section' => 'betterdocs_single_docs_settings',
4253 'settings' => 'betterdocs_doc_single_related_docs_list_padding_left',
4254 'label' => __( 'Left', 'betterdocs' ),
4255 'priority' => 163,
4256 'input_attrs' => [
4257 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
4258 ]
4259 ] )
4260 );
4261 }
4262
4263 public function betterdocs_doc_single_related_docs_list_margin() {
4264 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin', [
4265 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin'],
4266 'capability' => 'edit_theme_options',
4267 'transport' => 'postMessage',
4268 'sanitize_callback' => [$this->sanitizer, 'integer']
4269
4270 ] );
4271
4272 $this->customizer->add_control( new TitleControl(
4273 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin', [
4274 'type' => 'betterdocs-title',
4275 'section' => 'betterdocs_single_docs_settings',
4276 'settings' => 'betterdocs_doc_single_related_docs_list_margin',
4277 'label' => __( 'List Margin', 'betterdocs' ),
4278 'priority' => 163,
4279 'input_attrs' => [
4280 'id' => 'betterdocs_doc_single_related_docs_list_margin',
4281 'class' => 'betterdocs-dimension'
4282 ]
4283 ] )
4284 );
4285
4286 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_top', [
4287 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_top'],
4288 'capability' => 'edit_theme_options',
4289 'transport' => 'postMessage',
4290 'sanitize_callback' => [$this->sanitizer, 'integer']
4291 ] );
4292
4293 $this->customizer->add_control( new DimensionControl(
4294 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_top', [
4295 'type' => 'betterdocs-dimension',
4296 'section' => 'betterdocs_single_docs_settings',
4297 'settings' => 'betterdocs_doc_single_related_docs_list_margin_top',
4298 'label' => __( 'Top', 'betterdocs' ),
4299 'priority' => 163,
4300 'input_attrs' => [
4301 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4302 ]
4303 ] )
4304 );
4305
4306 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_right', [
4307 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_right'],
4308 'capability' => 'edit_theme_options',
4309 'transport' => 'postMessage',
4310 'sanitize_callback' => [$this->sanitizer, 'integer']
4311
4312 ] );
4313
4314 $this->customizer->add_control( new DimensionControl(
4315 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_right', [
4316 'type' => 'betterdocs-dimension',
4317 'section' => 'betterdocs_single_docs_settings',
4318 'settings' => 'betterdocs_doc_single_related_docs_list_margin_right',
4319 'label' => __( 'Right', 'betterdocs' ),
4320 'priority' => 163,
4321 'input_attrs' => [
4322 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4323 ]
4324 ] )
4325 );
4326
4327 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_bottom', [
4328 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_bottom'],
4329 'capability' => 'edit_theme_options',
4330 'transport' => 'postMessage',
4331 'sanitize_callback' => [$this->sanitizer, 'integer']
4332 ] );
4333
4334 $this->customizer->add_control( new DimensionControl(
4335 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_bottom', [
4336 'type' => 'betterdocs-dimension',
4337 'section' => 'betterdocs_single_docs_settings',
4338 'settings' => 'betterdocs_doc_single_related_docs_list_margin_bottom',
4339 'label' => __( 'Bottom', 'betterdocs' ),
4340 'priority' => 163,
4341 'input_attrs' => [
4342 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4343 ]
4344 ] )
4345 );
4346
4347 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_left', [
4348 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_left'],
4349 'capability' => 'edit_theme_options',
4350 'transport' => 'postMessage',
4351 'sanitize_callback' => [$this->sanitizer, 'integer']
4352 ] );
4353
4354 $this->customizer->add_control( new DimensionControl(
4355 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_left', [
4356 'type' => 'betterdocs-dimension',
4357 'section' => 'betterdocs_single_docs_settings',
4358 'settings' => 'betterdocs_doc_single_related_docs_list_margin_left',
4359 'label' => __( 'Left', 'betterdocs' ),
4360 'priority' => 163,
4361 'input_attrs' => [
4362 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
4363 ]
4364 ] )
4365 );
4366 }
4367 }
4368