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

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

3,986 lines 179.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDeveloper\BetterDocs\Admin\Customizer\Sections;
4
5 use WP_Customize_Control;
6 use WP_Customize_Image_Control;
7 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\TitleControl;
8 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\NumberControl;
9 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\SelectControl;
10 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\ToggleControl;
11 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\DimensionControl;
12 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\SeparatorControl;
13 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\AlphaColorControl;
14 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\RadioImageControl;
15 use WPDeveloper\BetterDocs\Admin\Customizer\Controls\RangeValueControl;
16
17 class SingleDoc extends Section {
18 /**
19 * Section Priority
20 * @var int
21 */
22 protected $priority = 101;
23
24 /**
25 * Get the section id.
26 * @return string
27 */
28 public function get_id() {
29 return 'betterdocs_single_docs_settings';
30 }
31
32 /**
33 * Get the title of the section.
34 * @return string
35 */
36 public function get_title() {
37 return __( 'Single Doc', 'betterdocs' );
38 }
39
40 public function single_layout_select() {
41 $this->customizer->add_setting( 'betterdocs_single_layout_select', [
42 'default' => $this->defaults['betterdocs_single_layout_select'],
43 'capability' => 'edit_theme_options',
44 'sanitize_callback' => [$this->sanitizer, 'select']
45 ] );
46
47 $this->customizer->add_control(
48 new RadioImageControl(
49 $this->customizer,
50 'betterdocs_single_layout_select',
51 [
52 'type' => 'betterdocs-radio-image',
53 'settings' => 'betterdocs_single_layout_select',
54 'section' => 'betterdocs_single_docs_settings',
55 'label' => __( 'Select Layout', 'betterdocs' ),
56 'priority' => 102,
57 'choices' => apply_filters( 'betterdocs_single_layout_select_choices', [
58 'layout-1' => [
59 'label' => __( 'Classic Layout', 'betterdocs' ),
60 'image' => $this->assets->icon( 'customizer/single/layout-1.png', true )
61 ],
62 'layout-4' => [
63 'label' => __( 'Abstract Layout', 'betterdocs' ),
64 'image' => $this->assets->icon( 'customizer/single/layout-4.png', true ),
65 'pro' => false
66 ],
67 'layout-5' => [
68 'label' => __( 'Modern Layout', 'betterdocs' ),
69 'image' => $this->assets->icon( 'customizer/single/layout-5.png', true ),
70 'pro' => false
71 ],
72 'layout-2' => [
73 'label' => __( 'Minimalist Layout', 'betterdocs' ),
74 'image' => $this->assets->icon( 'customizer/single/layout-2.png', true ),
75 'pro' => true,
76 'url' => 'https://betterdocs.co/upgrade'
77 ],
78 'layout-3' => [
79 'label' => __( 'Artisan Layout', 'betterdocs' ),
80 'image' => $this->assets->icon( 'customizer/single/layout-3.png', true ),
81 'pro' => true,
82 'url' => 'https://betterdocs.co/upgrade'
83 ],
84 'layout-6' => [
85 'label' => __( 'Bohemian Layout', 'betterdocs' ),
86 'image' => $this->assets->icon( 'customizer/single/layout-6.png', true ),
87 'pro' => true,
88 'url' => 'https://betterdocs.co/upgrade'
89 ]
90 ] )
91 ]
92 )
93 );
94 }
95
96 public function doc_single_content_area_bg_color() {
97 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_bg_color', [
98 'default' => $this->defaults['betterdocs_doc_single_content_area_bg_color'],
99 'capability' => 'edit_theme_options',
100 'transport' => 'postMessage',
101 'sanitize_callback' => [$this->sanitizer, 'rgba']
102 ] );
103
104 $this->customizer->add_control(
105 new AlphaColorControl(
106 $this->customizer,
107 'betterdocs_doc_single_content_area_bg_color',
108 [
109 'label' => __( 'Content Area Background Color', 'betterdocs' ),
110 'section' => 'betterdocs_single_docs_settings',
111 'settings' => 'betterdocs_doc_single_content_area_bg_color',
112 'priority' => 103
113 ]
114 )
115 );
116 }
117
118 public function doc_single_content_area_bg_image() {
119 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_bg_image', [
120 'default' => $this->defaults['betterdocs_doc_single_content_area_bg_image'],
121 'capability' => 'edit_theme_options',
122 'transport' => 'postMessage'
123 ] );
124
125 $this->customizer->add_control(
126 new WP_Customize_Image_Control(
127 $this->customizer,
128 'betterdocs_doc_single_content_area_bg_image',
129 [
130 'label' => __( 'Background Image', 'betterdocs' ),
131 'section' => 'betterdocs_single_docs_settings',
132 'settings' => 'betterdocs_doc_single_content_area_bg_image',
133 'priority' => 103
134 ] )
135 );
136 }
137
138 public function doc_single_content_bg_property() {
139 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property', [
140 'default' => $this->defaults['betterdocs_doc_single_content_bg_property'],
141 'capability' => 'edit_theme_options',
142 'transport' => 'postMessage',
143 'sanitize_callback' => [$this->sanitizer, 'select']
144
145 ] );
146
147 $this->customizer->add_control( new TitleControl(
148 $this->customizer, 'betterdocs_doc_single_content_bg_property', [
149 'type' => 'betterdocs-title',
150 'section' => 'betterdocs_single_docs_settings',
151 'settings' => 'betterdocs_doc_single_content_bg_property',
152 'priority' => 103,
153 'label' => __( 'Background Property', 'betterdocs' ),
154 'input_attrs' => [
155 'id' => 'betterdocs_doc_single_content_bg_property',
156 'class' => 'betterdocs-select'
157 ]
158 ] )
159 );
160 }
161
162 public function doc_single_content_bg_property_size() {
163 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_size', [
164 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_size'],
165 'capability' => 'edit_theme_options',
166 'transport' => 'postMessage',
167 'sanitize_callback' => [$this->sanitizer, 'select']
168
169 ] );
170
171 $this->customizer->add_control( new SelectControl(
172 $this->customizer, 'betterdocs_doc_single_content_bg_property_size', [
173 'type' => 'betterdocs-select',
174 'section' => 'betterdocs_single_docs_settings',
175 'settings' => 'betterdocs_doc_single_content_bg_property_size',
176 'priority' => 103,
177 'label' => __( 'Size', 'betterdocs' ),
178 'input_attrs' => [
179 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
180 ],
181 'choices' => [
182 'auto' => __( 'auto', 'betterdocs' ),
183 'length' => __( 'length', 'betterdocs' ),
184 'cover' => __( 'cover', 'betterdocs' ),
185 'contain' => __( 'contain', 'betterdocs' ),
186 'initial' => __( 'initial', 'betterdocs' ),
187 'inherit' => __( 'inherit', 'betterdocs' )
188 ]
189 ] )
190 );
191 }
192
193 public function doc_single_content_bg_property_repeat() {
194 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_repeat', [
195 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_repeat'],
196 'capability' => 'edit_theme_options',
197 'transport' => 'postMessage',
198 'sanitize_callback' => [$this->sanitizer, 'select']
199 ] );
200
201 $this->customizer->add_control( new SelectControl(
202 $this->customizer, 'betterdocs_doc_single_content_bg_property_repeat', [
203 'type' => 'betterdocs-select',
204 'section' => 'betterdocs_single_docs_settings',
205 'settings' => 'betterdocs_doc_single_content_bg_property_repeat',
206 'priority' => 103,
207 'label' => __( 'Repeat', 'betterdocs' ),
208 'input_attrs' => [
209 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
210 ],
211 'choices' => [
212 'no-repeat' => __( 'no-repeat', 'betterdocs' ),
213 'initial' => __( 'initial', 'betterdocs' ),
214 'inherit' => __( 'inherit', 'betterdocs' ),
215 'repeat' => __( 'repeat', 'betterdocs' ),
216 'repeat-x' => __( 'repeat-x', 'betterdocs' ),
217 'repeat-y' => __( 'repeat-y', 'betterdocs' )
218 ]
219 ] )
220 );
221 }
222
223 public function doc_single_content_bg_property_attachment() {
224 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_attachment', [
225 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_attachment'],
226 'capability' => 'edit_theme_options',
227 'transport' => 'postMessage',
228 'sanitize_callback' => [$this->sanitizer, 'select']
229
230 ] );
231
232 $this->customizer->add_control( new SelectControl(
233 $this->customizer, 'betterdocs_doc_single_content_bg_property_attachment', [
234 'type' => 'betterdocs-select',
235 'section' => 'betterdocs_single_docs_settings',
236 'settings' => 'betterdocs_doc_single_content_bg_property_attachment',
237 'priority' => 103,
238 'label' => __( 'Attachment', 'betterdocs' ),
239 'input_attrs' => [
240 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
241 ],
242 'choices' => [
243 'initial' => __( 'initial', 'betterdocs' ),
244 'inherit' => __( 'inherit', 'betterdocs' ),
245 'scroll' => __( 'scroll', 'betterdocs' ),
246 'fixed' => __( 'fixed', 'betterdocs' ),
247 'local' => __( 'local', 'betterdocs' )
248 ]
249 ] )
250 );
251 }
252
253 public function doc_single_content_bg_property_position() {
254 $this->customizer->add_setting( 'betterdocs_doc_single_content_bg_property_position', [
255 'default' => $this->defaults['betterdocs_doc_single_content_bg_property_position'],
256 'capability' => 'edit_theme_options',
257 'transport' => 'postMessage',
258 'sanitize_callback' => 'esc_html'
259
260 ] );
261
262 $this->customizer->add_control( new SelectControl(
263 $this->customizer, 'betterdocs_doc_single_content_bg_property_position', [
264 'type' => 'betterdocs-select',
265 'section' => 'betterdocs_single_docs_settings',
266 'settings' => 'betterdocs_doc_single_content_bg_property_position',
267 'priority' => 103,
268 'label' => __( 'Position', 'betterdocs' ),
269 'input_attrs' => [
270 'class' => 'betterdocs_doc_single_content_bg_property betterdocs-select'
271 ],
272 'choices' => [
273 'left top' => __( 'left top', 'betterdocs' ),
274 'left center' => __( 'left center', 'betterdocs' ),
275 'left bottom' => __( 'left bottom', 'betterdocs' ),
276 'right top' => __( 'right top', 'betterdocs' ),
277 'right center' => __( 'right center', 'betterdocs' ),
278 'right bottom' => __( 'right bottom', 'betterdocs' ),
279 'center top' => __( 'center top', 'betterdocs' ),
280 'center center' => __( 'center center', 'betterdocs' ),
281 'center bottom' => __( 'center bottom', 'betterdocs' )
282 ]
283 ] )
284 );
285 }
286
287 public function doc_single_content_area_padding() {
288 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding', [
289 'default' => $this->defaults['betterdocs_doc_single_content_area_padding'],
290 'capability' => 'edit_theme_options',
291 'transport' => 'postMessage',
292 'sanitize_callback' => [$this->sanitizer, 'integer']
293
294 ] );
295
296 $this->customizer->add_control( new TitleControl(
297 $this->customizer, 'betterdocs_doc_single_content_area_padding', [
298 'type' => 'betterdocs-title',
299 'section' => 'betterdocs_single_docs_settings',
300 'settings' => 'betterdocs_doc_single_content_area_padding',
301 'label' => __( 'Content Area Padding', 'betterdocs' ),
302 'priority' => 104,
303 'input_attrs' => [
304 'id' => 'betterdocs_doc_single_content_area_padding',
305 'class' => 'betterdocs-dimension'
306 ]
307 ] )
308 );
309
310 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_top', [
311 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_top'],
312 'capability' => 'edit_theme_options',
313 'transport' => 'postMessage',
314 'sanitize_callback' => [$this->sanitizer, 'integer']
315 ] );
316
317 $this->customizer->add_control( new DimensionControl(
318 $this->customizer, 'betterdocs_doc_single_content_area_padding_top', [
319 'type' => 'betterdocs-dimension',
320 'section' => 'betterdocs_single_docs_settings',
321 'settings' => 'betterdocs_doc_single_content_area_padding_top',
322 'label' => __( 'Top', 'betterdocs' ),
323 'priority' => 104,
324 'input_attrs' => [
325 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
326 ]
327 ] )
328 );
329
330 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_right', [
331 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_right'],
332 'capability' => 'edit_theme_options',
333 'transport' => 'postMessage',
334 'sanitize_callback' => [$this->sanitizer, 'integer']
335
336 ] );
337
338 $this->customizer->add_control( new DimensionControl(
339 $this->customizer, 'betterdocs_doc_single_content_area_padding_right', [
340 'type' => 'betterdocs-dimension',
341 'section' => 'betterdocs_single_docs_settings',
342 'settings' => 'betterdocs_doc_single_content_area_padding_right',
343 'label' => __( 'Right', 'betterdocs' ),
344 'priority' => 104,
345 'input_attrs' => [
346 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
347 ]
348 ] )
349 );
350
351 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_bottom', [
352 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_bottom'],
353 'capability' => 'edit_theme_options',
354 'transport' => 'postMessage',
355 'sanitize_callback' => [$this->sanitizer, 'integer']
356
357 ] );
358
359 $this->customizer->add_control( new DimensionControl(
360 $this->customizer, 'betterdocs_doc_single_content_area_padding_bottom', [
361 'type' => 'betterdocs-dimension',
362 'section' => 'betterdocs_single_docs_settings',
363 'settings' => 'betterdocs_doc_single_content_area_padding_bottom',
364 'label' => __( 'Bottom', 'betterdocs' ),
365 'priority' => 104,
366 'input_attrs' => [
367 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
368 ]
369 ] )
370 );
371
372 $this->customizer->add_setting( 'betterdocs_doc_single_content_area_padding_left', [
373 'default' => $this->defaults['betterdocs_doc_single_content_area_padding_left'],
374 'capability' => 'edit_theme_options',
375 'transport' => 'postMessage',
376 'sanitize_callback' => [$this->sanitizer, 'integer']
377
378 ] );
379
380 $this->customizer->add_control( new DimensionControl(
381 $this->customizer, 'betterdocs_doc_single_content_area_padding_left', [
382 'type' => 'betterdocs-dimension',
383 'section' => 'betterdocs_single_docs_settings',
384 'settings' => 'betterdocs_doc_single_content_area_padding_left',
385 'label' => __( 'Left', 'betterdocs' ),
386 'priority' => 104,
387 'input_attrs' => [
388 'class' => 'betterdocs_doc_single_content_area_padding betterdocs-dimension'
389 ]
390 ] )
391 );
392 }
393
394 public function doc_single_post_content_padding() {
395 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding', [
396 'default' => $this->defaults['betterdocs_doc_single_post_content_padding'],
397 'capability' => 'edit_theme_options',
398 'transport' => 'postMessage',
399 'sanitize_callback' => [$this->sanitizer, 'integer']
400
401 ] );
402
403 $this->customizer->add_control( new TitleControl(
404 $this->customizer, 'betterdocs_doc_single_post_content_padding', [
405 'type' => 'betterdocs-title',
406 'section' => 'betterdocs_single_docs_settings',
407 'settings' => 'betterdocs_doc_single_post_content_padding',
408 'label' => __( 'Doc Content Padding', 'betterdocs' ),
409 'priority' => 109,
410 'input_attrs' => [
411 'id' => 'betterdocs_doc_single_post_content_padding',
412 'class' => 'betterdocs-dimension'
413 ]
414 ] )
415 );
416
417 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_top', [
418 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_top'],
419 'capability' => 'edit_theme_options',
420 'transport' => 'postMessage',
421 'sanitize_callback' => [$this->sanitizer, 'integer']
422 ] );
423
424 $this->customizer->add_control( new DimensionControl(
425 $this->customizer, 'betterdocs_doc_single_post_content_padding_top', [
426 'type' => 'betterdocs-dimension',
427 'section' => 'betterdocs_single_docs_settings',
428 'settings' => 'betterdocs_doc_single_post_content_padding_top',
429 'label' => __( 'Top', 'betterdocs' ),
430 'priority' => 109,
431 'input_attrs' => [
432 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
433 ]
434 ] )
435 );
436
437 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_right', [
438 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_right'],
439 'capability' => 'edit_theme_options',
440 'transport' => 'postMessage',
441 'sanitize_callback' => [$this->sanitizer, 'integer']
442
443 ] );
444
445 $this->customizer->add_control( new DimensionControl(
446 $this->customizer, 'betterdocs_doc_single_post_content_padding_right', [
447 'type' => 'betterdocs-dimension',
448 'section' => 'betterdocs_single_docs_settings',
449 'settings' => 'betterdocs_doc_single_post_content_padding_right',
450 'label' => __( 'Right', 'betterdocs' ),
451 'priority' => 109,
452 'input_attrs' => [
453 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
454 ]
455 ] )
456 );
457
458 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_bottom', [
459 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_bottom'],
460 'capability' => 'edit_theme_options',
461 'transport' => 'postMessage',
462 'sanitize_callback' => [$this->sanitizer, 'integer']
463
464 ] );
465
466 $this->customizer->add_control( new DimensionControl(
467 $this->customizer, 'betterdocs_doc_single_post_content_padding_bottom', [
468 'type' => 'betterdocs-dimension',
469 'section' => 'betterdocs_single_docs_settings',
470 'settings' => 'betterdocs_doc_single_post_content_padding_bottom',
471 'label' => __( 'Bottom', 'betterdocs' ),
472 'priority' => 109,
473 'input_attrs' => [
474 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
475 ]
476 ] )
477 );
478
479 $this->customizer->add_setting( 'betterdocs_doc_single_post_content_padding_left', [
480 'default' => $this->defaults['betterdocs_doc_single_post_content_padding_left'],
481 'capability' => 'edit_theme_options',
482 'transport' => 'postMessage',
483 'sanitize_callback' => [$this->sanitizer, 'integer']
484
485 ] );
486
487 $this->customizer->add_control( new DimensionControl(
488 $this->customizer, 'betterdocs_doc_single_post_content_padding_left', [
489 'type' => 'betterdocs-dimension',
490 'section' => 'betterdocs_single_docs_settings',
491 'settings' => 'betterdocs_doc_single_post_content_padding_left',
492 'label' => __( 'Left', 'betterdocs' ),
493 'priority' => 109,
494 'input_attrs' => [
495 'class' => 'betterdocs_doc_single_post_content_padding betterdocs-dimension'
496 ]
497 ] )
498 );
499 }
500
501 public function doc_single_2_post_content_padding() {
502 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding', [
503 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding'],
504 'capability' => 'edit_theme_options',
505 'transport' => 'postMessage',
506 'sanitize_callback' => [$this->sanitizer, 'integer']
507
508 ] );
509
510 $this->customizer->add_control( new TitleControl(
511 $this->customizer, 'betterdocs_doc_single_2_post_content_padding', [
512 'type' => 'betterdocs-title',
513 'section' => 'betterdocs_single_docs_settings',
514 'settings' => 'betterdocs_doc_single_2_post_content_padding',
515 'label' => __( 'Post Content Padding', 'betterdocs' ),
516 'priority' => 114,
517 'input_attrs' => [
518 'id' => 'betterdocs_doc_single_2_post_content_padding',
519 'class' => 'betterdocs-dimension'
520 ]
521 ] )
522 );
523
524 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_top', [
525 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_top'],
526 'capability' => 'edit_theme_options',
527 'transport' => 'postMessage',
528 'sanitize_callback' => [$this->sanitizer, 'integer']
529 ] );
530
531 $this->customizer->add_control( new DimensionControl(
532 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_top', [
533 'type' => 'betterdocs-dimension',
534 'section' => 'betterdocs_single_docs_settings',
535 'settings' => 'betterdocs_doc_single_2_post_content_padding_top',
536 'label' => __( 'Top', 'betterdocs' ),
537 'priority' => 114,
538 'input_attrs' => [
539 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
540 ]
541 ] )
542 );
543
544 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_right', [
545 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_right'],
546 'capability' => 'edit_theme_options',
547 'transport' => 'postMessage',
548 'sanitize_callback' => [$this->sanitizer, 'integer']
549
550 ] );
551
552 $this->customizer->add_control( new DimensionControl(
553 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_right', [
554 'type' => 'betterdocs-dimension',
555 'section' => 'betterdocs_single_docs_settings',
556 'settings' => 'betterdocs_doc_single_2_post_content_padding_right',
557 'label' => __( 'Right', 'betterdocs' ),
558 'priority' => 114,
559 'input_attrs' => [
560 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
561 ]
562 ] )
563 );
564
565 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_bottom', [
566 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_bottom'],
567 'capability' => 'edit_theme_options',
568 'transport' => 'postMessage',
569 'sanitize_callback' => [$this->sanitizer, 'integer']
570
571 ] );
572
573 $this->customizer->add_control( new DimensionControl(
574 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_bottom', [
575 'type' => 'betterdocs-dimension',
576 'section' => 'betterdocs_single_docs_settings',
577 'settings' => 'betterdocs_doc_single_2_post_content_padding_bottom',
578 'label' => __( 'Bottom', 'betterdocs' ),
579 'priority' => 114,
580 'input_attrs' => [
581 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
582 ]
583 ] )
584 );
585
586 $this->customizer->add_setting( 'betterdocs_doc_single_2_post_content_padding_left', [
587 'default' => $this->defaults['betterdocs_doc_single_2_post_content_padding_left'],
588 'capability' => 'edit_theme_options',
589 'transport' => 'postMessage',
590 'sanitize_callback' => [$this->sanitizer, 'integer']
591
592 ] );
593
594 $this->customizer->add_control( new DimensionControl(
595 $this->customizer, 'betterdocs_doc_single_2_post_content_padding_left', [
596 'type' => 'betterdocs-dimension',
597 'section' => 'betterdocs_single_docs_settings',
598 'settings' => 'betterdocs_doc_single_2_post_content_padding_left',
599 'label' => __( 'Left', 'betterdocs' ),
600 'priority' => 114,
601 'input_attrs' => [
602 'class' => 'betterdocs_doc_single_2_post_content_padding betterdocs-dimension'
603 ]
604 ] )
605 );
606 }
607
608 public function doc_single_3_post_content_padding() {
609 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding', [
610 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding'],
611 'capability' => 'edit_theme_options',
612 'transport' => 'postMessage',
613 'sanitize_callback' => [$this->sanitizer, 'integer']
614
615 ] );
616
617 $this->customizer->add_control( new TitleControl(
618 $this->customizer, 'betterdocs_doc_single_3_post_content_padding', [
619 'type' => 'betterdocs-title',
620 'section' => 'betterdocs_single_docs_settings',
621 'settings' => 'betterdocs_doc_single_3_post_content_padding',
622 'label' => __( 'Content Area Inner Padding', 'betterdocs' ),
623 'priority' => 119,
624 'input_attrs' => [
625 'id' => 'betterdocs_doc_single_3_post_content_padding',
626 'class' => 'betterdocs-dimension'
627 ]
628 ] )
629 );
630
631 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_top', [
632 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_top'],
633 'capability' => 'edit_theme_options',
634 'transport' => 'postMessage',
635 'sanitize_callback' => [$this->sanitizer, 'integer']
636 ] );
637
638 $this->customizer->add_control( new DimensionControl(
639 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_top', [
640 'type' => 'betterdocs-dimension',
641 'section' => 'betterdocs_single_docs_settings',
642 'settings' => 'betterdocs_doc_single_3_post_content_padding_top',
643 'label' => __( 'Top', 'betterdocs' ),
644 'priority' => 119,
645 'input_attrs' => [
646 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
647 ]
648 ] )
649 );
650
651 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_right', [
652 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_right'],
653 'capability' => 'edit_theme_options',
654 'transport' => 'postMessage',
655 'sanitize_callback' => [$this->sanitizer, 'integer']
656
657 ] );
658
659 $this->customizer->add_control( new DimensionControl(
660 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_right', [
661 'type' => 'betterdocs-dimension',
662 'section' => 'betterdocs_single_docs_settings',
663 'settings' => 'betterdocs_doc_single_3_post_content_padding_right',
664 'label' => __( 'Right', 'betterdocs' ),
665 'priority' => 119,
666 'input_attrs' => [
667 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
668 ]
669 ] )
670 );
671
672 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_bottom', [
673 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_bottom'],
674 'capability' => 'edit_theme_options',
675 'transport' => 'postMessage',
676 'sanitize_callback' => [$this->sanitizer, 'integer']
677
678 ] );
679
680 $this->customizer->add_control( new DimensionControl(
681 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_bottom', [
682 'type' => 'betterdocs-dimension',
683 'section' => 'betterdocs_single_docs_settings',
684 'settings' => 'betterdocs_doc_single_3_post_content_padding_bottom',
685 'label' => __( 'Bottom', 'betterdocs' ),
686 'priority' => 119,
687 'input_attrs' => [
688 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
689 ]
690 ] )
691 );
692
693 $this->customizer->add_setting( 'betterdocs_doc_single_3_post_content_padding_left', [
694 'default' => $this->defaults['betterdocs_doc_single_3_post_content_padding_left'],
695 'capability' => 'edit_theme_options',
696 'transport' => 'postMessage',
697 'sanitize_callback' => [$this->sanitizer, 'integer']
698
699 ] );
700
701 $this->customizer->add_control( new DimensionControl(
702 $this->customizer, 'betterdocs_doc_single_3_post_content_padding_left', [
703 'type' => 'betterdocs-dimension',
704 'section' => 'betterdocs_single_docs_settings',
705 'settings' => 'betterdocs_doc_single_3_post_content_padding_left',
706 'label' => __( 'Left', 'betterdocs' ),
707 'priority' => 119,
708 'input_attrs' => [
709 'class' => 'betterdocs_doc_single_3_post_content_padding betterdocs-dimension'
710 ]
711 ] )
712 );
713 }
714
715 public function single_doc_title() {
716 $this->customizer->add_setting( 'betterdocs_single_doc_title', [
717 'default' => $this->defaults['betterdocs_single_doc_title'],
718 'sanitize_callback' => 'esc_html'
719 ] );
720
721 $this->customizer->add_control( new SeparatorControl(
722 $this->customizer, 'betterdocs_single_doc_title', [
723 'label' => __( 'Post Title', 'betterdocs' ),
724 'priority' => 124,
725 'settings' => 'betterdocs_single_doc_title',
726 'section' => 'betterdocs_single_docs_settings'
727 ] )
728 );
729 }
730
731 public function post_title_tag() {
732 $this->customizer->add_setting( 'betterdocs_post_title_tag', [
733 'default' => $this->defaults['betterdocs_post_title_tag'],
734 'capability' => 'edit_theme_options',
735 'sanitize_callback' => [$this->sanitizer, 'select']
736 ] );
737
738 $this->customizer->add_control(
739 new WP_Customize_Control(
740 $this->customizer,
741 'betterdocs_post_title_tag',
742 [
743 'label' => __( 'Title Tag', 'betterdocs' ),
744 'section' => 'betterdocs_single_docs_settings',
745 'settings' => 'betterdocs_post_title_tag',
746 'type' => 'select',
747 'choices' => [
748 'h1' => 'h1',
749 'h2' => 'h2',
750 'h3' => 'h3',
751 'h4' => 'h4',
752 'h5' => 'h5',
753 'h6' => 'h6'
754 ],
755 'priority' => 124
756 ]
757 )
758 );
759 }
760
761 public function post_title_text_transform() {
762 $this->customizer->add_setting( 'betterdocs_post_title_text_transform', [
763 'default' => $this->defaults['betterdocs_post_title_text_transform'],
764 'capability' => 'edit_theme_options',
765 'sanitize_callback' => [$this->sanitizer, 'select']
766 ] );
767
768 $this->customizer->add_control(
769 new WP_Customize_Control(
770 $this->customizer,
771 'betterdocs_post_title_text_transform',
772 [
773 'label' => __( 'Text Transform', 'betterdocs' ),
774 'section' => 'betterdocs_single_docs_settings',
775 'settings' => 'betterdocs_post_title_text_transform',
776 'type' => 'select',
777 'choices' => [
778 'uppercase' => 'Uppercase',
779 'lowercase' => 'Lowercase',
780 'capitalize' => 'Capitalize',
781 'none' => 'Normal'
782 ],
783 'priority' => 124
784 ]
785 )
786 );
787 }
788
789 public function single_doc_title_font_size() {
790 $this->customizer->add_setting( 'betterdocs_single_doc_title_font_size', [
791 'default' => $this->defaults['betterdocs_single_doc_title_font_size'],
792 'capability' => 'edit_theme_options',
793 'transport' => 'postMessage',
794 'sanitize_callback' => [$this->sanitizer, 'integer']
795
796 ] );
797
798 $this->customizer->add_control( new RangeValueControl(
799 $this->customizer, 'betterdocs_single_doc_title_font_size', [
800 'type' => 'betterdocs-range-value',
801 'section' => 'betterdocs_single_docs_settings',
802 'settings' => 'betterdocs_single_doc_title_font_size',
803 'label' => __( 'Font Size', 'betterdocs' ),
804 'priority' => 125,
805 'input_attrs' => [
806 'min' => 0,
807 'max' => 50,
808 'step' => 1,
809 'suffix' => 'px' //optional suffix
810 ]
811 ] )
812 );
813 }
814
815 public function single_doc_title_color() {
816 $this->customizer->add_setting( 'betterdocs_single_doc_title_color', [
817 'capability' => 'edit_theme_options',
818 'default' => $this->defaults['betterdocs_single_doc_title_color'],
819 'transport' => 'postMessage',
820 'sanitize_callback' => [$this->sanitizer, 'rgba']
821 ] );
822
823 $this->customizer->add_control(
824 new AlphaColorControl(
825 $this->customizer,
826 'betterdocs_single_doc_title_color',
827 [
828 'label' => __( 'Color', 'betterdocs' ),
829 'priority' => 126,
830 'section' => 'betterdocs_single_docs_settings',
831 'settings' => 'betterdocs_single_doc_title_color'
832 ]
833 )
834 );
835 }
836
837 public function doc_single_toc_title() {
838 $this->customizer->add_setting( 'betterdocs_doc_single_toc_title', [
839 'default' => $this->defaults['betterdocs_doc_single_toc_title'],
840 'sanitize_callback' => 'esc_html'
841 ] );
842
843 $this->customizer->add_control( new SeparatorControl(
844 $this->customizer, 'betterdocs_doc_single_toc_title', [
845 'label' => __( 'Table of Contents', 'betterdocs' ),
846 'priority' => 132,
847 'settings' => 'betterdocs_doc_single_toc_title',
848 'section' => 'betterdocs_single_docs_settings'
849 ] )
850 );
851 }
852
853 public function sticky_toc_width() {
854 $this->customizer->add_setting( 'betterdocs_sticky_toc_width', [
855 'default' => $this->defaults['betterdocs_sticky_toc_width'],
856 'capability' => 'edit_theme_options',
857 'transport' => 'postMessage',
858 'sanitize_callback' => [$this->sanitizer, 'integer']
859
860 ] );
861
862 $this->customizer->add_control( new RangeValueControl(
863 $this->customizer, 'betterdocs_sticky_toc_width', [
864 'type' => 'betterdocs-range-value',
865 'section' => 'betterdocs_single_docs_settings',
866 'settings' => 'betterdocs_sticky_toc_width',
867 'label' => __( 'Sticky Toc Width', 'betterdocs' ),
868 'priority' => 133,
869 'input_attrs' => [
870 'class' => '',
871 'min' => 100,
872 'max' => 500,
873 'step' => 1,
874 'suffix' => 'px' //optional suffix
875 ]
876 ] )
877 );
878 }
879
880 public function sticky_toc_zindex() {
881 $this->customizer->add_setting( 'betterdocs_sticky_toc_zindex', [
882 'default' => $this->defaults['betterdocs_sticky_toc_zindex'],
883 'capability' => 'edit_theme_options',
884 'transport' => 'postMessage',
885 'sanitize_callback' => [$this->sanitizer, 'integer']
886 ] );
887
888 $this->customizer->add_control( new NumberControl(
889 $this->customizer, 'betterdocs_sticky_toc_zindex', [
890 'type' => 'betterdocs-number',
891 'section' => 'betterdocs_single_docs_settings',
892 'settings' => 'betterdocs_sticky_toc_zindex',
893 'label' => __( 'Sticky Toc z-index', 'betterdocs' ),
894 'priority' => 134
895 ] )
896 );
897 }
898
899 public function sticky_toc_margin_top() {
900 $this->customizer->add_setting( 'betterdocs_sticky_toc_margin_top', [
901 'default' => $this->defaults['betterdocs_sticky_toc_margin_top'],
902 'capability' => 'edit_theme_options',
903 'transport' => 'postMessage',
904 'sanitize_callback' => [$this->sanitizer, 'integer']
905
906 ] );
907
908 $this->customizer->add_control( new RangeValueControl(
909 $this->customizer, 'betterdocs_sticky_toc_margin_top', [
910 'type' => 'betterdocs-range-value',
911 'section' => 'betterdocs_single_docs_settings',
912 'settings' => 'betterdocs_sticky_toc_margin_top',
913 'label' => __( 'Sticky Toc Margin Top', 'betterdocs' ),
914 'priority' => 135,
915 'input_attrs' => [
916 'class' => '',
917 'min' => 0,
918 'max' => 500,
919 'step' => 1,
920 'suffix' => 'px' //optional suffix
921 ]
922 ] )
923 );
924 }
925
926 public function toc_bg_color() {
927 $this->customizer->add_setting( 'betterdocs_toc_bg_color', [
928 'capability' => 'edit_theme_options',
929 'default' => $this->defaults['betterdocs_toc_bg_color'],
930 'transport' => 'postMessage',
931 'sanitize_callback' => [$this->sanitizer, 'rgba']
932 ] );
933
934 $this->customizer->add_control(
935 new AlphaColorControl(
936 $this->customizer,
937 'betterdocs_toc_bg_color',
938 [
939 'label' => __( 'Background Color', 'betterdocs' ),
940 'priority' => 136,
941 'section' => 'betterdocs_single_docs_settings',
942 'settings' => 'betterdocs_toc_bg_color'
943 ]
944 )
945 );
946 }
947
948 public function doc_single_toc_padding() {
949 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding', [
950 'default' => $this->defaults['betterdocs_doc_single_toc_padding'],
951 'capability' => 'edit_theme_options',
952 'transport' => 'postMessage',
953 'sanitize_callback' => [$this->sanitizer, 'integer']
954
955 ] );
956
957 $this->customizer->add_control( new TitleControl(
958 $this->customizer, 'betterdocs_doc_single_toc_padding', [
959 'type' => 'betterdocs-title',
960 'section' => 'betterdocs_single_docs_settings',
961 'settings' => 'betterdocs_doc_single_toc_padding',
962 'label' => __( 'Content Area Padding', 'betterdocs' ),
963 'priority' => 137,
964 'input_attrs' => [
965 'id' => 'betterdocs_doc_single_toc_padding',
966 'class' => 'betterdocs-dimension'
967 ]
968 ] )
969 );
970
971 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_top', [
972 'default' => $this->defaults['betterdocs_doc_single_toc_padding_top'],
973 'capability' => 'edit_theme_options',
974 'transport' => 'postMessage',
975 'sanitize_callback' => [$this->sanitizer, 'integer']
976 ] );
977
978 $this->customizer->add_control( new DimensionControl(
979 $this->customizer, 'betterdocs_doc_single_toc_padding_top', [
980 'type' => 'betterdocs-dimension',
981 'section' => 'betterdocs_single_docs_settings',
982 'settings' => 'betterdocs_doc_single_toc_padding_top',
983 'label' => __( 'Top', 'betterdocs' ),
984 'priority' => 137,
985 'input_attrs' => [
986 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
987 ]
988 ] )
989 );
990
991 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_right', [
992 'default' => $this->defaults['betterdocs_doc_single_toc_padding_right'],
993 'capability' => 'edit_theme_options',
994 'transport' => 'postMessage',
995 'sanitize_callback' => [$this->sanitizer, 'integer']
996
997 ] );
998
999 $this->customizer->add_control( new DimensionControl(
1000 $this->customizer, 'betterdocs_doc_single_toc_padding_right', [
1001 'type' => 'betterdocs-dimension',
1002 'section' => 'betterdocs_single_docs_settings',
1003 'settings' => 'betterdocs_doc_single_toc_padding_right',
1004 'label' => __( 'Right', 'betterdocs' ),
1005 'priority' => 137,
1006 'input_attrs' => [
1007 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1008 ]
1009 ] )
1010 );
1011
1012 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_bottom', [
1013 'default' => $this->defaults['betterdocs_doc_single_toc_padding_bottom'],
1014 'capability' => 'edit_theme_options',
1015 'transport' => 'postMessage',
1016 'sanitize_callback' => [$this->sanitizer, 'integer']
1017
1018 ] );
1019
1020 $this->customizer->add_control( new DimensionControl(
1021 $this->customizer, 'betterdocs_doc_single_toc_padding_bottom', [
1022 'type' => 'betterdocs-dimension',
1023 'section' => 'betterdocs_single_docs_settings',
1024 'settings' => 'betterdocs_doc_single_toc_padding_bottom',
1025 'label' => __( 'Bottom', 'betterdocs' ),
1026 'priority' => 137,
1027 'input_attrs' => [
1028 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1029 ]
1030 ] )
1031 );
1032
1033 $this->customizer->add_setting( 'betterdocs_doc_single_toc_padding_left', [
1034 'default' => $this->defaults['betterdocs_doc_single_toc_padding_left'],
1035 'capability' => 'edit_theme_options',
1036 'transport' => 'postMessage',
1037 'sanitize_callback' => [$this->sanitizer, 'integer']
1038
1039 ] );
1040
1041 $this->customizer->add_control( new DimensionControl(
1042 $this->customizer, 'betterdocs_doc_single_toc_padding_left', [
1043 'type' => 'betterdocs-dimension',
1044 'section' => 'betterdocs_single_docs_settings',
1045 'settings' => 'betterdocs_doc_single_toc_padding_left',
1046 'label' => __( 'Left', 'betterdocs' ),
1047 'priority' => 137,
1048 'input_attrs' => [
1049 'class' => 'betterdocs_doc_single_toc_padding betterdocs-dimension'
1050 ]
1051 ] )
1052 );
1053 }
1054
1055 public function doc_single_toc_margin() {
1056 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin', [
1057 'default' => $this->defaults['betterdocs_doc_single_toc_margin'],
1058 'capability' => 'edit_theme_options',
1059 'transport' => 'postMessage',
1060 'sanitize_callback' => [$this->sanitizer, 'integer']
1061 ] );
1062
1063 $this->customizer->add_control( new TitleControl(
1064 $this->customizer, 'betterdocs_doc_single_toc_margin', [
1065 'type' => 'betterdocs-title',
1066 'section' => 'betterdocs_single_docs_settings',
1067 'settings' => 'betterdocs_doc_single_toc_margin',
1068 'label' => __( 'Content Area Margin', 'betterdocs' ),
1069 'priority' => 141,
1070 'input_attrs' => [
1071 'id' => 'betterdocs_doc_single_toc_margin',
1072 'class' => 'betterdocs-dimension'
1073 ]
1074 ] )
1075 );
1076
1077 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_top', [
1078 'default' => $this->defaults['betterdocs_doc_single_toc_margin_top'],
1079 'capability' => 'edit_theme_options',
1080 'transport' => 'postMessage',
1081 'sanitize_callback' => [$this->sanitizer, 'integer']
1082 ] );
1083
1084 $this->customizer->add_control( new DimensionControl(
1085 $this->customizer, 'betterdocs_doc_single_toc_margin_top', [
1086 'type' => 'betterdocs-dimension',
1087 'section' => 'betterdocs_single_docs_settings',
1088 'settings' => 'betterdocs_doc_single_toc_margin_top',
1089 'label' => __( 'Top', 'betterdocs' ),
1090 'priority' => 141,
1091 'input_attrs' => [
1092 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1093 ]
1094 ] )
1095 );
1096
1097 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_right', [
1098 'default' => $this->defaults['betterdocs_doc_single_toc_margin_right'],
1099 'capability' => 'edit_theme_options',
1100 'transport' => 'postMessage',
1101 'sanitize_callback' => [$this->sanitizer, 'integer']
1102 ] );
1103
1104 $this->customizer->add_control( new DimensionControl(
1105 $this->customizer, 'betterdocs_doc_single_toc_margin_right', [
1106 'type' => 'betterdocs-dimension',
1107 'section' => 'betterdocs_single_docs_settings',
1108 'settings' => 'betterdocs_doc_single_toc_margin_right',
1109 'label' => __( 'Right', 'betterdocs' ),
1110 'priority' => 141,
1111 'input_attrs' => [
1112 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1113 ]
1114 ] )
1115 );
1116
1117 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_bottom', [
1118 'default' => $this->defaults['betterdocs_doc_single_toc_margin_bottom'],
1119 'capability' => 'edit_theme_options',
1120 'transport' => 'postMessage',
1121 'sanitize_callback' => [$this->sanitizer, 'integer']
1122 ] );
1123
1124 $this->customizer->add_control( new DimensionControl(
1125 $this->customizer, 'betterdocs_doc_single_toc_margin_bottom', [
1126 'type' => 'betterdocs-dimension',
1127 'section' => 'betterdocs_single_docs_settings',
1128 'settings' => 'betterdocs_doc_single_toc_margin_bottom',
1129 'label' => __( 'Bottom', 'betterdocs' ),
1130 'priority' => 141,
1131 'input_attrs' => [
1132 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1133 ]
1134 ] )
1135 );
1136
1137 $this->customizer->add_setting( 'betterdocs_doc_single_toc_margin_left', [
1138 'default' => $this->defaults['betterdocs_doc_single_toc_margin_left'],
1139 'capability' => 'edit_theme_options',
1140 'transport' => 'postMessage',
1141 'sanitize_callback' => [$this->sanitizer, 'integer']
1142 ] );
1143
1144 $this->customizer->add_control( new DimensionControl(
1145 $this->customizer, 'betterdocs_doc_single_toc_margin_left', [
1146 'type' => 'betterdocs-dimension',
1147 'section' => 'betterdocs_single_docs_settings',
1148 'settings' => 'betterdocs_doc_single_toc_margin_left',
1149 'label' => __( 'Left', 'betterdocs' ),
1150 'priority' => 141,
1151 'input_attrs' => [
1152 'class' => 'betterdocs_doc_single_toc_margin betterdocs-dimension'
1153 ]
1154 ] )
1155 );
1156 }
1157
1158 public function toc_title_color() {
1159 $this->customizer->add_setting( 'betterdocs_toc_title_color', [
1160 'capability' => 'edit_theme_options',
1161 'default' => $this->defaults['betterdocs_toc_title_color'],
1162 'transport' => 'postMessage',
1163 'sanitize_callback' => [$this->sanitizer, 'rgba']
1164 ] );
1165
1166 $this->customizer->add_control(
1167 new AlphaColorControl(
1168 $this->customizer,
1169 'betterdocs_toc_title_color',
1170 [
1171 'label' => __( 'Title Color', 'betterdocs' ),
1172 'priority' => 142,
1173 'section' => 'betterdocs_single_docs_settings',
1174 'settings' => 'betterdocs_toc_title_color'
1175 ]
1176 )
1177 );
1178 }
1179
1180 public function toc_title_font_size() {
1181 $this->customizer->add_setting( 'betterdocs_toc_title_font_size', [
1182 'default' => $this->defaults['betterdocs_toc_title_font_size'],
1183 'capability' => 'edit_theme_options',
1184 'transport' => 'postMessage',
1185 'sanitize_callback' => [$this->sanitizer, 'integer']
1186
1187 ] );
1188
1189 $this->customizer->add_control( new RangeValueControl(
1190 $this->customizer, 'betterdocs_toc_title_font_size', [
1191 'type' => 'betterdocs-range-value',
1192 'section' => 'betterdocs_single_docs_settings',
1193 'settings' => 'betterdocs_toc_title_font_size',
1194 'label' => __( 'Title Font Size', 'betterdocs' ),
1195 'priority' => 143,
1196 'input_attrs' => [
1197 'class' => '',
1198 'min' => 0,
1199 'max' => 50,
1200 'step' => 1,
1201 'suffix' => 'px' //optional suffix
1202 ]
1203 ] )
1204 );
1205 }
1206
1207 public function toc_list_item_color() {
1208 $this->customizer->add_setting( 'betterdocs_toc_list_item_color', [
1209 'default' => $this->defaults['betterdocs_toc_list_item_color'],
1210 'transport' => 'postMessage',
1211 'sanitize_callback' => [$this->sanitizer, 'rgba']
1212 ] );
1213
1214 $this->customizer->add_control(
1215 new AlphaColorControl(
1216 $this->customizer,
1217 'betterdocs_toc_list_item_color',
1218 [
1219 'label' => __( 'List Item Color', 'betterdocs' ),
1220 'priority' => 144,
1221 'section' => 'betterdocs_single_docs_settings',
1222 'settings' => 'betterdocs_toc_list_item_color'
1223 ]
1224 )
1225 );
1226 }
1227
1228 public function toc_list_item_hover_color() {
1229 $this->customizer->add_setting( 'betterdocs_toc_list_item_hover_color', [
1230 'capability' => 'edit_theme_options',
1231 'default' => $this->defaults['betterdocs_toc_list_item_hover_color'],
1232 'sanitize_callback' => [$this->sanitizer, 'rgba']
1233 ] );
1234
1235 $this->customizer->add_control(
1236 new AlphaColorControl(
1237 $this->customizer,
1238 'betterdocs_toc_list_item_hover_color',
1239 [
1240 'label' => __( 'List Item Hover Color', 'betterdocs' ),
1241 'priority' => 145,
1242 'section' => 'betterdocs_single_docs_settings',
1243 'settings' => 'betterdocs_toc_list_item_hover_color'
1244 ]
1245 )
1246 );
1247 }
1248
1249 public function toc_active_item_color() {
1250 $this->customizer->add_setting( 'betterdocs_toc_active_item_color', [
1251 'capability' => 'edit_theme_options',
1252 'default' => $this->defaults['betterdocs_toc_active_item_color'],
1253 'sanitize_callback' => [$this->sanitizer, 'rgba']
1254 ] );
1255
1256 $this->customizer->add_control(
1257 new AlphaColorControl(
1258 $this->customizer,
1259 'betterdocs_toc_active_item_color',
1260 [
1261 'label' => __( 'Active Item Color', 'betterdocs' ),
1262 'priority' => 146,
1263 'section' => 'betterdocs_single_docs_settings',
1264 'settings' => 'betterdocs_toc_active_item_color'
1265 ]
1266 )
1267 );
1268 }
1269
1270 public function toc_list_item_font_size() {
1271 $this->customizer->add_setting( 'betterdocs_toc_list_item_font_size', [
1272 'default' => $this->defaults['betterdocs_toc_list_item_font_size'],
1273 'capability' => 'edit_theme_options',
1274 'transport' => 'postMessage',
1275 'sanitize_callback' => [$this->sanitizer, 'integer']
1276
1277 ] );
1278
1279 $this->customizer->add_control( new RangeValueControl(
1280 $this->customizer, 'betterdocs_toc_list_item_font_size', [
1281 'type' => 'betterdocs-range-value',
1282 'section' => 'betterdocs_single_docs_settings',
1283 'settings' => 'betterdocs_toc_list_item_font_size',
1284 'label' => __( 'List Item Font Size', 'betterdocs' ),
1285 'priority' => 147,
1286 'input_attrs' => [
1287 'class' => '',
1288 'min' => 0,
1289 'max' => 50,
1290 'step' => 1,
1291 'suffix' => 'px' //optional suffix
1292 ]
1293 ] )
1294 );
1295 }
1296
1297 public function doc_single_toc_list_margin() {
1298 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin', [
1299 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin'],
1300 'capability' => 'edit_theme_options',
1301 'transport' => 'postMessage',
1302 'sanitize_callback' => [$this->sanitizer, 'integer']
1303
1304 ] );
1305
1306 $this->customizer->add_control( new TitleControl(
1307 $this->customizer, 'betterdocs_doc_single_toc_list_margin', [
1308 'type' => 'betterdocs-title',
1309 'section' => 'betterdocs_single_docs_settings',
1310 'settings' => 'betterdocs_doc_single_toc_list_margin',
1311 'label' => __( 'TOC List Margin', 'betterdocs' ),
1312 'priority' => 148,
1313 'input_attrs' => [
1314 'id' => 'betterdocs_doc_single_toc_list_margin',
1315 'class' => 'betterdocs-dimension'
1316 ]
1317 ] )
1318 );
1319
1320 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_top', [
1321 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_top'],
1322 'capability' => 'edit_theme_options',
1323 'transport' => 'postMessage',
1324 'sanitize_callback' => [$this->sanitizer, 'integer']
1325 ] );
1326
1327 $this->customizer->add_control( new DimensionControl(
1328 $this->customizer, 'betterdocs_doc_single_toc_list_margin_top', [
1329 'type' => 'betterdocs-dimension',
1330 'section' => 'betterdocs_single_docs_settings',
1331 'settings' => 'betterdocs_doc_single_toc_list_margin_top',
1332 'label' => __( 'Top', 'betterdocs' ),
1333 'priority' => 148,
1334 'input_attrs' => [
1335 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1336 ]
1337 ] )
1338 );
1339
1340 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_right', [
1341 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_right'],
1342 'capability' => 'edit_theme_options',
1343 'transport' => 'postMessage',
1344 'sanitize_callback' => [$this->sanitizer, 'integer']
1345
1346 ] );
1347
1348 $this->customizer->add_control( new DimensionControl(
1349 $this->customizer, 'betterdocs_doc_single_toc_list_margin_right', [
1350 'type' => 'betterdocs-dimension',
1351 'section' => 'betterdocs_single_docs_settings',
1352 'settings' => 'betterdocs_doc_single_toc_list_margin_right',
1353 'label' => __( 'Right', 'betterdocs' ),
1354 'priority' => 148,
1355 'input_attrs' => [
1356 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1357 ]
1358 ] )
1359 );
1360
1361 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_bottom', [
1362 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_bottom'],
1363 'capability' => 'edit_theme_options',
1364 'transport' => 'postMessage',
1365 'sanitize_callback' => [$this->sanitizer, 'integer']
1366
1367 ] );
1368
1369 $this->customizer->add_control( new DimensionControl(
1370 $this->customizer, 'betterdocs_doc_single_toc_list_margin_bottom', [
1371 'type' => 'betterdocs-dimension',
1372 'section' => 'betterdocs_single_docs_settings',
1373 'settings' => 'betterdocs_doc_single_toc_list_margin_bottom',
1374 'label' => __( 'Bottom', 'betterdocs' ),
1375 'priority' => 148,
1376 'input_attrs' => [
1377 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1378 ]
1379 ] )
1380 );
1381
1382 $this->customizer->add_setting( 'betterdocs_doc_single_toc_list_margin_left', [
1383 'default' => $this->defaults['betterdocs_doc_single_toc_list_margin_left'],
1384 'capability' => 'edit_theme_options',
1385 'transport' => 'postMessage',
1386 'sanitize_callback' => [$this->sanitizer, 'integer']
1387
1388 ] );
1389
1390 $this->customizer->add_control( new DimensionControl(
1391 $this->customizer, 'betterdocs_doc_single_toc_list_margin_left', [
1392 'type' => 'betterdocs-dimension',
1393 'section' => 'betterdocs_single_docs_settings',
1394 'settings' => 'betterdocs_doc_single_toc_list_margin_left',
1395 'label' => __( 'Left', 'betterdocs' ),
1396 'priority' => 148,
1397 'input_attrs' => [
1398 'class' => 'betterdocs_doc_single_toc_list_margin betterdocs-dimension'
1399 ]
1400 ] )
1401 );
1402 }
1403
1404 public function toc_list_number_color() {
1405 $this->customizer->add_setting( 'betterdocs_toc_list_number_color', [
1406 'default' => $this->defaults['betterdocs_toc_list_number_color'],
1407 'capability' => 'edit_theme_options',
1408 'sanitize_callback' => [$this->sanitizer, 'rgba']
1409 ] );
1410
1411 $this->customizer->add_control(
1412 new AlphaColorControl(
1413 $this->customizer,
1414 'betterdocs_toc_list_number_color',
1415 [
1416 'label' => __( 'List Number Color', 'betterdocs' ),
1417 'priority' => 153,
1418 'section' => 'betterdocs_single_docs_settings',
1419 'settings' => 'betterdocs_toc_list_number_color'
1420 ]
1421 )
1422 );
1423 }
1424
1425 public function toc_list_number_font_size() {
1426 $this->customizer->add_setting( 'betterdocs_toc_list_number_font_size', [
1427 'default' => $this->defaults['betterdocs_toc_list_number_font_size'],
1428 'capability' => 'edit_theme_options',
1429 'sanitize_callback' => [$this->sanitizer, 'integer']
1430
1431 ] );
1432
1433 $this->customizer->add_control( new RangeValueControl(
1434 $this->customizer, 'betterdocs_toc_list_number_font_size', [
1435 'type' => 'betterdocs-range-value',
1436 'section' => 'betterdocs_single_docs_settings',
1437 'settings' => 'betterdocs_toc_list_number_font_size',
1438 'label' => __( 'List Number Font Size', 'betterdocs' ),
1439 'priority' => 154,
1440 'input_attrs' => [
1441 'class' => '',
1442 'min' => 0,
1443 'max' => 50,
1444 'step' => 1,
1445 'suffix' => 'px' //optional suffix
1446 ]
1447 ] )
1448 );
1449 }
1450
1451 public function toc_margin_bottom() {
1452 $this->customizer->add_setting( 'betterdocs_toc_margin_bottom', [
1453 'default' => $this->defaults['betterdocs_toc_margin_bottom'],
1454 'capability' => 'edit_theme_options',
1455 'transport' => 'postMessage',
1456 'sanitize_callback' => [$this->sanitizer, 'integer']
1457
1458 ] );
1459
1460 $this->customizer->add_control( new RangeValueControl(
1461 $this->customizer, 'betterdocs_toc_margin_bottom', [
1462 'type' => 'betterdocs-range-value',
1463 'section' => 'betterdocs_single_docs_settings',
1464 'settings' => 'betterdocs_toc_margin_bottom',
1465 'label' => __( 'TOC Margin Bottom', 'betterdocs' ),
1466 'priority' => 155,
1467 'input_attrs' => [
1468 'class' => '',
1469 'min' => 0,
1470 'max' => 500,
1471 'step' => 1,
1472 'suffix' => 'px' // optional suffix
1473 ]
1474 ] )
1475 );
1476 }
1477
1478 public function doc_single_entry_content() {
1479 $this->customizer->add_setting( 'betterdocs_doc_single_entry_content', [
1480 'default' => $this->defaults['betterdocs_doc_single_entry_content'],
1481 'sanitize_callback' => 'esc_html'
1482 ] );
1483
1484 $this->customizer->add_control( new SeparatorControl(
1485 $this->customizer, 'betterdocs_doc_single_entry_content', [
1486 'label' => __( 'Entry Content', 'betterdocs' ),
1487 'priority' => 156,
1488 'settings' => 'betterdocs_doc_single_entry_content',
1489 'section' => 'betterdocs_single_docs_settings'
1490 ] )
1491 );
1492 }
1493
1494 public function single_content_font_size() {
1495 $this->customizer->add_setting( 'betterdocs_single_content_font_size', [
1496 'default' => $this->defaults['betterdocs_single_content_font_size'],
1497 'capability' => 'edit_theme_options',
1498 'transport' => 'postMessage',
1499 'sanitize_callback' => [$this->sanitizer, 'integer']
1500
1501 ] );
1502
1503 $this->customizer->add_control( new RangeValueControl(
1504 $this->customizer, 'betterdocs_single_content_font_size', [
1505 'type' => 'betterdocs-range-value',
1506 'section' => 'betterdocs_single_docs_settings',
1507 'settings' => 'betterdocs_single_content_font_size',
1508 'label' => __( 'Font Size', 'betterdocs' ),
1509 'priority' => 157,
1510 'input_attrs' => [
1511 'class' => '',
1512 'min' => 0,
1513 'max' => 50,
1514 'step' => 1,
1515 'suffix' => 'px' // optional suffix
1516 ]
1517 ] )
1518 );
1519 }
1520
1521 public function single_content_font_color() {
1522 $this->customizer->add_setting( 'betterdocs_single_content_font_color', [
1523 'default' => $this->defaults['betterdocs_single_content_font_color'],
1524 'capability' => 'edit_theme_options',
1525 'transport' => 'postMessage',
1526 'sanitize_callback' => [$this->sanitizer, 'rgba']
1527 ] );
1528
1529 $this->customizer->add_control(
1530 new AlphaColorControl(
1531 $this->customizer,
1532 'betterdocs_single_content_font_color',
1533 [
1534 'label' => __( 'Font Color', 'betterdocs' ),
1535 'priority' => 158,
1536 'section' => 'betterdocs_single_docs_settings',
1537 'settings' => 'betterdocs_single_content_font_color'
1538 ]
1539 )
1540 );
1541 }
1542
1543 public function social_share_title() {
1544 $this->customizer->add_setting( 'betterdocs_social_share_title', [
1545 'default' => '',
1546 'sanitize_callback' => 'esc_html'
1547 ] );
1548
1549 $this->customizer->add_control(
1550 new SeparatorControl(
1551 $this->customizer, 'betterdocs_social_share_title', [
1552 'label' => __( 'Social Share', 'betterdocs' ),
1553 'priority' => 164,
1554 'settings' => 'betterdocs_social_share_title',
1555 'section' => 'betterdocs_single_docs_settings'
1556 ]
1557 )
1558 );
1559 }
1560
1561 public function post_social_share() {
1562 $this->customizer->add_setting( 'betterdocs_post_social_share', [
1563 'default' => $this->defaults['betterdocs_post_social_share'],
1564 'capability' => 'edit_theme_options',
1565 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1566 ] );
1567
1568 $this->customizer->add_control(
1569 new ToggleControl(
1570 $this->customizer, 'betterdocs_post_social_share', [
1571 'label' => __( 'Enable Social Sharing?', 'betterdocs' ),
1572 'priority' => 165,
1573 'section' => 'betterdocs_single_docs_settings',
1574 'settings' => 'betterdocs_post_social_share',
1575 'type' => 'light' // light, ios, flat
1576 ]
1577 )
1578 );
1579 }
1580
1581 public function social_sharing_text() {
1582 $this->customizer->add_setting( 'betterdocs_social_sharing_text', [
1583 'default' => $this->defaults['betterdocs_social_sharing_text'],
1584 'capability' => 'edit_theme_options',
1585 'sanitize_callback' => 'esc_html'
1586 ] );
1587
1588 $this->customizer->add_control(
1589 new SelectControl(
1590 $this->customizer,
1591 'betterdocs_social_sharing_text',
1592 [
1593 'label' => __( 'Social Sharing Title', 'betterdocs' ),
1594 'priority' => 166,
1595 'section' => 'betterdocs_single_docs_settings',
1596 'settings' => 'betterdocs_social_sharing_text',
1597 'type' => 'text'
1598 ]
1599 )
1600 );
1601 }
1602
1603 public function post_social_share_text_color() {
1604 $this->customizer->add_setting( 'betterdocs_post_social_share_text_color', [
1605 'default' => $this->defaults['betterdocs_post_social_share_text_color'],
1606 'capability' => 'edit_theme_options',
1607 'transport' => 'postMessage',
1608 'sanitize_callback' => [$this->sanitizer, 'rgba']
1609 ] );
1610
1611 $this->customizer->add_control(
1612 new AlphaColorControl(
1613 $this->customizer,
1614 'betterdocs_post_social_share_text_color',
1615 [
1616 'label' => __( 'Title Text Color', 'betterdocs' ),
1617 'priority' => 167,
1618 'section' => 'betterdocs_single_docs_settings',
1619 'settings' => 'betterdocs_post_social_share_text_color'
1620 ]
1621 )
1622 );
1623 }
1624
1625 public function post_social_share_facebook() {
1626 $this->customizer->add_setting( 'betterdocs_post_social_share_facebook', [
1627 'default' => $this->defaults['betterdocs_post_social_share_facebook'],
1628 'capability' => 'edit_theme_options',
1629 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1630 ] );
1631
1632 $this->customizer->add_control( new ToggleControl(
1633 $this->customizer, 'betterdocs_post_social_share_facebook', [
1634 'label' => __( 'Facebook Sharing', 'betterdocs' ),
1635 'priority' => 168,
1636 'section' => 'betterdocs_single_docs_settings',
1637 'settings' => 'betterdocs_post_social_share_facebook',
1638 'type' => 'light' // light, ios, flat
1639 ] )
1640 );
1641 }
1642
1643 public function post_social_share_twitter() {
1644 $this->customizer->add_setting( 'betterdocs_post_social_share_twitter', [
1645 'default' => $this->defaults['betterdocs_post_social_share_twitter'],
1646 'capability' => 'edit_theme_options',
1647 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1648 ] );
1649
1650 $this->customizer->add_control( new ToggleControl(
1651 $this->customizer, 'betterdocs_post_social_share_twitter', [
1652 'label' => __( 'Twitter Sharing', 'betterdocs' ),
1653 'priority' => 169,
1654 'section' => 'betterdocs_single_docs_settings',
1655 'settings' => 'betterdocs_post_social_share_twitter',
1656 'type' => 'light' // light, ios, flat
1657 ] )
1658 );
1659 }
1660
1661 public function post_social_share_linkedin() {
1662 $this->customizer->add_setting( 'betterdocs_post_social_share_linkedin', [
1663 'default' => $this->defaults['betterdocs_post_social_share_linkedin'],
1664 'capability' => 'edit_theme_options',
1665 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1666 ] );
1667
1668 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_linkedin', [
1669 'label' => __( 'Linkedin Sharing', 'betterdocs' ),
1670 'priority' => 170,
1671 'section' => 'betterdocs_single_docs_settings',
1672 'settings' => 'betterdocs_post_social_share_linkedin',
1673 'type' => 'light' // light, ios, flat
1674 ] ) );
1675 }
1676
1677 public function post_social_share_pinterest() {
1678 $this->customizer->add_setting( 'betterdocs_post_social_share_pinterest', [
1679 'default' => $this->defaults['betterdocs_post_social_share_pinterest'],
1680 'capability' => 'edit_theme_options',
1681 'sanitize_callback' => [$this->sanitizer, 'checkbox']
1682 ] );
1683
1684 $this->customizer->add_control( new ToggleControl( $this->customizer, 'betterdocs_post_social_share_pinterest', [
1685 'label' => __( 'Pinterest Sharing', 'betterdocs' ),
1686 'priority' => 171,
1687 'section' => 'betterdocs_single_docs_settings',
1688 'settings' => 'betterdocs_post_social_share_pinterest',
1689 'type' => 'light' // light, ios, flat
1690 ] ) );
1691 }
1692
1693 public function doc_single_entry_footer() {
1694 $this->customizer->add_setting( 'betterdocs_doc_single_entry_footer', [
1695 'default' => $this->defaults['betterdocs_doc_single_entry_footer'],
1696 'sanitize_callback' => 'esc_html'
1697 ] );
1698
1699 $this->customizer->add_control( new SeparatorControl(
1700 $this->customizer, 'betterdocs_doc_single_entry_footer', [
1701 'label' => __( 'Entry Footer', 'betterdocs' ),
1702 'priority' => 172,
1703 'settings' => 'betterdocs_doc_single_entry_footer',
1704 'section' => 'betterdocs_single_docs_settings'
1705 ] )
1706 );
1707 }
1708
1709 public function single_doc_feedback_icon_font_size() {
1710 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon_font_size', [
1711 'default' => $this->defaults['betterdocs_single_doc_feedback_icon_font_size'],
1712 'capability' => 'edit_theme_options',
1713 'transport' => 'postMessage',
1714 'sanitize_callback' => [$this->sanitizer, 'integer']
1715
1716 ] );
1717
1718 $this->customizer->add_control( new RangeValueControl(
1719 $this->customizer, 'betterdocs_single_doc_feedback_icon_font_size', [
1720 'type' => 'betterdocs-range-value',
1721 'section' => 'betterdocs_single_docs_settings',
1722 'settings' => 'betterdocs_single_doc_feedback_icon_font_size',
1723 'label' => __( 'Feedback Icon Size', 'betterdocs' ),
1724 'priority' => 173,
1725 'input_attrs' => [
1726 'class' => '',
1727 'min' => 0,
1728 'max' => 100,
1729 'step' => 1,
1730 'suffix' => 'px' //optional suffix
1731 ]
1732 ] )
1733 );
1734 }
1735
1736 public function single_doc_feedback_icon() {
1737 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_icon', [
1738 'default' => $this->defaults['betterdocs_single_doc_feedback_icon'],
1739 'capability' => 'edit_theme_options'
1740 ] );
1741
1742 $this->customizer->add_control( new WP_Customize_Image_Control(
1743 $this->customizer, 'betterdocs_single_doc_feedback_icon', [
1744 'section' => 'betterdocs_single_docs_settings',
1745 'settings' => 'betterdocs_single_doc_feedback_icon',
1746 'label' => __( 'Feedback Icon', 'betterdocs' ),
1747 'priority' => 173
1748 ] )
1749 );
1750 }
1751
1752 public function single_doc_feedback_link_color() {
1753 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_color', [
1754 'default' => $this->defaults['betterdocs_single_doc_feedback_link_color'],
1755 'capability' => 'edit_theme_options',
1756 'transport' => 'postMessage',
1757 'sanitize_callback' => [$this->sanitizer, 'rgba']
1758 ] );
1759
1760 $this->customizer->add_control(
1761 new AlphaColorControl(
1762 $this->customizer,
1763 'betterdocs_single_doc_feedback_link_color',
1764 [
1765 'label' => __( 'Feedback Link Color', 'betterdocs' ),
1766 'priority' => 174,
1767 'section' => 'betterdocs_single_docs_settings',
1768 'settings' => 'betterdocs_single_doc_feedback_link_color'
1769 ]
1770 )
1771 );
1772 }
1773
1774 public function single_doc_feedback_link_hover_color() {
1775 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_hover_color', [
1776 'default' => $this->defaults['betterdocs_single_doc_feedback_link_hover_color'],
1777 'capability' => 'edit_theme_options',
1778 'sanitize_callback' => [$this->sanitizer, 'rgba']
1779 ] );
1780
1781 $this->customizer->add_control(
1782 new AlphaColorControl(
1783 $this->customizer,
1784 'betterdocs_single_doc_feedback_link_hover_color',
1785 [
1786 'label' => __( 'Feedback Link Hover Color', 'betterdocs' ),
1787 'priority' => 175,
1788 'section' => 'betterdocs_single_docs_settings',
1789 'settings' => 'betterdocs_single_doc_feedback_link_hover_color'
1790 ]
1791 )
1792 );
1793 }
1794
1795 public function single_doc_feedback_link_font_size() {
1796 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_link_font_size', [
1797 'default' => $this->defaults['betterdocs_single_doc_feedback_link_font_size'],
1798 'capability' => 'edit_theme_options',
1799 'transport' => 'postMessage',
1800 'sanitize_callback' => [$this->sanitizer, 'integer']
1801
1802 ] );
1803
1804 $this->customizer->add_control( new RangeValueControl(
1805 $this->customizer, 'betterdocs_single_doc_feedback_link_font_size', [
1806 'type' => 'betterdocs-range-value',
1807 'section' => 'betterdocs_single_docs_settings',
1808 'settings' => 'betterdocs_single_doc_feedback_link_font_size',
1809 'label' => __( 'Feedback Link Font Size', 'betterdocs' ),
1810 'priority' => 175,
1811 'input_attrs' => [
1812 'class' => '',
1813 'min' => 0,
1814 'max' => 50,
1815 'step' => 1,
1816 'suffix' => 'px' //optional suffix
1817 ]
1818 ] )
1819 );
1820 }
1821
1822 public function feedback_form_title_tag() {
1823 $this->customizer->add_setting( 'betterdocs_feedback_form_title_tag', [
1824 'default' => $this->defaults['betterdocs_feedback_form_title_tag'],
1825 'capability' => 'edit_theme_options',
1826 'sanitize_callback' => [$this->sanitizer, 'select']
1827 ] );
1828
1829 $this->customizer->add_control(
1830 new WP_Customize_Control(
1831 $this->customizer,
1832 'betterdocs_feedback_form_title_tag',
1833 [
1834 'label' => __( 'Feedback Form Title Tag', 'betterdocs' ),
1835 'section' => 'betterdocs_single_docs_settings',
1836 'settings' => 'betterdocs_feedback_form_title_tag',
1837 'priority' => 175,
1838 'type' => 'select',
1839 'choices' => [
1840 'h1' => 'h1',
1841 'h2' => 'h2',
1842 'h3' => 'h3',
1843 'h4' => 'h4',
1844 'h5' => 'h5',
1845 'h6' => 'h6'
1846 ]
1847 ]
1848 )
1849 );
1850 }
1851
1852 public function single_doc_feedback_title_font_size() {
1853 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_font_size', [
1854 'default' => $this->defaults['betterdocs_single_doc_feedback_title_font_size'],
1855 'capability' => 'edit_theme_options',
1856 'transport' => 'postMessage',
1857 'sanitize_callback' => [$this->sanitizer, 'integer']
1858
1859 ] );
1860
1861 $this->customizer->add_control( new RangeValueControl(
1862 $this->customizer, 'betterdocs_single_doc_feedback_title_font_size', [
1863 'type' => 'betterdocs-range-value',
1864 'section' => 'betterdocs_single_docs_settings',
1865 'settings' => 'betterdocs_single_doc_feedback_title_font_size',
1866 'label' => __( 'Feedback Form Title Font Size', 'betterdocs' ),
1867 'priority' => 175,
1868 'input_attrs' => [
1869 'class' => '',
1870 'min' => 0,
1871 'max' => 100,
1872 'step' => 1,
1873 'suffix' => 'px' //optional suffix
1874 ]
1875 ] )
1876 );
1877 }
1878
1879 public function single_doc_feedback_title_color() {
1880 $this->customizer->add_setting( 'betterdocs_single_doc_feedback_title_color', [
1881 'default' => $this->defaults['betterdocs_single_doc_feedback_title_color'],
1882 'capability' => 'edit_theme_options',
1883 'transport' => 'postMessage',
1884 'sanitize_callback' => [$this->sanitizer, 'rgba']
1885 ] );
1886
1887 $this->customizer->add_control(
1888 new AlphaColorControl(
1889 $this->customizer,
1890 'betterdocs_single_doc_feedback_title_color',
1891 [
1892 'label' => __( 'Feedback Form Title Color', 'betterdocs' ),
1893 'priority' => 175,
1894 'section' => 'betterdocs_single_docs_settings',
1895 'settings' => 'betterdocs_single_doc_feedback_title_color'
1896 ]
1897 )
1898 );
1899 }
1900
1901 public function single_doc_navigation_color() {
1902 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_color', [
1903 'default' => $this->defaults['betterdocs_single_doc_navigation_color'],
1904 'capability' => 'edit_theme_options',
1905 'transport' => 'postMessage',
1906 'sanitize_callback' => [$this->sanitizer, 'rgba']
1907 ] );
1908
1909 $this->customizer->add_control(
1910 new AlphaColorControl(
1911 $this->customizer,
1912 'betterdocs_single_doc_navigation_color',
1913 [
1914 'label' => __( 'Navigation Color', 'betterdocs' ),
1915 'priority' => 177,
1916 'section' => 'betterdocs_single_docs_settings',
1917 'settings' => 'betterdocs_single_doc_navigation_color'
1918 ]
1919 )
1920 );
1921 }
1922
1923 public function single_doc_navigation_font_size() {
1924 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_font_size', [
1925 'default' => $this->defaults['betterdocs_single_doc_navigation_font_size'],
1926 'capability' => 'edit_theme_options',
1927 'transport' => 'postMessage',
1928 'sanitize_callback' => [$this->sanitizer, 'integer']
1929
1930 ] );
1931
1932 $this->customizer->add_control( new RangeValueControl(
1933 $this->customizer, 'betterdocs_single_doc_navigation_font_size', [
1934 'type' => 'betterdocs-range-value',
1935 'section' => 'betterdocs_single_docs_settings',
1936 'settings' => 'betterdocs_single_doc_navigation_font_size',
1937 'label' => __( 'Navigation Font Size', 'betterdocs' ),
1938 'priority' => 178,
1939 'input_attrs' => [
1940 'class' => '',
1941 'min' => 0,
1942 'max' => 50,
1943 'step' => 1,
1944 'suffix' => 'px' //optional suffix
1945 ]
1946 ] )
1947 );
1948 }
1949
1950 public function single_doc_navigation_hover_color() {
1951 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_hover_color', [
1952 'default' => $this->defaults['betterdocs_single_doc_navigation_hover_color'],
1953 'capability' => 'edit_theme_options',
1954 'sanitize_callback' => [$this->sanitizer, 'rgba']
1955 ] );
1956
1957 $this->customizer->add_control(
1958 new AlphaColorControl(
1959 $this->customizer,
1960 'betterdocs_single_doc_navigation_hover_color',
1961 [
1962 'label' => __( 'Navigation Hover Color', 'betterdocs' ),
1963 'priority' => 179,
1964 'section' => 'betterdocs_single_docs_settings',
1965 'settings' => 'betterdocs_single_doc_navigation_hover_color'
1966 ]
1967 )
1968 );
1969 }
1970
1971 public function single_doc_navigation_arrow_color() {
1972 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_color', [
1973 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_color'],
1974 'capability' => 'edit_theme_options',
1975 'transport' => 'postMessage',
1976 'sanitize_callback' => [$this->sanitizer, 'rgba']
1977 ] );
1978
1979 $this->customizer->add_control(
1980 new AlphaColorControl(
1981 $this->customizer,
1982 'betterdocs_single_doc_navigation_arrow_color',
1983 [
1984 'label' => __( 'Navigation Arrow Color', 'betterdocs' ),
1985 'priority' => 180,
1986 'section' => 'betterdocs_single_docs_settings',
1987 'settings' => 'betterdocs_single_doc_navigation_arrow_color'
1988 ]
1989 )
1990 );
1991 }
1992
1993 public function single_doc_navigation_arrow_font_size() {
1994 $this->customizer->add_setting( 'betterdocs_single_doc_navigation_arrow_font_size', [
1995 'default' => $this->defaults['betterdocs_single_doc_navigation_arrow_font_size'],
1996 'capability' => 'edit_theme_options',
1997 'transport' => 'postMessage',
1998 'sanitize_callback' => [$this->sanitizer, 'integer']
1999
2000 ] );
2001
2002 $this->customizer->add_control( new RangeValueControl(
2003 $this->customizer, 'betterdocs_single_doc_navigation_arrow_font_size', [
2004 'type' => 'betterdocs-range-value',
2005 'section' => 'betterdocs_single_docs_settings',
2006 'settings' => 'betterdocs_single_doc_navigation_arrow_font_size',
2007 'label' => __( 'Navigation Arrow Font Size', 'betterdocs' ),
2008 'priority' => 181,
2009 'input_attrs' => [
2010 'class' => '',
2011 'min' => 0,
2012 'max' => 50,
2013 'step' => 1,
2014 'suffix' => 'px' //optional suffix
2015 ]
2016 ] )
2017 );
2018 }
2019
2020 public function betterdocs_single_doc_lu_time_color() {
2021 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_color', [
2022 'default' => $this->defaults['betterdocs_single_doc_lu_time_color'],
2023 'capability' => 'edit_theme_options',
2024 'transport' => 'postMessage',
2025 'sanitize_callback' => [$this->sanitizer, 'rgba']
2026 ] );
2027
2028 $this->customizer->add_control(
2029 new AlphaColorControl(
2030 $this->customizer,
2031 'betterdocs_single_doc_lu_time_color',
2032 [
2033 'label' => __( 'Last Updated Time Color', 'betterdocs' ),
2034 'priority' => 182,
2035 'section' => 'betterdocs_single_docs_settings',
2036 'settings' => 'betterdocs_single_doc_lu_time_color'
2037 ]
2038 )
2039 );
2040 }
2041
2042 public function single_doc_lu_time_font_size() {
2043 $this->customizer->add_setting( 'betterdocs_single_doc_lu_time_font_size', [
2044 'default' => $this->defaults['betterdocs_single_doc_lu_time_font_size'],
2045 'capability' => 'edit_theme_options',
2046 'transport' => 'postMessage',
2047 'sanitize_callback' => [$this->sanitizer, 'integer']
2048
2049 ] );
2050
2051 $this->customizer->add_control( new RangeValueControl(
2052 $this->customizer, 'betterdocs_single_doc_lu_time_font_size', [
2053 'type' => 'betterdocs-range-value',
2054 'section' => 'betterdocs_single_docs_settings',
2055 'settings' => 'betterdocs_single_doc_lu_time_font_size',
2056 'label' => __( 'Last Updated Time Font Size', 'betterdocs' ),
2057 'priority' => 183,
2058 'input_attrs' => [
2059 'class' => '',
2060 'min' => 0,
2061 'max' => 50,
2062 'step' => 1,
2063 'suffix' => 'px' //optional suffix
2064 ]
2065 ] )
2066 );
2067 }
2068
2069 public function single_doc_powered_by_color() {
2070 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_color', [
2071 'default' => $this->defaults['betterdocs_single_doc_powered_by_color'],
2072 'capability' => 'edit_theme_options',
2073 'transport' => 'postMessage',
2074 'sanitize_callback' => [$this->sanitizer, 'rgba']
2075 ] );
2076
2077 $this->customizer->add_control(
2078 new AlphaColorControl(
2079 $this->customizer,
2080 'betterdocs_single_doc_powered_by_color',
2081 [
2082 'label' => __( 'Powered by Color', 'betterdocs' ),
2083 'priority' => 184,
2084 'section' => 'betterdocs_single_docs_settings',
2085 'settings' => 'betterdocs_single_doc_powered_by_color'
2086 ]
2087 )
2088 );
2089 }
2090
2091 public function single_doc_powered_by_font_size() {
2092 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_font_size', [
2093 'default' => $this->defaults['betterdocs_single_doc_powered_by_font_size'],
2094 'capability' => 'edit_theme_options',
2095 'transport' => 'postMessage',
2096 'sanitize_callback' => [$this->sanitizer, 'integer']
2097
2098 ] );
2099
2100 $this->customizer->add_control( new RangeValueControl(
2101 $this->customizer, 'betterdocs_single_doc_powered_by_font_size', [
2102 'type' => 'betterdocs-range-value',
2103 'section' => 'betterdocs_single_docs_settings',
2104 'settings' => 'betterdocs_single_doc_powered_by_font_size',
2105 'label' => __( 'Powered By Font Size', 'betterdocs' ),
2106 'priority' => 185,
2107 'input_attrs' => [
2108 'class' => '',
2109 'min' => 0,
2110 'max' => 50,
2111 'step' => 1,
2112 'suffix' => 'px' //optional suffix
2113 ]
2114 ] )
2115 );
2116 }
2117
2118 public function single_doc_powered_by_link_color() {
2119 $this->customizer->add_setting( 'betterdocs_single_doc_powered_by_link_color', [
2120 'default' => $this->defaults['betterdocs_single_doc_powered_by_link_color'],
2121 'capability' => 'edit_theme_options',
2122 'transport' => 'postMessage',
2123 'sanitize_callback' => [$this->sanitizer, 'rgba']
2124 ] );
2125
2126 $this->customizer->add_control(
2127 new AlphaColorControl(
2128 $this->customizer,
2129 'betterdocs_single_doc_powered_by_link_color',
2130 [
2131 'label' => __( 'Powered By Link Color', 'betterdocs' ),
2132 'priority' => 186,
2133 'section' => 'betterdocs_single_docs_settings',
2134 'settings' => 'betterdocs_single_doc_powered_by_link_color'
2135 ]
2136 )
2137 );
2138 }
2139
2140 public function reactions_title() {
2141 $this->customizer->add_setting( 'betterdocs_reactions_title', [
2142 'default' => '',
2143 'sanitize_callback' => 'esc_html'
2144 ] );
2145
2146 $this->customizer->add_control( new SeparatorControl(
2147 $this->customizer, 'betterdocs_reactions_title', [
2148 'label' => __( 'Reactions', 'betterdocs' ),
2149 'priority' => 159,
2150 'settings' => 'betterdocs_reactions_title',
2151 'section' => 'betterdocs_single_docs_settings'
2152 ] )
2153 );
2154 }
2155
2156 public function post_reactions() {
2157 $this->customizer->add_setting( 'betterdocs_post_reactions', [
2158 'default' => $this->defaults['betterdocs_post_reactions'],
2159 'capability' => 'edit_theme_options',
2160 'sanitize_callback' => [$this->sanitizer, 'checkbox']
2161 ] );
2162
2163 $this->customizer->add_control( new ToggleControl(
2164 $this->customizer, 'betterdocs_post_reactions', [
2165 'label' => __( 'Enable Reactions?', 'betterdocs' ),
2166 'priority' => 160,
2167 'section' => 'betterdocs_single_docs_settings',
2168 'settings' => 'betterdocs_post_reactions',
2169 'type' => 'light' // light, ios, flat
2170 ] )
2171 );
2172 }
2173
2174 public function post_reactions_text() {
2175 $this->customizer->add_setting( 'betterdocs_post_reactions_text', [
2176 'default' => $this->defaults['betterdocs_post_reactions_text'],
2177 'capability' => 'edit_theme_options',
2178 'sanitize_callback' => 'esc_html'
2179 ] );
2180
2181 $this->customizer->add_control(
2182 new SelectControl(
2183 $this->customizer,
2184 'betterdocs_post_reactions_text',
2185 [
2186 'label' => __( 'Reactions Title', 'betterdocs' ),
2187 'priority' => 161,
2188 'section' => 'betterdocs_single_docs_settings',
2189 'settings' => 'betterdocs_post_reactions_text',
2190 'type' => 'text'
2191 ]
2192 )
2193 );
2194 }
2195
2196 public function post_reactions_text_color() {
2197 $this->customizer->add_setting( 'betterdocs_post_reactions_text_color', [
2198 'default' => $this->defaults['betterdocs_post_reactions_text_color'],
2199 'capability' => 'edit_theme_options',
2200 'transport' => 'postMessage',
2201 'sanitize_callback' => [$this->sanitizer, 'rgba']
2202 ] );
2203
2204 $this->customizer->add_control(
2205 new AlphaColorControl(
2206 $this->customizer,
2207 'betterdocs_post_reactions_text_color',
2208 [
2209 'label' => __( 'Reactions Text Color', 'betterdocs' ),
2210 'priority' => 162,
2211 'section' => 'betterdocs_single_docs_settings',
2212 'settings' => 'betterdocs_post_reactions_text_color'
2213 ]
2214 )
2215 );
2216 }
2217
2218 public function post_reactions_icon_color() {
2219 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_color', [
2220 'default' => $this->defaults['betterdocs_post_reactions_icon_color'],
2221 'capability' => 'edit_theme_options',
2222 'transport' => 'postMessage',
2223 'sanitize_callback' => [$this->sanitizer, 'rgba']
2224 ] );
2225
2226 $this->customizer->add_control(
2227 new AlphaColorControl(
2228 $this->customizer,
2229 'betterdocs_post_reactions_icon_color',
2230 [
2231 'label' => __( 'Reactions Icon Background Color', 'betterdocs' ),
2232 'priority' => 163,
2233 'section' => 'betterdocs_single_docs_settings',
2234 'settings' => 'betterdocs_post_reactions_icon_color'
2235 ]
2236 )
2237 );
2238 }
2239
2240 public function post_reactions_icon_svg_color() {
2241 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_svg_color', [
2242 'default' => $this->defaults['betterdocs_post_reactions_icon_svg_color'],
2243 'capability' => 'edit_theme_options',
2244 'transport' => 'postMessage',
2245 'sanitize_callback' => [$this->sanitizer, 'rgba']
2246 ] );
2247
2248 $this->customizer->add_control(
2249 new AlphaColorControl(
2250 $this->customizer,
2251 'betterdocs_post_reactions_icon_svg_color',
2252 [
2253 'label' => __( 'Reactions Icon Color', 'betterdocs' ),
2254 'priority' => 163,
2255 'section' => 'betterdocs_single_docs_settings',
2256 'settings' => 'betterdocs_post_reactions_icon_svg_color'
2257 ]
2258 )
2259 );
2260 }
2261
2262 public function post_reactions_icon_hover_bg_color() {
2263 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_bg_color', [
2264 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_bg_color'],
2265 'capability' => 'edit_theme_options',
2266 'sanitize_callback' => [$this->sanitizer, 'rgba']
2267 ] );
2268
2269 $this->customizer->add_control(
2270 new AlphaColorControl(
2271 $this->customizer,
2272 'betterdocs_post_reactions_icon_hover_bg_color',
2273 [
2274 'label' => __( 'Reactions Icon Hover Background Color', 'betterdocs' ),
2275 'priority' => 163,
2276 'section' => 'betterdocs_single_docs_settings',
2277 'settings' => 'betterdocs_post_reactions_icon_hover_bg_color'
2278 ]
2279 )
2280 );
2281 }
2282
2283 public function post_reactions_icon_hover_svg_color() {
2284 $this->customizer->add_setting( 'betterdocs_post_reactions_icon_hover_svg_color', [
2285 'default' => $this->defaults['betterdocs_post_reactions_icon_hover_svg_color'],
2286 'capability' => 'edit_theme_options',
2287 'sanitize_callback' => [$this->sanitizer, 'rgba']
2288 ] );
2289
2290 $this->customizer->add_control(
2291 new AlphaColorControl(
2292 $this->customizer,
2293 'betterdocs_post_reactions_icon_hover_svg_color',
2294 [
2295 'label' => __( 'Reactions Icon Hover Color', 'betterdocs' ),
2296 'priority' => 163,
2297 'section' => 'betterdocs_single_docs_settings',
2298 'settings' => 'betterdocs_post_reactions_icon_hover_svg_color'
2299 ]
2300 )
2301 );
2302 }
2303
2304 public function attachments_heading() {
2305 $this->customizer->add_setting( 'betterdocs_single_doc_attachment_heading', [
2306 'default' => '',
2307 'sanitize_callback' => 'esc_html'
2308 ] );
2309
2310 $this->customizer->add_control( new SeparatorControl(
2311 $this->customizer, 'betterdocs_single_doc_attachment_heading', [
2312 'label' => __( 'Attachments', 'betterdocs' ),
2313 'priority' => 163,
2314 'settings' => 'betterdocs_single_doc_attachment_heading',
2315 'section' => 'betterdocs_single_docs_settings'
2316 ] )
2317 );
2318 }
2319
2320 public function betterdocs_doc_single_attachment_content_bg_color() {
2321 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_bg_color', [
2322 'default' => $this->defaults['betterdocs_doc_single_attachment_content_bg_color'],
2323 'capability' => 'edit_theme_options',
2324 'transport' => 'postMessage',
2325 'sanitize_callback' => [$this->sanitizer, 'rgba']
2326 ] );
2327
2328 $this->customizer->add_control(
2329 new AlphaColorControl(
2330 $this->customizer,
2331 'betterdocs_doc_single_attachment_content_bg_color',
2332 [
2333 'label' => __( 'Content Background Color', 'betterdocs' ),
2334 'section' => 'betterdocs_single_docs_settings',
2335 'settings' => 'betterdocs_doc_single_attachment_content_bg_color',
2336 'priority' => 163
2337 ]
2338 )
2339 );
2340 }
2341
2342 public function betterdocs_doc_single_attachment_content_padding() {
2343 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding', [
2344 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding'],
2345 'capability' => 'edit_theme_options',
2346 'transport' => 'postMessage',
2347 'sanitize_callback' => [$this->sanitizer, 'integer']
2348
2349 ] );
2350
2351 $this->customizer->add_control( new TitleControl(
2352 $this->customizer, 'betterdocs_doc_single_attachment_content_padding', [
2353 'type' => 'betterdocs-title',
2354 'section' => 'betterdocs_single_docs_settings',
2355 'settings' => 'betterdocs_doc_single_attachment_content_padding',
2356 'label' => __( 'Content Padding', 'betterdocs' ),
2357 'priority' => 163,
2358 'input_attrs' => [
2359 'id' => 'betterdocs_doc_single_attachment_content_padding',
2360 'class' => 'betterdocs-dimension'
2361 ]
2362 ] )
2363 );
2364
2365 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_top', [
2366 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_top'],
2367 'capability' => 'edit_theme_options',
2368 'transport' => 'postMessage',
2369 'sanitize_callback' => [$this->sanitizer, 'integer']
2370 ] );
2371
2372 $this->customizer->add_control( new DimensionControl(
2373 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_top', [
2374 'type' => 'betterdocs-dimension',
2375 'section' => 'betterdocs_single_docs_settings',
2376 'settings' => 'betterdocs_doc_single_attachment_content_padding_top',
2377 'label' => __( 'Top', 'betterdocs' ),
2378 'priority' => 163,
2379 'input_attrs' => [
2380 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2381 ]
2382 ] )
2383 );
2384
2385 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_right', [
2386 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_right'],
2387 'capability' => 'edit_theme_options',
2388 'transport' => 'postMessage',
2389 'sanitize_callback' => [$this->sanitizer, 'integer']
2390
2391 ] );
2392
2393 $this->customizer->add_control( new DimensionControl(
2394 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_right', [
2395 'type' => 'betterdocs-dimension',
2396 'section' => 'betterdocs_single_docs_settings',
2397 'settings' => 'betterdocs_doc_single_attachment_content_padding_right',
2398 'label' => __( 'Right', 'betterdocs' ),
2399 'priority' => 163,
2400 'input_attrs' => [
2401 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2402 ]
2403 ] )
2404 );
2405
2406 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_bottom', [
2407 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_bottom'],
2408 'capability' => 'edit_theme_options',
2409 'transport' => 'postMessage',
2410 'sanitize_callback' => [$this->sanitizer, 'integer']
2411
2412 ] );
2413
2414 $this->customizer->add_control( new DimensionControl(
2415 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_bottom', [
2416 'type' => 'betterdocs-dimension',
2417 'section' => 'betterdocs_single_docs_settings',
2418 'settings' => 'betterdocs_doc_single_attachment_content_padding_bottom',
2419 'label' => __( 'Bottom', 'betterdocs' ),
2420 'priority' => 163,
2421 'input_attrs' => [
2422 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2423 ]
2424 ] )
2425 );
2426
2427 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_padding_left', [
2428 'default' => $this->defaults['betterdocs_doc_single_attachment_content_padding_left'],
2429 'capability' => 'edit_theme_options',
2430 'transport' => 'postMessage',
2431 'sanitize_callback' => [$this->sanitizer, 'integer']
2432
2433 ] );
2434
2435 $this->customizer->add_control( new DimensionControl(
2436 $this->customizer, 'betterdocs_doc_single_attachment_content_padding_left', [
2437 'type' => 'betterdocs-dimension',
2438 'section' => 'betterdocs_single_docs_settings',
2439 'settings' => 'betterdocs_doc_single_attachment_content_padding_left',
2440 'label' => __( 'Left', 'betterdocs' ),
2441 'priority' => 163,
2442 'input_attrs' => [
2443 'class' => 'betterdocs_doc_single_attachment_content_padding betterdocs-dimension'
2444 ]
2445 ] )
2446 );
2447 }
2448
2449 public function betterdocs_doc_single_attachment_content_margin() {
2450 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin', [
2451 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin'],
2452 'capability' => 'edit_theme_options',
2453 'transport' => 'postMessage',
2454 'sanitize_callback' => [$this->sanitizer, 'integer']
2455
2456 ] );
2457
2458 $this->customizer->add_control( new TitleControl(
2459 $this->customizer, 'betterdocs_doc_single_attachment_content_margin', [
2460 'type' => 'betterdocs-title',
2461 'section' => 'betterdocs_single_docs_settings',
2462 'settings' => 'betterdocs_doc_single_attachment_content_margin',
2463 'label' => __( 'Content Margin', 'betterdocs' ),
2464 'priority' => 163,
2465 'input_attrs' => [
2466 'id' => 'betterdocs_doc_single_attachment_content_margin',
2467 'class' => 'betterdocs-dimension'
2468 ]
2469 ] )
2470 );
2471
2472 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_top', [
2473 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_top'],
2474 'capability' => 'edit_theme_options',
2475 'transport' => 'postMessage',
2476 'sanitize_callback' => [$this->sanitizer, 'integer']
2477 ] );
2478
2479 $this->customizer->add_control( new DimensionControl(
2480 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_top', [
2481 'type' => 'betterdocs-dimension',
2482 'section' => 'betterdocs_single_docs_settings',
2483 'settings' => 'betterdocs_doc_single_attachment_content_margin_top',
2484 'label' => __( 'Top', 'betterdocs' ),
2485 'priority' => 163,
2486 'input_attrs' => [
2487 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2488 ]
2489 ] )
2490 );
2491
2492 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_right', [
2493 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_right'],
2494 'capability' => 'edit_theme_options',
2495 'transport' => 'postMessage',
2496 'sanitize_callback' => [$this->sanitizer, 'integer']
2497
2498 ] );
2499
2500 $this->customizer->add_control( new DimensionControl(
2501 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_right', [
2502 'type' => 'betterdocs-dimension',
2503 'section' => 'betterdocs_single_docs_settings',
2504 'settings' => 'betterdocs_doc_single_attachment_content_margin_right',
2505 'label' => __( 'Right', 'betterdocs' ),
2506 'priority' => 163,
2507 'input_attrs' => [
2508 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2509 ]
2510 ] )
2511 );
2512
2513 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_bottom', [
2514 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_bottom'],
2515 'capability' => 'edit_theme_options',
2516 'transport' => 'postMessage',
2517 'sanitize_callback' => [$this->sanitizer, 'integer']
2518
2519 ] );
2520
2521 $this->customizer->add_control( new DimensionControl(
2522 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_bottom', [
2523 'type' => 'betterdocs-dimension',
2524 'section' => 'betterdocs_single_docs_settings',
2525 'settings' => 'betterdocs_doc_single_attachment_content_margin_bottom',
2526 'label' => __( 'Bottom', 'betterdocs' ),
2527 'priority' => 163,
2528 'input_attrs' => [
2529 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2530 ]
2531 ] )
2532 );
2533
2534 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_content_margin_left', [
2535 'default' => $this->defaults['betterdocs_doc_single_attachment_content_margin_left'],
2536 'capability' => 'edit_theme_options',
2537 'transport' => 'postMessage',
2538 'sanitize_callback' => [$this->sanitizer, 'integer']
2539
2540 ] );
2541
2542 $this->customizer->add_control( new DimensionControl(
2543 $this->customizer, 'betterdocs_doc_single_attachment_content_margin_left', [
2544 'type' => 'betterdocs-dimension',
2545 'section' => 'betterdocs_single_docs_settings',
2546 'settings' => 'betterdocs_doc_single_attachment_content_margin_left',
2547 'label' => __( 'Left', 'betterdocs' ),
2548 'priority' => 163,
2549 'input_attrs' => [
2550 'class' => 'betterdocs_doc_single_attachment_content_margin betterdocs-dimension'
2551 ]
2552 ] )
2553 );
2554 }
2555
2556 public function betterdocs_doc_single_attachment_label_color() {
2557 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_color', [
2558 'default' => $this->defaults['betterdocs_doc_single_attachment_label_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 'betterdocs_doc_single_attachment_label_color',
2568 [
2569 'label' => __( 'Label Color', 'betterdocs' ),
2570 'section' => 'betterdocs_single_docs_settings',
2571 'settings' => 'betterdocs_doc_single_attachment_label_color',
2572 'priority' => 163
2573 ]
2574 )
2575 );
2576 }
2577
2578 public function betterdocs_doc_single_attachment_label_padding() {
2579 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding', [
2580 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding'],
2581 'capability' => 'edit_theme_options',
2582 'transport' => 'postMessage',
2583 'sanitize_callback' => [$this->sanitizer, 'integer']
2584
2585 ] );
2586
2587 $this->customizer->add_control( new TitleControl(
2588 $this->customizer, 'betterdocs_doc_single_attachment_label_padding', [
2589 'type' => 'betterdocs-title',
2590 'section' => 'betterdocs_single_docs_settings',
2591 'settings' => 'betterdocs_doc_single_attachment_label_padding',
2592 'label' => __( 'Label Padding', 'betterdocs' ),
2593 'priority' => 163,
2594 'input_attrs' => [
2595 'id' => 'betterdocs_doc_single_attachment_label_padding',
2596 'class' => 'betterdocs-dimension'
2597 ]
2598 ] )
2599 );
2600
2601 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_top', [
2602 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_top'],
2603 'capability' => 'edit_theme_options',
2604 'transport' => 'postMessage',
2605 'sanitize_callback' => [$this->sanitizer, 'integer']
2606 ] );
2607
2608 $this->customizer->add_control( new DimensionControl(
2609 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_top', [
2610 'type' => 'betterdocs-dimension',
2611 'section' => 'betterdocs_single_docs_settings',
2612 'settings' => 'betterdocs_doc_single_attachment_label_padding_top',
2613 'label' => __( 'Top', 'betterdocs' ),
2614 'priority' => 163,
2615 'input_attrs' => [
2616 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2617 ]
2618 ] )
2619 );
2620
2621 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_right', [
2622 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_right'],
2623 'capability' => 'edit_theme_options',
2624 'transport' => 'postMessage',
2625 'sanitize_callback' => [$this->sanitizer, 'integer']
2626
2627 ] );
2628
2629 $this->customizer->add_control( new DimensionControl(
2630 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_right', [
2631 'type' => 'betterdocs-dimension',
2632 'section' => 'betterdocs_single_docs_settings',
2633 'settings' => 'betterdocs_doc_single_attachment_label_padding_right',
2634 'label' => __( 'Right', 'betterdocs' ),
2635 'priority' => 163,
2636 'input_attrs' => [
2637 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2638 ]
2639 ] )
2640 );
2641
2642 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_bottom', [
2643 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_bottom'],
2644 'capability' => 'edit_theme_options',
2645 'transport' => 'postMessage',
2646 'sanitize_callback' => [$this->sanitizer, 'integer']
2647
2648 ] );
2649
2650 $this->customizer->add_control( new DimensionControl(
2651 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_bottom', [
2652 'type' => 'betterdocs-dimension',
2653 'section' => 'betterdocs_single_docs_settings',
2654 'settings' => 'betterdocs_doc_single_attachment_label_padding_bottom',
2655 'label' => __( 'Bottom', 'betterdocs' ),
2656 'priority' => 163,
2657 'input_attrs' => [
2658 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2659 ]
2660 ] )
2661 );
2662
2663 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_padding_left', [
2664 'default' => $this->defaults['betterdocs_doc_single_attachment_label_padding_left'],
2665 'capability' => 'edit_theme_options',
2666 'transport' => 'postMessage',
2667 'sanitize_callback' => [$this->sanitizer, 'integer']
2668
2669 ] );
2670
2671 $this->customizer->add_control( new DimensionControl(
2672 $this->customizer, 'betterdocs_doc_single_attachment_label_padding_left', [
2673 'type' => 'betterdocs-dimension',
2674 'section' => 'betterdocs_single_docs_settings',
2675 'settings' => 'betterdocs_doc_single_attachment_label_padding_left',
2676 'label' => __( 'Left', 'betterdocs' ),
2677 'priority' => 163,
2678 'input_attrs' => [
2679 'class' => 'betterdocs_doc_single_attachment_label_padding betterdocs-dimension'
2680 ]
2681 ] )
2682 );
2683 }
2684
2685 public function betterdocs_doc_single_attachment_label_margin() {
2686 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin', [
2687 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin'],
2688 'capability' => 'edit_theme_options',
2689 'transport' => 'postMessage',
2690 'sanitize_callback' => [$this->sanitizer, 'integer']
2691
2692 ] );
2693
2694 $this->customizer->add_control( new TitleControl(
2695 $this->customizer, 'betterdocs_doc_single_attachment_label_margin', [
2696 'type' => 'betterdocs-title',
2697 'section' => 'betterdocs_single_docs_settings',
2698 'settings' => 'betterdocs_doc_single_attachment_label_margin',
2699 'label' => __( 'Label Margin', 'betterdocs' ),
2700 'priority' => 163,
2701 'input_attrs' => [
2702 'id' => 'betterdocs_doc_single_attachment_label_margin',
2703 'class' => 'betterdocs-dimension'
2704 ]
2705 ] )
2706 );
2707
2708 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_top', [
2709 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_top'],
2710 'capability' => 'edit_theme_options',
2711 'transport' => 'postMessage',
2712 'sanitize_callback' => [$this->sanitizer, 'integer']
2713 ] );
2714
2715 $this->customizer->add_control( new DimensionControl(
2716 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_top', [
2717 'type' => 'betterdocs-dimension',
2718 'section' => 'betterdocs_single_docs_settings',
2719 'settings' => 'betterdocs_doc_single_attachment_label_margin_top',
2720 'label' => __( 'Top', 'betterdocs' ),
2721 'priority' => 163,
2722 'input_attrs' => [
2723 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
2724 ]
2725 ] )
2726 );
2727
2728 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_right', [
2729 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_right'],
2730 'capability' => 'edit_theme_options',
2731 'transport' => 'postMessage',
2732 'sanitize_callback' => [$this->sanitizer, 'integer']
2733
2734 ] );
2735
2736 $this->customizer->add_control( new DimensionControl(
2737 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_right', [
2738 'type' => 'betterdocs-dimension',
2739 'section' => 'betterdocs_single_docs_settings',
2740 'settings' => 'betterdocs_doc_single_attachment_label_margin_right',
2741 'label' => __( 'Right', 'betterdocs' ),
2742 'priority' => 163,
2743 'input_attrs' => [
2744 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
2745 ]
2746 ] )
2747 );
2748
2749 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_bottom', [
2750 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_bottom'],
2751 'capability' => 'edit_theme_options',
2752 'transport' => 'postMessage',
2753 'sanitize_callback' => [$this->sanitizer, 'integer']
2754 ] );
2755
2756 $this->customizer->add_control( new DimensionControl(
2757 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_bottom', [
2758 'type' => 'betterdocs-dimension',
2759 'section' => 'betterdocs_single_docs_settings',
2760 'settings' => 'betterdocs_doc_single_attachment_label_margin_bottom',
2761 'label' => __( 'Bottom', 'betterdocs' ),
2762 'priority' => 163,
2763 'input_attrs' => [
2764 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
2765 ]
2766 ] )
2767 );
2768
2769 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_label_margin_left', [
2770 'default' => $this->defaults['betterdocs_doc_single_attachment_label_margin_left'],
2771 'capability' => 'edit_theme_options',
2772 'transport' => 'postMessage',
2773 'sanitize_callback' => [$this->sanitizer, 'integer']
2774 ] );
2775
2776 $this->customizer->add_control( new DimensionControl(
2777 $this->customizer, 'betterdocs_doc_single_attachment_label_margin_left', [
2778 'type' => 'betterdocs-dimension',
2779 'section' => 'betterdocs_single_docs_settings',
2780 'settings' => 'betterdocs_doc_single_attachment_label_margin_left',
2781 'label' => __( 'Left', 'betterdocs' ),
2782 'priority' => 163,
2783 'input_attrs' => [
2784 'class' => 'betterdocs_doc_single_attachment_label_margin betterdocs-dimension'
2785 ]
2786 ] )
2787 );
2788 }
2789
2790 public function betterdocs_doc_single_attachment_list_font_size() {
2791 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_font_size', [
2792 'default' => $this->defaults['betterdocs_doc_single_attachment_list_font_size'],
2793 'capability' => 'edit_theme_options',
2794 'transport' => 'postMessage',
2795 'sanitize_callback' => [$this->sanitizer, 'integer']
2796
2797 ] );
2798
2799 $this->customizer->add_control( new RangeValueControl(
2800 $this->customizer, 'betterdocs_doc_single_attachment_list_font_size', [
2801 'type' => 'betterdocs-range-value',
2802 'section' => 'betterdocs_single_docs_settings',
2803 'settings' => 'betterdocs_doc_single_attachment_list_font_size',
2804 'label' => __( 'List Font Size', 'betterdocs' ),
2805 'priority' => 163,
2806 'input_attrs' => [
2807 'min' => 0,
2808 'max' => 50,
2809 'step' => 1,
2810 'suffix' => 'px' //optional suffix
2811 ]
2812 ] )
2813 );
2814 }
2815
2816 public function betterdocs_doc_single_attachment_list_font_weight() {
2817 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_font_weight', [
2818 'default' => $this->defaults['betterdocs_doc_single_attachment_list_font_weight'],
2819 'capability' => 'edit_theme_options',
2820 'sanitize_callback' => [$this->sanitizer, 'choices']
2821 ] );
2822
2823 $this->customizer->add_control(
2824 new WP_Customize_Control(
2825 $this->customizer,
2826 'betterdocs_doc_single_attachment_list_font_weight',
2827 [
2828 'label' => __( 'List Font Weight', 'betterdocs-pro' ),
2829 'section' => 'betterdocs_single_docs_settings',
2830 'settings' => 'betterdocs_doc_single_attachment_list_font_weight',
2831 'type' => 'select',
2832 'choices' => [
2833 'normal' => 'Normal',
2834 '100' => '100',
2835 '200' => '200',
2836 '300' => '300',
2837 '400' => '400',
2838 '500' => '500',
2839 '600' => '600',
2840 '700' => '700',
2841 '800' => '800',
2842 '900' => '900'
2843 ],
2844 'priority' => 163
2845 ]
2846 )
2847 );
2848 }
2849
2850 public function betterdocs_doc_single_attachment_list_extension_color() {
2851 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_color', [
2852 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_color'],
2853 'capability' => 'edit_theme_options',
2854 'transport' => 'postMessage',
2855 'sanitize_callback' => [$this->sanitizer, 'rgba']
2856 ] );
2857
2858 $this->customizer->add_control(
2859 new AlphaColorControl(
2860 $this->customizer,
2861 'betterdocs_doc_single_attachment_list_extension_color',
2862 [
2863 'label' => __( 'Extension Color', 'betterdocs' ),
2864 'section' => 'betterdocs_single_docs_settings',
2865 'settings' => 'betterdocs_doc_single_attachment_list_extension_color',
2866 'priority' => 163
2867 ]
2868 )
2869 );
2870 }
2871 public function betterdocs_doc_single_attachment_list_extension_font_size() {
2872 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_font_size', [
2873 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_font_size'],
2874 'capability' => 'edit_theme_options',
2875 'transport' => 'postMessage',
2876 'sanitize_callback' => [$this->sanitizer, 'integer']
2877
2878 ] );
2879
2880 $this->customizer->add_control( new RangeValueControl(
2881 $this->customizer, 'betterdocs_doc_single_attachment_list_extension_font_size', [
2882 'type' => 'betterdocs-range-value',
2883 'section' => 'betterdocs_single_docs_settings',
2884 'settings' => 'betterdocs_doc_single_attachment_list_extension_font_size',
2885 'label' => __( 'Extension Font Size', 'betterdocs' ),
2886 'priority' => 163,
2887 'input_attrs' => [
2888 'min' => 0,
2889 'max' => 50,
2890 'step' => 1,
2891 'suffix' => 'px' //optional suffix
2892 ]
2893 ] )
2894 );
2895 }
2896
2897 public function betterdocs_doc_single_attachment_list_extension_font_weight() {
2898 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_extension_font_weight', [
2899 'default' => $this->defaults['betterdocs_doc_single_attachment_list_extension_font_weight'],
2900 'capability' => 'edit_theme_options',
2901 'sanitize_callback' => [$this->sanitizer, 'choices']
2902 ] );
2903
2904 $this->customizer->add_control(
2905 new WP_Customize_Control(
2906 $this->customizer,
2907 'betterdocs_doc_single_attachment_list_extension_font_weight',
2908 [
2909 'label' => __( 'Extension Font Weight', 'betterdocs-pro' ),
2910 'section' => 'betterdocs_single_docs_settings',
2911 'settings' => 'betterdocs_doc_single_attachment_list_extension_font_weight',
2912 'type' => 'select',
2913 'choices' => [
2914 'normal' => 'Normal',
2915 '100' => '100',
2916 '200' => '200',
2917 '300' => '300',
2918 '400' => '400',
2919 '500' => '500',
2920 '600' => '600',
2921 '700' => '700',
2922 '800' => '800',
2923 '900' => '900'
2924 ],
2925 'priority' => 163
2926 ]
2927 )
2928 );
2929 }
2930
2931 public function betterdocs_doc_single_attachment_list_color() {
2932 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_color', [
2933 'default' => $this->defaults['betterdocs_doc_single_attachment_list_color'],
2934 'capability' => 'edit_theme_options',
2935 'transport' => 'postMessage',
2936 'sanitize_callback' => [$this->sanitizer, 'rgba']
2937 ] );
2938
2939 $this->customizer->add_control(
2940 new AlphaColorControl(
2941 $this->customizer,
2942 'betterdocs_doc_single_attachment_list_color',
2943 [
2944 'label' => __( 'List Color', 'betterdocs' ),
2945 'section' => 'betterdocs_single_docs_settings',
2946 'settings' => 'betterdocs_doc_single_attachment_list_color',
2947 'priority' => 163
2948 ]
2949 )
2950 );
2951 }
2952
2953 public function betterdocs_doc_single_attachment_list_background_color() {
2954 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_background_color', [
2955 'default' => $this->defaults['betterdocs_doc_single_attachment_list_background_color'],
2956 'capability' => 'edit_theme_options',
2957 'transport' => 'postMessage',
2958 'sanitize_callback' => [$this->sanitizer, 'rgba']
2959 ] );
2960
2961 $this->customizer->add_control(
2962 new AlphaColorControl(
2963 $this->customizer,
2964 'betterdocs_doc_single_attachment_list_background_color',
2965 [
2966 'label' => __( 'List Background Color', 'betterdocs' ),
2967 'section' => 'betterdocs_single_docs_settings',
2968 'settings' => 'betterdocs_doc_single_attachment_list_background_color',
2969 'priority' => 163
2970 ]
2971 )
2972 );
2973 }
2974
2975 public function betterdocs_doc_single_attachment_list_padding() {
2976 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding', [
2977 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding'],
2978 'capability' => 'edit_theme_options',
2979 'transport' => 'postMessage',
2980 'sanitize_callback' => [$this->sanitizer, 'integer']
2981
2982 ] );
2983
2984 $this->customizer->add_control( new TitleControl(
2985 $this->customizer, 'betterdocs_doc_single_attachment_list_padding', [
2986 'type' => 'betterdocs-title',
2987 'section' => 'betterdocs_single_docs_settings',
2988 'settings' => 'betterdocs_doc_single_attachment_list_padding',
2989 'label' => __( 'List Padding', 'betterdocs' ),
2990 'priority' => 163,
2991 'input_attrs' => [
2992 'id' => 'betterdocs_doc_single_attachment_list_padding',
2993 'class' => 'betterdocs-dimension'
2994 ]
2995 ] )
2996 );
2997
2998 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_top', [
2999 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_top'],
3000 'capability' => 'edit_theme_options',
3001 'transport' => 'postMessage',
3002 'sanitize_callback' => [$this->sanitizer, 'integer']
3003 ] );
3004
3005 $this->customizer->add_control( new DimensionControl(
3006 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_top', [
3007 'type' => 'betterdocs-dimension',
3008 'section' => 'betterdocs_single_docs_settings',
3009 'settings' => 'betterdocs_doc_single_attachment_list_padding_top',
3010 'label' => __( 'Top', 'betterdocs' ),
3011 'priority' => 163,
3012 'input_attrs' => [
3013 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3014 ]
3015 ] )
3016 );
3017
3018 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_right', [
3019 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_right'],
3020 'capability' => 'edit_theme_options',
3021 'transport' => 'postMessage',
3022 'sanitize_callback' => [$this->sanitizer, 'integer']
3023
3024 ] );
3025
3026 $this->customizer->add_control( new DimensionControl(
3027 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_right', [
3028 'type' => 'betterdocs-dimension',
3029 'section' => 'betterdocs_single_docs_settings',
3030 'settings' => 'betterdocs_doc_single_attachment_list_padding_right',
3031 'label' => __( 'Right', 'betterdocs' ),
3032 'priority' => 163,
3033 'input_attrs' => [
3034 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3035 ]
3036 ] )
3037 );
3038
3039 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_bottom', [
3040 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_bottom'],
3041 'capability' => 'edit_theme_options',
3042 'transport' => 'postMessage',
3043 'sanitize_callback' => [$this->sanitizer, 'integer']
3044 ] );
3045
3046 $this->customizer->add_control( new DimensionControl(
3047 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_bottom', [
3048 'type' => 'betterdocs-dimension',
3049 'section' => 'betterdocs_single_docs_settings',
3050 'settings' => 'betterdocs_doc_single_attachment_list_padding_bottom',
3051 'label' => __( 'Bottom', 'betterdocs' ),
3052 'priority' => 163,
3053 'input_attrs' => [
3054 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3055 ]
3056 ] )
3057 );
3058
3059 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_padding_left', [
3060 'default' => $this->defaults['betterdocs_doc_single_attachment_list_padding_left'],
3061 'capability' => 'edit_theme_options',
3062 'transport' => 'postMessage',
3063 'sanitize_callback' => [$this->sanitizer, 'integer']
3064 ] );
3065
3066 $this->customizer->add_control( new DimensionControl(
3067 $this->customizer, 'betterdocs_doc_single_attachment_list_padding_left', [
3068 'type' => 'betterdocs-dimension',
3069 'section' => 'betterdocs_single_docs_settings',
3070 'settings' => 'betterdocs_doc_single_attachment_list_padding_left',
3071 'label' => __( 'Left', 'betterdocs' ),
3072 'priority' => 163,
3073 'input_attrs' => [
3074 'class' => 'betterdocs_doc_single_attachment_list_padding betterdocs-dimension'
3075 ]
3076 ] )
3077 );
3078 }
3079
3080 public function betterdocs_doc_single_attachment_list_margin() {
3081 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin', [
3082 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin'],
3083 'capability' => 'edit_theme_options',
3084 'transport' => 'postMessage',
3085 'sanitize_callback' => [$this->sanitizer, 'integer']
3086
3087 ] );
3088
3089 $this->customizer->add_control( new TitleControl(
3090 $this->customizer, 'betterdocs_doc_single_attachment_list_margin', [
3091 'type' => 'betterdocs-title',
3092 'section' => 'betterdocs_single_docs_settings',
3093 'settings' => 'betterdocs_doc_single_attachment_list_margin',
3094 'label' => __( 'List Margin', 'betterdocs' ),
3095 'priority' => 163,
3096 'input_attrs' => [
3097 'id' => 'betterdocs_doc_single_attachment_list_margin',
3098 'class' => 'betterdocs-dimension'
3099 ]
3100 ] )
3101 );
3102
3103 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_top', [
3104 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_top'],
3105 'capability' => 'edit_theme_options',
3106 'transport' => 'postMessage',
3107 'sanitize_callback' => [$this->sanitizer, 'integer']
3108 ] );
3109
3110 $this->customizer->add_control( new DimensionControl(
3111 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_top', [
3112 'type' => 'betterdocs-dimension',
3113 'section' => 'betterdocs_single_docs_settings',
3114 'settings' => 'betterdocs_doc_single_attachment_list_margin_top',
3115 'label' => __( 'Top', 'betterdocs' ),
3116 'priority' => 163,
3117 'input_attrs' => [
3118 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3119 ]
3120 ] )
3121 );
3122
3123 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_right', [
3124 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_right'],
3125 'capability' => 'edit_theme_options',
3126 'transport' => 'postMessage',
3127 'sanitize_callback' => [$this->sanitizer, 'integer']
3128
3129 ] );
3130
3131 $this->customizer->add_control( new DimensionControl(
3132 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_right', [
3133 'type' => 'betterdocs-dimension',
3134 'section' => 'betterdocs_single_docs_settings',
3135 'settings' => 'betterdocs_doc_single_attachment_list_margin_right',
3136 'label' => __( 'Right', 'betterdocs' ),
3137 'priority' => 163,
3138 'input_attrs' => [
3139 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3140 ]
3141 ] )
3142 );
3143
3144 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_bottom', [
3145 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_bottom'],
3146 'capability' => 'edit_theme_options',
3147 'transport' => 'postMessage',
3148 'sanitize_callback' => [$this->sanitizer, 'integer']
3149 ] );
3150
3151 $this->customizer->add_control( new DimensionControl(
3152 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_bottom', [
3153 'type' => 'betterdocs-dimension',
3154 'section' => 'betterdocs_single_docs_settings',
3155 'settings' => 'betterdocs_doc_single_attachment_list_margin_bottom',
3156 'label' => __( 'Bottom', 'betterdocs' ),
3157 'priority' => 163,
3158 'input_attrs' => [
3159 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3160 ]
3161 ] )
3162 );
3163
3164 $this->customizer->add_setting( 'betterdocs_doc_single_attachment_list_margin_left', [
3165 'default' => $this->defaults['betterdocs_doc_single_attachment_list_margin_left'],
3166 'capability' => 'edit_theme_options',
3167 'transport' => 'postMessage',
3168 'sanitize_callback' => [$this->sanitizer, 'integer']
3169 ] );
3170
3171 $this->customizer->add_control( new DimensionControl(
3172 $this->customizer, 'betterdocs_doc_single_attachment_list_margin_left', [
3173 'type' => 'betterdocs-dimension',
3174 'section' => 'betterdocs_single_docs_settings',
3175 'settings' => 'betterdocs_doc_single_attachment_list_margin_left',
3176 'label' => __( 'Left', 'betterdocs' ),
3177 'priority' => 163,
3178 'input_attrs' => [
3179 'class' => 'betterdocs_doc_single_attachment_list_margin betterdocs-dimension'
3180 ]
3181 ] )
3182 );
3183 }
3184
3185 public function betterdocs_doc_single_related_docs_heading() {
3186 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_heading', [
3187 'default' => 'betterdocs_doc_single_related_docs_heading',
3188 'sanitize_callback' => 'esc_html'
3189 ] );
3190
3191 $this->customizer->add_control( new SeparatorControl(
3192 $this->customizer, 'betterdocs_doc_single_related_docs_heading', [
3193 'label' => __( 'Related Docs', 'betterdocs' ),
3194 'priority' => 163,
3195 'settings' => 'betterdocs_doc_single_related_docs_heading',
3196 'section' => 'betterdocs_single_docs_settings'
3197 ] )
3198 );
3199 }
3200
3201 public function betterdocs_doc_single_related_docs_content_bg_color() {
3202 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_bg_color', [
3203 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_bg_color'],
3204 'capability' => 'edit_theme_options',
3205 'transport' => 'postMessage',
3206 'sanitize_callback' => [$this->sanitizer, 'rgba']
3207 ] );
3208
3209 $this->customizer->add_control(
3210 new AlphaColorControl(
3211 $this->customizer,
3212 'betterdocs_doc_single_related_docs_content_bg_color',
3213 [
3214 'label' => __( 'Content Background Color', 'betterdocs' ),
3215 'section' => 'betterdocs_single_docs_settings',
3216 'settings' => 'betterdocs_doc_single_related_docs_content_bg_color',
3217 'priority' => 163
3218 ]
3219 )
3220 );
3221 }
3222
3223 public function betterdocs_doc_single_related_docs_content_padding() {
3224 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding', [
3225 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding'],
3226 'capability' => 'edit_theme_options',
3227 'transport' => 'postMessage',
3228 'sanitize_callback' => [$this->sanitizer, 'integer']
3229
3230 ] );
3231
3232 $this->customizer->add_control( new TitleControl(
3233 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding', [
3234 'type' => 'betterdocs-title',
3235 'section' => 'betterdocs_single_docs_settings',
3236 'settings' => 'betterdocs_doc_single_related_docs_content_padding',
3237 'label' => __( 'Content Padding', 'betterdocs' ),
3238 'priority' => 163,
3239 'input_attrs' => [
3240 'id' => 'betterdocs_doc_single_related_docs_content_padding',
3241 'class' => 'betterdocs-dimension'
3242 ]
3243 ] )
3244 );
3245
3246 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_top', [
3247 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_top'],
3248 'capability' => 'edit_theme_options',
3249 'transport' => 'postMessage',
3250 'sanitize_callback' => [$this->sanitizer, 'integer']
3251 ] );
3252
3253 $this->customizer->add_control( new DimensionControl(
3254 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_top', [
3255 'type' => 'betterdocs-dimension',
3256 'section' => 'betterdocs_single_docs_settings',
3257 'settings' => 'betterdocs_doc_single_related_docs_content_padding_top',
3258 'label' => __( 'Top', 'betterdocs' ),
3259 'priority' => 163,
3260 'input_attrs' => [
3261 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3262 ]
3263 ] )
3264 );
3265
3266 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_right', [
3267 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_right'],
3268 'capability' => 'edit_theme_options',
3269 'transport' => 'postMessage',
3270 'sanitize_callback' => [$this->sanitizer, 'integer']
3271
3272 ] );
3273
3274 $this->customizer->add_control( new DimensionControl(
3275 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_right', [
3276 'type' => 'betterdocs-dimension',
3277 'section' => 'betterdocs_single_docs_settings',
3278 'settings' => 'betterdocs_doc_single_related_docs_content_padding_right',
3279 'label' => __( 'Right', 'betterdocs' ),
3280 'priority' => 163,
3281 'input_attrs' => [
3282 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3283 ]
3284 ] )
3285 );
3286
3287 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_bottom', [
3288 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_bottom'],
3289 'capability' => 'edit_theme_options',
3290 'transport' => 'postMessage',
3291 'sanitize_callback' => [$this->sanitizer, 'integer']
3292
3293 ] );
3294
3295 $this->customizer->add_control( new DimensionControl(
3296 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_bottom', [
3297 'type' => 'betterdocs-dimension',
3298 'section' => 'betterdocs_single_docs_settings',
3299 'settings' => 'betterdocs_doc_single_related_docs_content_padding_bottom',
3300 'label' => __( 'Bottom', 'betterdocs' ),
3301 'priority' => 163,
3302 'input_attrs' => [
3303 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3304 ]
3305 ] )
3306 );
3307
3308 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_padding_left', [
3309 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_padding_left'],
3310 'capability' => 'edit_theme_options',
3311 'transport' => 'postMessage',
3312 'sanitize_callback' => [$this->sanitizer, 'integer']
3313
3314 ] );
3315
3316 $this->customizer->add_control( new DimensionControl(
3317 $this->customizer, 'betterdocs_doc_single_related_docs_content_padding_left', [
3318 'type' => 'betterdocs-dimension',
3319 'section' => 'betterdocs_single_docs_settings',
3320 'settings' => 'betterdocs_doc_single_related_docs_content_padding_left',
3321 'label' => __( 'Left', 'betterdocs' ),
3322 'priority' => 163,
3323 'input_attrs' => [
3324 'class' => 'betterdocs_doc_single_related_docs_content_padding betterdocs-dimension'
3325 ]
3326 ] )
3327 );
3328 }
3329
3330 public function betterdocs_doc_single_related_docs_content_margin() {
3331 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin', [
3332 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin'],
3333 'capability' => 'edit_theme_options',
3334 'transport' => 'postMessage',
3335 'sanitize_callback' => [$this->sanitizer, 'integer']
3336
3337 ] );
3338
3339 $this->customizer->add_control( new TitleControl(
3340 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin', [
3341 'type' => 'betterdocs-title',
3342 'section' => 'betterdocs_single_docs_settings',
3343 'settings' => 'betterdocs_doc_single_related_docs_content_margin',
3344 'label' => __( 'Content Margin', 'betterdocs' ),
3345 'priority' => 163,
3346 'input_attrs' => [
3347 'id' => 'betterdocs_doc_single_related_docs_content_margin',
3348 'class' => 'betterdocs-dimension'
3349 ]
3350 ] )
3351 );
3352
3353 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_top', [
3354 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_top'],
3355 'capability' => 'edit_theme_options',
3356 'transport' => 'postMessage',
3357 'sanitize_callback' => [$this->sanitizer, 'integer']
3358 ] );
3359
3360 $this->customizer->add_control( new DimensionControl(
3361 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_top', [
3362 'type' => 'betterdocs-dimension',
3363 'section' => 'betterdocs_single_docs_settings',
3364 'settings' => 'betterdocs_doc_single_related_docs_content_margin_top',
3365 'label' => __( 'Top', 'betterdocs' ),
3366 'priority' => 163,
3367 'input_attrs' => [
3368 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3369 ]
3370 ] )
3371 );
3372
3373 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_right', [
3374 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_right'],
3375 'capability' => 'edit_theme_options',
3376 'transport' => 'postMessage',
3377 'sanitize_callback' => [$this->sanitizer, 'integer']
3378
3379 ] );
3380
3381 $this->customizer->add_control( new DimensionControl(
3382 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_right', [
3383 'type' => 'betterdocs-dimension',
3384 'section' => 'betterdocs_single_docs_settings',
3385 'settings' => 'betterdocs_doc_single_related_docs_content_margin_right',
3386 'label' => __( 'Right', 'betterdocs' ),
3387 'priority' => 163,
3388 'input_attrs' => [
3389 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3390 ]
3391 ] )
3392 );
3393
3394 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_bottom', [
3395 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_bottom'],
3396 'capability' => 'edit_theme_options',
3397 'transport' => 'postMessage',
3398 'sanitize_callback' => [$this->sanitizer, 'integer']
3399
3400 ] );
3401
3402 $this->customizer->add_control( new DimensionControl(
3403 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_bottom', [
3404 'type' => 'betterdocs-dimension',
3405 'section' => 'betterdocs_single_docs_settings',
3406 'settings' => 'betterdocs_doc_single_related_docs_content_margin_bottom',
3407 'label' => __( 'Bottom', 'betterdocs' ),
3408 'priority' => 163,
3409 'input_attrs' => [
3410 'class' => 'betterdocs_doc_single_related_docs_content_margin betterdocs-dimension'
3411 ]
3412 ] )
3413 );
3414
3415 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_content_margin_left', [
3416 'default' => $this->defaults['betterdocs_doc_single_related_docs_content_margin_left'],
3417 'capability' => 'edit_theme_options',
3418 'transport' => 'postMessage',
3419 'sanitize_callback' => [$this->sanitizer, 'integer']
3420
3421 ] );
3422
3423 $this->customizer->add_control( new DimensionControl(
3424 $this->customizer, 'betterdocs_doc_single_related_docs_content_margin_left', [
3425 'type' => 'betterdocs-dimension',
3426 'section' => 'betterdocs_single_docs_settings',
3427 'settings' => 'betterdocs_doc_single_related_docs_content_margin_left',
3428 'label' => __( 'Left', 'betterdocs' ),
3429 'priority' => 163,
3430 'input_attrs' => [
3431 'class' => 'betterdocs_doc_single_related_docs_content_margin_left betterdocs-dimension'
3432 ]
3433 ] )
3434 );
3435 }
3436
3437 public function betterdocs_doc_single_related_docs_label_color() {
3438 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_color', [
3439 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_color'],
3440 'capability' => 'edit_theme_options',
3441 'transport' => 'postMessage',
3442 'sanitize_callback' => [$this->sanitizer, 'rgba']
3443 ] );
3444
3445 $this->customizer->add_control(
3446 new AlphaColorControl(
3447 $this->customizer,
3448 'betterdocs_doc_single_related_docs_label_color',
3449 [
3450 'label' => __( 'Label Color', 'betterdocs' ),
3451 'section' => 'betterdocs_single_docs_settings',
3452 'settings' => 'betterdocs_doc_single_related_docs_label_color',
3453 'priority' => 163
3454 ]
3455 )
3456 );
3457 }
3458
3459 public function betterdocs_doc_single_related_docs_label_padding() {
3460 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding', [
3461 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding'],
3462 'capability' => 'edit_theme_options',
3463 'transport' => 'postMessage',
3464 'sanitize_callback' => [$this->sanitizer, 'integer']
3465
3466 ] );
3467
3468 $this->customizer->add_control( new TitleControl(
3469 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding', [
3470 'type' => 'betterdocs-title',
3471 'section' => 'betterdocs_single_docs_settings',
3472 'settings' => 'betterdocs_doc_single_related_docs_label_padding',
3473 'label' => __( 'Label Padding', 'betterdocs' ),
3474 'priority' => 163,
3475 'input_attrs' => [
3476 'id' => 'betterdocs_doc_single_related_docs_label_padding',
3477 'class' => 'betterdocs-dimension'
3478 ]
3479 ] )
3480 );
3481
3482 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_top', [
3483 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_top'],
3484 'capability' => 'edit_theme_options',
3485 'transport' => 'postMessage',
3486 'sanitize_callback' => [$this->sanitizer, 'integer']
3487 ] );
3488
3489 $this->customizer->add_control( new DimensionControl(
3490 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_top', [
3491 'type' => 'betterdocs-dimension',
3492 'section' => 'betterdocs_single_docs_settings',
3493 'settings' => 'betterdocs_doc_single_related_docs_label_padding_top',
3494 'label' => __( 'Top', 'betterdocs' ),
3495 'priority' => 163,
3496 'input_attrs' => [
3497 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3498 ]
3499 ] )
3500 );
3501
3502 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_right', [
3503 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_right'],
3504 'capability' => 'edit_theme_options',
3505 'transport' => 'postMessage',
3506 'sanitize_callback' => [$this->sanitizer, 'integer']
3507
3508 ] );
3509
3510 $this->customizer->add_control( new DimensionControl(
3511 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_right', [
3512 'type' => 'betterdocs-dimension',
3513 'section' => 'betterdocs_single_docs_settings',
3514 'settings' => 'betterdocs_doc_single_related_docs_label_padding_right',
3515 'label' => __( 'Right', 'betterdocs' ),
3516 'priority' => 163,
3517 'input_attrs' => [
3518 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3519 ]
3520 ] )
3521 );
3522
3523 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_bottom', [
3524 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_bottom'],
3525 'capability' => 'edit_theme_options',
3526 'transport' => 'postMessage',
3527 'sanitize_callback' => [$this->sanitizer, 'integer']
3528
3529 ] );
3530
3531 $this->customizer->add_control( new DimensionControl(
3532 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_bottom', [
3533 'type' => 'betterdocs-dimension',
3534 'section' => 'betterdocs_single_docs_settings',
3535 'settings' => 'betterdocs_doc_single_related_docs_label_padding_bottom',
3536 'label' => __( 'Bottom', 'betterdocs' ),
3537 'priority' => 163,
3538 'input_attrs' => [
3539 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3540 ]
3541 ] )
3542 );
3543
3544 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_padding_left', [
3545 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_padding_left'],
3546 'capability' => 'edit_theme_options',
3547 'transport' => 'postMessage',
3548 'sanitize_callback' => [$this->sanitizer, 'integer']
3549
3550 ] );
3551
3552 $this->customizer->add_control( new DimensionControl(
3553 $this->customizer, 'betterdocs_doc_single_related_docs_label_padding_left', [
3554 'type' => 'betterdocs-dimension',
3555 'section' => 'betterdocs_single_docs_settings',
3556 'settings' => 'betterdocs_doc_single_related_docs_label_padding_left',
3557 'label' => __( 'Left', 'betterdocs' ),
3558 'priority' => 163,
3559 'input_attrs' => [
3560 'class' => 'betterdocs_doc_single_related_docs_label_padding betterdocs-dimension'
3561 ]
3562 ] )
3563 );
3564 }
3565
3566 public function betterdocs_doc_single_related_docs_label_margin() {
3567 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin', [
3568 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin'],
3569 'capability' => 'edit_theme_options',
3570 'transport' => 'postMessage',
3571 'sanitize_callback' => [$this->sanitizer, 'integer']
3572
3573 ] );
3574
3575 $this->customizer->add_control( new TitleControl(
3576 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin', [
3577 'type' => 'betterdocs-title',
3578 'section' => 'betterdocs_single_docs_settings',
3579 'settings' => 'betterdocs_doc_single_related_docs_label_margin',
3580 'label' => __( 'Label Margin', 'betterdocs' ),
3581 'priority' => 163,
3582 'input_attrs' => [
3583 'id' => 'betterdocs_doc_single_related_docs_label_margin',
3584 'class' => 'betterdocs-dimension'
3585 ]
3586 ] )
3587 );
3588
3589 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_top', [
3590 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_top'],
3591 'capability' => 'edit_theme_options',
3592 'transport' => 'postMessage',
3593 'sanitize_callback' => [$this->sanitizer, 'integer']
3594 ] );
3595
3596 $this->customizer->add_control( new DimensionControl(
3597 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_top', [
3598 'type' => 'betterdocs-dimension',
3599 'section' => 'betterdocs_single_docs_settings',
3600 'settings' => 'betterdocs_doc_single_related_docs_label_margin_top',
3601 'label' => __( 'Top', 'betterdocs' ),
3602 'priority' => 163,
3603 'input_attrs' => [
3604 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
3605 ]
3606 ] )
3607 );
3608
3609 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_right', [
3610 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_right'],
3611 'capability' => 'edit_theme_options',
3612 'transport' => 'postMessage',
3613 'sanitize_callback' => [$this->sanitizer, 'integer']
3614
3615 ] );
3616
3617 $this->customizer->add_control( new DimensionControl(
3618 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_right', [
3619 'type' => 'betterdocs-dimension',
3620 'section' => 'betterdocs_single_docs_settings',
3621 'settings' => 'betterdocs_doc_single_related_docs_label_margin_right',
3622 'label' => __( 'Right', 'betterdocs' ),
3623 'priority' => 163,
3624 'input_attrs' => [
3625 'class' => 'betterdocs_doc_single_related_docs_label_margin_right betterdocs-dimension'
3626 ]
3627 ] )
3628 );
3629
3630 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_bottom', [
3631 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_bottom'],
3632 'capability' => 'edit_theme_options',
3633 'transport' => 'postMessage',
3634 'sanitize_callback' => [$this->sanitizer, 'integer']
3635 ] );
3636
3637 $this->customizer->add_control( new DimensionControl(
3638 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_bottom', [
3639 'type' => 'betterdocs-dimension',
3640 'section' => 'betterdocs_single_docs_settings',
3641 'settings' => 'betterdocs_doc_single_related_docs_label_margin_bottom',
3642 'label' => __( 'Bottom', 'betterdocs' ),
3643 'priority' => 163,
3644 'input_attrs' => [
3645 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
3646 ]
3647 ] )
3648 );
3649
3650 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_label_margin_left', [
3651 'default' => $this->defaults['betterdocs_doc_single_related_docs_label_margin_left'],
3652 'capability' => 'edit_theme_options',
3653 'transport' => 'postMessage',
3654 'sanitize_callback' => [$this->sanitizer, 'integer']
3655 ] );
3656
3657 $this->customizer->add_control( new DimensionControl(
3658 $this->customizer, 'betterdocs_doc_single_related_docs_label_margin_left', [
3659 'type' => 'betterdocs-dimension',
3660 'section' => 'betterdocs_single_docs_settings',
3661 'settings' => 'betterdocs_doc_single_related_docs_label_margin_left',
3662 'label' => __( 'Left', 'betterdocs' ),
3663 'priority' => 163,
3664 'input_attrs' => [
3665 'class' => 'betterdocs_doc_single_related_docs_label_margin betterdocs-dimension'
3666 ]
3667 ] )
3668 );
3669 }
3670
3671 public function betterdocs_doc_related_docs_list_font_size() {
3672 $this->customizer->add_setting( 'betterdocs_doc_related_docs_list_font_size', [
3673 'default' => $this->defaults['betterdocs_doc_related_docs_list_font_size'],
3674 'capability' => 'edit_theme_options',
3675 'transport' => 'postMessage',
3676 'sanitize_callback' => [$this->sanitizer, 'integer']
3677
3678 ] );
3679
3680 $this->customizer->add_control( new RangeValueControl(
3681 $this->customizer, 'betterdocs_doc_related_docs_list_font_size', [
3682 'type' => 'betterdocs-range-value',
3683 'section' => 'betterdocs_single_docs_settings',
3684 'settings' => 'betterdocs_doc_related_docs_list_font_size',
3685 'label' => __( 'List Font Size', 'betterdocs' ),
3686 'priority' => 163,
3687 'input_attrs' => [
3688 'min' => 0,
3689 'max' => 50,
3690 'step' => 1,
3691 'suffix' => 'px' //optional suffix
3692 ]
3693 ] )
3694 );
3695 }
3696
3697 public function betterdocs_doc_related_docs_list_font_weight() {
3698 $this->customizer->add_setting( 'betterdocs_doc_related_docs_list_font_weight', [
3699 'default' => $this->defaults['betterdocs_doc_related_docs_list_font_weight'],
3700 'capability' => 'edit_theme_options',
3701 'sanitize_callback' => [$this->sanitizer, 'choices']
3702 ] );
3703
3704 $this->customizer->add_control(
3705 new WP_Customize_Control(
3706 $this->customizer,
3707 'betterdocs_doc_related_docs_list_font_weight',
3708 [
3709 'label' => __( 'List Font Weight', 'betterdocs-pro' ),
3710 'section' => 'betterdocs_single_docs_settings',
3711 'settings' => 'betterdocs_doc_related_docs_list_font_weight',
3712 'type' => 'select',
3713 'choices' => [
3714 'normal' => 'Normal',
3715 '100' => '100',
3716 '200' => '200',
3717 '300' => '300',
3718 '400' => '400',
3719 '500' => '500',
3720 '600' => '600',
3721 '700' => '700',
3722 '800' => '800',
3723 '900' => '900'
3724 ],
3725 'priority' => 163
3726 ]
3727 )
3728 );
3729 }
3730
3731
3732 public function betterdocs_doc_single_related_docs_list_color() {
3733 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_color', [
3734 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_color'],
3735 'capability' => 'edit_theme_options',
3736 'transport' => 'postMessage',
3737 'sanitize_callback' => [$this->sanitizer, 'rgba']
3738 ] );
3739
3740 $this->customizer->add_control(
3741 new AlphaColorControl(
3742 $this->customizer,
3743 'betterdocs_doc_single_related_docs_list_color',
3744 [
3745 'label' => __( 'List Color', 'betterdocs' ),
3746 'section' => 'betterdocs_single_docs_settings',
3747 'settings' => 'betterdocs_doc_single_related_docs_list_color',
3748 'priority' => 163
3749 ]
3750 )
3751 );
3752 }
3753
3754 public function betterdocs_doc_single_related_docs_list_background_color() {
3755 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_background_color', [
3756 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_background_color'],
3757 'capability' => 'edit_theme_options',
3758 'transport' => 'postMessage',
3759 'sanitize_callback' => [$this->sanitizer, 'rgba']
3760 ] );
3761
3762 $this->customizer->add_control(
3763 new AlphaColorControl(
3764 $this->customizer,
3765 'betterdocs_doc_single_related_docs_list_background_color',
3766 [
3767 'label' => __( 'List Background Color', 'betterdocs' ),
3768 'section' => 'betterdocs_single_docs_settings',
3769 'settings' => 'betterdocs_doc_single_related_docs_list_background_color',
3770 'priority' => 163
3771 ]
3772 )
3773 );
3774 }
3775
3776 public function betterdocs_doc_single_related_docs_list_padding() {
3777 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding', [
3778 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding'],
3779 'capability' => 'edit_theme_options',
3780 'transport' => 'postMessage',
3781 'sanitize_callback' => [$this->sanitizer, 'integer']
3782
3783 ] );
3784
3785 $this->customizer->add_control( new TitleControl(
3786 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding', [
3787 'type' => 'betterdocs-title',
3788 'section' => 'betterdocs_single_docs_settings',
3789 'settings' => 'betterdocs_doc_single_related_docs_list_padding',
3790 'label' => __( 'List Padding', 'betterdocs' ),
3791 'priority' => 163,
3792 'input_attrs' => [
3793 'id' => 'betterdocs_doc_single_related_docs_list_padding',
3794 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
3795 ]
3796 ] )
3797 );
3798
3799 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_top', [
3800 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_top'],
3801 'capability' => 'edit_theme_options',
3802 'transport' => 'postMessage',
3803 'sanitize_callback' => [$this->sanitizer, 'integer']
3804 ] );
3805
3806 $this->customizer->add_control( new DimensionControl(
3807 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_top', [
3808 'type' => 'betterdocs-dimension',
3809 'section' => 'betterdocs_single_docs_settings',
3810 'settings' => 'betterdocs_doc_single_related_docs_list_padding_top',
3811 'label' => __( 'Top', 'betterdocs' ),
3812 'priority' => 163,
3813 'input_attrs' => [
3814 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
3815 ]
3816 ] )
3817 );
3818
3819 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_right', [
3820 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_right'],
3821 'capability' => 'edit_theme_options',
3822 'transport' => 'postMessage',
3823 'sanitize_callback' => [$this->sanitizer, 'integer']
3824
3825 ] );
3826
3827 $this->customizer->add_control( new DimensionControl(
3828 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_right', [
3829 'type' => 'betterdocs-dimension',
3830 'section' => 'betterdocs_single_docs_settings',
3831 'settings' => 'betterdocs_doc_single_related_docs_list_padding_right',
3832 'label' => __( 'Right', 'betterdocs' ),
3833 'priority' => 163,
3834 'input_attrs' => [
3835 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
3836 ]
3837 ] )
3838 );
3839
3840 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_bottom', [
3841 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_bottom'],
3842 'capability' => 'edit_theme_options',
3843 'transport' => 'postMessage',
3844 'sanitize_callback' => [$this->sanitizer, 'integer']
3845 ] );
3846
3847 $this->customizer->add_control( new DimensionControl(
3848 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_bottom', [
3849 'type' => 'betterdocs-dimension',
3850 'section' => 'betterdocs_single_docs_settings',
3851 'settings' => 'betterdocs_doc_single_related_docs_list_padding_bottom',
3852 'label' => __( 'Bottom', 'betterdocs' ),
3853 'priority' => 163,
3854 'input_attrs' => [
3855 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
3856 ]
3857 ] )
3858 );
3859
3860 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_padding_left', [
3861 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_padding_left'],
3862 'capability' => 'edit_theme_options',
3863 'transport' => 'postMessage',
3864 'sanitize_callback' => [$this->sanitizer, 'integer']
3865 ] );
3866
3867 $this->customizer->add_control( new DimensionControl(
3868 $this->customizer, 'betterdocs_doc_single_related_docs_list_padding_left', [
3869 'type' => 'betterdocs-dimension',
3870 'section' => 'betterdocs_single_docs_settings',
3871 'settings' => 'betterdocs_doc_single_related_docs_list_padding_left',
3872 'label' => __( 'Left', 'betterdocs' ),
3873 'priority' => 163,
3874 'input_attrs' => [
3875 'class' => 'betterdocs_doc_single_related_docs_list_padding betterdocs-dimension'
3876 ]
3877 ] )
3878 );
3879 }
3880
3881 public function betterdocs_doc_single_related_docs_list_margin() {
3882 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin', [
3883 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin'],
3884 'capability' => 'edit_theme_options',
3885 'transport' => 'postMessage',
3886 'sanitize_callback' => [$this->sanitizer, 'integer']
3887
3888 ] );
3889
3890 $this->customizer->add_control( new TitleControl(
3891 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin', [
3892 'type' => 'betterdocs-title',
3893 'section' => 'betterdocs_single_docs_settings',
3894 'settings' => 'betterdocs_doc_single_related_docs_list_margin',
3895 'label' => __( 'List Margin', 'betterdocs' ),
3896 'priority' => 163,
3897 'input_attrs' => [
3898 'id' => 'betterdocs_doc_single_related_docs_list_margin',
3899 'class' => 'betterdocs-dimension'
3900 ]
3901 ] )
3902 );
3903
3904 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_top', [
3905 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_top'],
3906 'capability' => 'edit_theme_options',
3907 'transport' => 'postMessage',
3908 'sanitize_callback' => [$this->sanitizer, 'integer']
3909 ] );
3910
3911 $this->customizer->add_control( new DimensionControl(
3912 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_top', [
3913 'type' => 'betterdocs-dimension',
3914 'section' => 'betterdocs_single_docs_settings',
3915 'settings' => 'betterdocs_doc_single_related_docs_list_margin_top',
3916 'label' => __( 'Top', 'betterdocs' ),
3917 'priority' => 163,
3918 'input_attrs' => [
3919 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
3920 ]
3921 ] )
3922 );
3923
3924 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_right', [
3925 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_right'],
3926 'capability' => 'edit_theme_options',
3927 'transport' => 'postMessage',
3928 'sanitize_callback' => [$this->sanitizer, 'integer']
3929
3930 ] );
3931
3932 $this->customizer->add_control( new DimensionControl(
3933 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_right', [
3934 'type' => 'betterdocs-dimension',
3935 'section' => 'betterdocs_single_docs_settings',
3936 'settings' => 'betterdocs_doc_single_related_docs_list_margin_right',
3937 'label' => __( 'Right', 'betterdocs' ),
3938 'priority' => 163,
3939 'input_attrs' => [
3940 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
3941 ]
3942 ] )
3943 );
3944
3945 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_bottom', [
3946 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_bottom'],
3947 'capability' => 'edit_theme_options',
3948 'transport' => 'postMessage',
3949 'sanitize_callback' => [$this->sanitizer, 'integer']
3950 ] );
3951
3952 $this->customizer->add_control( new DimensionControl(
3953 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_bottom', [
3954 'type' => 'betterdocs-dimension',
3955 'section' => 'betterdocs_single_docs_settings',
3956 'settings' => 'betterdocs_doc_single_related_docs_list_margin_bottom',
3957 'label' => __( 'Bottom', 'betterdocs' ),
3958 'priority' => 163,
3959 'input_attrs' => [
3960 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
3961 ]
3962 ] )
3963 );
3964
3965 $this->customizer->add_setting( 'betterdocs_doc_single_related_docs_list_margin_left', [
3966 'default' => $this->defaults['betterdocs_doc_single_related_docs_list_margin_left'],
3967 'capability' => 'edit_theme_options',
3968 'transport' => 'postMessage',
3969 'sanitize_callback' => [$this->sanitizer, 'integer']
3970 ] );
3971
3972 $this->customizer->add_control( new DimensionControl(
3973 $this->customizer, 'betterdocs_doc_single_related_docs_list_margin_left', [
3974 'type' => 'betterdocs-dimension',
3975 'section' => 'betterdocs_single_docs_settings',
3976 'settings' => 'betterdocs_doc_single_related_docs_list_margin_left',
3977 'label' => __( 'Left', 'betterdocs' ),
3978 'priority' => 163,
3979 'input_attrs' => [
3980 'class' => 'betterdocs_doc_single_related_docs_list_margin betterdocs-dimension'
3981 ]
3982 ] )
3983 );
3984 }
3985 }
3986