PluginProbe
Qi Blocks / 1.0.1
Qi Blocks v1.0.1
1.5.3 1.5.2 1.5.1 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 All 45 releases
qi-blocks / inc / blocks / comments-template / class-qi-blocks-comments-template-block.php

class-qi-blocks-comments-template-block.php in Qi Blocks 1.0.1, at inc/blocks/comments-template/class-qi-blocks-comments-template-block.php

1,190 lines 31.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly.
4 defined( 'ABSPATH' ) || exit;
5
6 if ( ! class_exists( 'Qi_Blocks_Comments_Template_Block' ) ) {
7 class Qi_Blocks_Comments_Template_Block extends Qi_Blocks_Blocks {
8 private static $instance;
9
10 public function __construct() {
11 // Set block data
12 $this->set_block_name( 'comments-template' );
13 $this->set_block_title( esc_html__( 'Comments Template', 'qi-blocks' ) );
14 $this->set_block_subcategory( esc_html__( 'Content', 'qi-blocks' ) );
15 $this->set_block_demo_url( 'https://qodeinteractive.com/qi-blocks-for-gutenberg/comments-template/#comments-template' );
16 $this->set_block_documentation( 'https://qodeinteractive.com/qi-blocks-for-gutenberg/documentation/#comments_template' );
17
18 // Set block 3rd party scripts
19 $this->set_block_3rd_party_scripts(
20 array(
21 'comment-reply' => array(
22 'block_name' => 'comments-template',
23 'url' => 'core',
24 ),
25 )
26 );
27
28 $block_options = array(
29 'render_callback' => array( $this, 'dynamic_render_callback' ),
30 'uses_context' => array(
31 'postType',
32 'postId',
33 ),
34 'attributes' => array_merge(
35 array(
36 'uniqueClass' => array(
37 'type' => 'string',
38 'default' => '',
39 ),
40 'blockContainerIds' => array(
41 'type' => 'string',
42 'default' => '',
43 ),
44 'blockContainerData' => array(
45 'type' => 'string',
46 'default' => '',
47 ),
48 'blockContainerClasses' => array(
49 'type' => 'string',
50 'default' => '',
51 ),
52 ),
53 qi_blocks_get_block_container_attributes(),
54 array(
55 'commentsTemplate' => array(
56 'type' => 'string',
57 'default' => '',
58 ),
59 'showCommentsList' => array(
60 'type' => 'boolean',
61 'default' => true,
62 ),
63 'showCommentsForm' => array(
64 'type' => 'boolean',
65 'default' => true,
66 ),
67 'titleTag' => array(
68 'type' => 'string',
69 'default' => 'h3',
70 ),
71 'titleColor' => array(
72 'type' => 'string',
73 'default' => '',
74 ),
75 ),
76 qi_blocks_get_block_option_typography_attributes( 'title' ),
77 array(
78 'commentsTitleMarginTop' => array(
79 'type' => 'number',
80 'default' => '',
81 ),
82 'commentsTitleMarginTopTablet' => array(
83 'type' => 'number',
84 'default' => '',
85 ),
86 'commentsTitleMarginTopMobile' => array(
87 'type' => 'number',
88 'default' => '',
89 ),
90 'commentsTitleMarginTopDecimal' => array(
91 'type' => 'number',
92 'default' => '',
93 ),
94 'commentsTitleMarginTopDecimalTablet' => array(
95 'type' => 'number',
96 'default' => '',
97 ),
98 'commentsTitleMarginTopDecimalMobile' => array(
99 'type' => 'number',
100 'default' => '',
101 ),
102 'commentsTitleMarginBottom' => array(
103 'type' => 'number',
104 'default' => '',
105 ),
106 'commentsTitleMarginBottomTablet' => array(
107 'type' => 'number',
108 'default' => '',
109 ),
110 'commentsTitleMarginBottomMobile' => array(
111 'type' => 'number',
112 'default' => '',
113 ),
114 'commentsTitleMarginBottomDecimal' => array(
115 'type' => 'number',
116 'default' => '',
117 ),
118 'commentsTitleMarginBottomDecimalTablet' => array(
119 'type' => 'number',
120 'default' => '',
121 ),
122 'commentsTitleMarginBottomDecimalMobile' => array(
123 'type' => 'number',
124 'default' => '',
125 ),
126 'commentsTitleMarginUnit' => array(
127 'type' => 'string',
128 'default' => 'px',
129 ),
130 'commentsTitleMarginUnitTablet' => array(
131 'type' => 'string',
132 'default' => 'px',
133 ),
134 'commentsTitleMarginUnitMobile' => array(
135 'type' => 'string',
136 'default' => 'px',
137 ),
138 'formTitleMarginTop' => array(
139 'type' => 'number',
140 'default' => '',
141 ),
142 'formTitleMarginTopTablet' => array(
143 'type' => 'number',
144 'default' => '',
145 ),
146 'formTitleMarginTopMobile' => array(
147 'type' => 'number',
148 'default' => '',
149 ),
150 'formTitleMarginTopDecimal' => array(
151 'type' => 'number',
152 'default' => '',
153 ),
154 'formTitleMarginTopDecimalTablet' => array(
155 'type' => 'number',
156 'default' => '',
157 ),
158 'formTitleMarginTopDecimalMobile' => array(
159 'type' => 'number',
160 'default' => '',
161 ),
162 'formTitleMarginBottom' => array(
163 'type' => 'number',
164 'default' => '',
165 ),
166 'formTitleMarginBottomTablet' => array(
167 'type' => 'number',
168 'default' => '',
169 ),
170 'formTitleMarginBottomMobile' => array(
171 'type' => 'number',
172 'default' => '',
173 ),
174 'formTitleMarginBottomDecimal' => array(
175 'type' => 'number',
176 'default' => '',
177 ),
178 'formTitleMarginBottomDecimalTablet' => array(
179 'type' => 'number',
180 'default' => '',
181 ),
182 'formTitleMarginBottomDecimalMobile' => array(
183 'type' => 'number',
184 'default' => '',
185 ),
186 'formTitleMarginUnit' => array(
187 'type' => 'string',
188 'default' => 'px',
189 ),
190 'formTitleMarginUnitTablet' => array(
191 'type' => 'string',
192 'default' => 'px',
193 ),
194 'formTitleMarginUnitMobile' => array(
195 'type' => 'string',
196 'default' => 'px',
197 ),
198 'commentsLineColor' => array(
199 'type' => 'string',
200 'default' => '',
201 ),
202 'commentsInfoLinksColor' => array(
203 'type' => 'string',
204 'default' => '',
205 ),
206 'commentsInfoLinksHoverColor' => array(
207 'type' => 'string',
208 'default' => '',
209 ),
210 'commentsInfoMarginBottom' => array(
211 'type' => 'number',
212 'default' => '',
213 ),
214 'commentsInfoMarginBottomUnit' => array(
215 'type' => 'string',
216 'default' => 'px',
217 ),
218 'commentsInfoMarginBottomDecimal' => array(
219 'type' => 'number',
220 'default' => '',
221 ),
222 'commentsInfoMarginBottomTablet' => array(
223 'type' => 'number',
224 'default' => '',
225 ),
226 'commentsInfoMarginBottomMobile' => array(
227 'type' => 'number',
228 'default' => '',
229 ),
230 'commentsInfoMarginBottomUnitTablet' => array(
231 'type' => 'string',
232 'default' => 'px',
233 ),
234 'commentsInfoMarginBottomUnitMobile' => array(
235 'type' => 'string',
236 'default' => 'px',
237 ),
238 'commentsInfoMarginBottomDecimalTablet' => array(
239 'type' => 'number',
240 'default' => '',
241 ),
242 'commentsInfoMarginBottomDecimalMobile' => array(
243 'type' => 'number',
244 'default' => '',
245 ),
246 'commentsAvatarWidth' => array(
247 'type' => 'number',
248 'default' => '',
249 ),
250 'commentsAvatarWidthUnit' => array(
251 'type' => 'string',
252 'default' => 'px',
253 ),
254 'commentsAvatarWidthDecimal' => array(
255 'type' => 'number',
256 'default' => '',
257 ),
258 'commentsAvatarMarginRight' => array(
259 'type' => 'number',
260 'default' => '',
261 ),
262 'commentsAvatarMarginRightUnit' => array(
263 'type' => 'string',
264 'default' => 'px',
265 ),
266 'commentsAvatarMarginRightDecimal' => array(
267 'type' => 'number',
268 'default' => '',
269 ),
270 'commentsTitleColor' => array(
271 'type' => 'string',
272 'default' => '',
273 ),
274 'commentsTitleHoverColor' => array(
275 'type' => 'string',
276 'default' => '',
277 ),
278 ),
279 qi_blocks_get_block_option_typography_attributes( 'commentsTitle' ),
280 qi_blocks_get_block_option_typography_attributes( 'commentsText' ),
281 array(
282 'commentsTextColor' => array(
283 'type' => 'string',
284 'default' => '',
285 ),
286 'commentsTextMarginTop' => array(
287 'type' => 'number',
288 'default' => '',
289 ),
290 'commentsTextMarginTopUnit' => array(
291 'type' => 'string',
292 'default' => 'px',
293 ),
294 'commentsTextMarginTopDecimal' => array(
295 'type' => 'number',
296 'default' => '',
297 ),
298 'commentsTextMarginTopTablet' => array(
299 'type' => 'number',
300 'default' => '',
301 ),
302 'commentsTextMarginTopMobile' => array(
303 'type' => 'number',
304 'default' => '',
305 ),
306 'commentsTextMarginTopUnitTablet' => array(
307 'type' => 'string',
308 'default' => 'px',
309 ),
310 'commentsTextMarginTopUnitMobile' => array(
311 'type' => 'string',
312 'default' => 'px',
313 ),
314 'commentsTextMarginTopDecimalTablet' => array(
315 'type' => 'number',
316 'default' => '',
317 ),
318 'commentsTextMarginTopDecimalMobile' => array(
319 'type' => 'number',
320 'default' => '',
321 ),
322 'commentsDateColor' => array(
323 'type' => 'string',
324 'default' => '',
325 ),
326 'commentsDateHoverColor' => array(
327 'type' => 'string',
328 'default' => '',
329 ),
330 ),
331 qi_blocks_get_block_option_typography_attributes( 'commentsDate' ),
332 qi_blocks_get_block_option_typography_attributes( 'formNotes' ),
333 array(
334 'formNotesColor' => array(
335 'type' => 'string',
336 'default' => '',
337 ),
338 'formNotesLinkHoverColor' => array(
339 'type' => 'string',
340 'default' => '',
341 ),
342 'formNotesMarginTop' => array(
343 'type' => 'number',
344 'default' => '',
345 ),
346 'formNotesMarginTopTablet' => array(
347 'type' => 'number',
348 'default' => '',
349 ),
350 'formNotesMarginTopMobile' => array(
351 'type' => 'number',
352 'default' => '',
353 ),
354 'formNotesMarginTopDecimal' => array(
355 'type' => 'number',
356 'default' => '',
357 ),
358 'formNotesMarginTopDecimalTablet' => array(
359 'type' => 'number',
360 'default' => '',
361 ),
362 'formNotesMarginTopDecimalMobile' => array(
363 'type' => 'number',
364 'default' => '',
365 ),
366 'formNotesMarginBottom' => array(
367 'type' => 'number',
368 'default' => '',
369 ),
370 'formNotesMarginBottomTablet' => array(
371 'type' => 'number',
372 'default' => '',
373 ),
374 'formNotesMarginBottomMobile' => array(
375 'type' => 'number',
376 'default' => '',
377 ),
378 'formNotesMarginBottomDecimal' => array(
379 'type' => 'number',
380 'default' => '',
381 ),
382 'formNotesMarginBottomDecimalTablet' => array(
383 'type' => 'number',
384 'default' => '',
385 ),
386 'formNotesMarginBottomDecimalMobile' => array(
387 'type' => 'number',
388 'default' => '',
389 ),
390 'formNotesMarginUnit' => array(
391 'type' => 'string',
392 'default' => 'px',
393 ),
394 'formNotesMarginUnitTablet' => array(
395 'type' => 'string',
396 'default' => 'px',
397 ),
398 'formNotesMarginUnitMobile' => array(
399 'type' => 'string',
400 'default' => 'px',
401 ),
402 'formLabelColor' => array(
403 'type' => 'string',
404 'default' => '',
405 ),
406 ),
407 qi_blocks_get_block_option_typography_attributes( 'formLabel' ),
408 qi_blocks_get_block_option_typography_attributes( 'formInput' ),
409 array(
410 'formLabelMarginBottom' => array(
411 'type' => 'number',
412 'default' => '',
413 ),
414 'formLabelMarginBottomUnit' => array(
415 'type' => 'string',
416 'default' => 'px',
417 ),
418 'formLabelMarginBottomDecimal' => array(
419 'type' => 'number',
420 'default' => '',
421 ),
422 'formInputPaddingTop' => array(
423 'type' => 'number',
424 'default' => '',
425 ),
426 'formInputPaddingTopTablet' => array(
427 'type' => 'number',
428 'default' => '',
429 ),
430 'formInputPaddingTopMobile' => array(
431 'type' => 'number',
432 'default' => '',
433 ),
434 'formInputPaddingTopDecimal' => array(
435 'type' => 'number',
436 'default' => '',
437 ),
438 'formInputPaddingTopDecimalTablet' => array(
439 'type' => 'number',
440 'default' => '',
441 ),
442 'formInputPaddingTopDecimalMobile' => array(
443 'type' => 'number',
444 'default' => '',
445 ),
446 'formInputPaddingRight' => array(
447 'type' => 'number',
448 'default' => '',
449 ),
450 'formInputPaddingRightTablet' => array(
451 'type' => 'number',
452 'default' => '',
453 ),
454 'formInputPaddingRightMobile' => array(
455 'type' => 'number',
456 'default' => '',
457 ),
458 'formInputPaddingRightDecimal' => array(
459 'type' => 'number',
460 'default' => '',
461 ),
462 'formInputPaddingRightDecimalTablet' => array(
463 'type' => 'number',
464 'default' => '',
465 ),
466 'formInputPaddingRightDecimalMobile' => array(
467 'type' => 'number',
468 'default' => '',
469 ),
470 'formInputPaddingBottom' => array(
471 'type' => 'number',
472 'default' => '',
473 ),
474 'formInputPaddingBottomTablet' => array(
475 'type' => 'number',
476 'default' => '',
477 ),
478 'formInputPaddingBottomMobile' => array(
479 'type' => 'number',
480 'default' => '',
481 ),
482 'formInputPaddingBottomDecimal' => array(
483 'type' => 'number',
484 'default' => '',
485 ),
486 'formInputPaddingBottomDecimalTablet' => array(
487 'type' => 'number',
488 'default' => '',
489 ),
490 'formInputPaddingBottomDecimalMobile' => array(
491 'type' => 'number',
492 'default' => '',
493 ),
494 'formInputPaddingLeft' => array(
495 'type' => 'number',
496 'default' => '',
497 ),
498 'formInputPaddingLeftTablet' => array(
499 'type' => 'number',
500 'default' => '',
501 ),
502 'formInputPaddingLeftMobile' => array(
503 'type' => 'number',
504 'default' => '',
505 ),
506 'formInputPaddingLeftDecimal' => array(
507 'type' => 'number',
508 'default' => '',
509 ),
510 'formInputPaddingLeftDecimalTablet' => array(
511 'type' => 'number',
512 'default' => '',
513 ),
514 'formInputPaddingLeftDecimalMobile' => array(
515 'type' => 'number',
516 'default' => '',
517 ),
518 'formInputPaddingUnit' => array(
519 'type' => 'string',
520 'default' => 'px',
521 ),
522 'formInputPaddingUnitTablet' => array(
523 'type' => 'string',
524 'default' => 'px',
525 ),
526 'formInputPaddingUnitMobile' => array(
527 'type' => 'string',
528 'default' => 'px',
529 ),
530 'formInputMarginBottom' => array(
531 'type' => 'number',
532 'default' => '',
533 ),
534 'formInputMarginBottomUnit' => array(
535 'type' => 'string',
536 'default' => 'px',
537 ),
538 'formInputMarginBottomDecimal' => array(
539 'type' => 'number',
540 'default' => '',
541 ),
542 'formInputBorderStyle' => array(
543 'type' => 'string',
544 'default' => '',
545 ),
546 'formInputBorderWidthTop' => array(
547 'type' => 'number',
548 'default' => '',
549 ),
550 'formInputBorderWidthTopTablet' => array(
551 'type' => 'number',
552 'default' => '',
553 ),
554 'formInputBorderWidthTopMobile' => array(
555 'type' => 'number',
556 'default' => '',
557 ),
558 'formInputBorderWidthRight' => array(
559 'type' => 'number',
560 'default' => '',
561 ),
562 'formInputBorderWidthRightTablet' => array(
563 'type' => 'number',
564 'default' => '',
565 ),
566 'formInputBorderWidthRightMobile' => array(
567 'type' => 'number',
568 'default' => '',
569 ),
570 'formInputBorderWidthBottom' => array(
571 'type' => 'number',
572 'default' => '',
573 ),
574 'formInputBorderWidthBottomTablet' => array(
575 'type' => 'number',
576 'default' => '',
577 ),
578 'formInputBorderWidthBottomMobile' => array(
579 'type' => 'number',
580 'default' => '',
581 ),
582 'formInputBorderWidthLeft' => array(
583 'type' => 'number',
584 'default' => '',
585 ),
586 'formInputBorderWidthLeftTablet' => array(
587 'type' => 'number',
588 'default' => '',
589 ),
590 'formInputBorderWidthLeftMobile' => array(
591 'type' => 'number',
592 'default' => '',
593 ),
594 'formInputBorderWidthUnit' => array(
595 'type' => 'string',
596 'default' => 'px',
597 ),
598 'formInputBorderWidthUnitTablet' => array(
599 'type' => 'string',
600 'default' => 'px',
601 ),
602 'formInputBorderWidthUnitMobile' => array(
603 'type' => 'string',
604 'default' => 'px',
605 ),
606 'formInputBorderRadiusTop' => array(
607 'type' => 'number',
608 'default' => '',
609 ),
610 'formInputBorderRadiusTopTablet' => array(
611 'type' => 'number',
612 'default' => '',
613 ),
614 'formInputBorderRadiusTopMobile' => array(
615 'type' => 'number',
616 'default' => '',
617 ),
618 'formInputBorderRadiusTopDecimal' => array(
619 'type' => 'number',
620 'default' => '',
621 ),
622 'formInputBorderRadiusTopDecimalTablet' => array(
623 'type' => 'number',
624 'default' => '',
625 ),
626 'formInputBorderRadiusTopDecimalMobile' => array(
627 'type' => 'number',
628 'default' => '',
629 ),
630 'formInputBorderRadiusRight' => array(
631 'type' => 'number',
632 'default' => '',
633 ),
634 'formInputBorderRadiusRightTablet' => array(
635 'type' => 'number',
636 'default' => '',
637 ),
638 'formInputBorderRadiusRightMobile' => array(
639 'type' => 'number',
640 'default' => '',
641 ),
642 'formInputBorderRadiusRightDecimal' => array(
643 'type' => 'number',
644 'default' => '',
645 ),
646 'formInputBorderRadiusRightDecimalTablet' => array(
647 'type' => 'number',
648 'default' => '',
649 ),
650 'formInputBorderRadiusRightDecimalMobile' => array(
651 'type' => 'number',
652 'default' => '',
653 ),
654 'formInputBorderRadiusBottom' => array(
655 'type' => 'number',
656 'default' => '',
657 ),
658 'formInputBorderRadiusBottomTablet' => array(
659 'type' => 'number',
660 'default' => '',
661 ),
662 'formInputBorderRadiusBottomMobile' => array(
663 'type' => 'number',
664 'default' => '',
665 ),
666 'formInputBorderRadiusBottomDecimal' => array(
667 'type' => 'number',
668 'default' => '',
669 ),
670 'formInputBorderRadiusBottomDecimalTablet' => array(
671 'type' => 'number',
672 'default' => '',
673 ),
674 'formInputBorderRadiusBottomDecimalMobile' => array(
675 'type' => 'number',
676 'default' => '',
677 ),
678 'formInputBorderRadiusLeft' => array(
679 'type' => 'number',
680 'default' => '',
681 ),
682 'formInputBorderRadiusLeftTablet' => array(
683 'type' => 'number',
684 'default' => '',
685 ),
686 'formInputBorderRadiusLeftMobile' => array(
687 'type' => 'number',
688 'default' => '',
689 ),
690 'formInputBorderRadiusLeftDecimal' => array(
691 'type' => 'number',
692 'default' => '',
693 ),
694 'formInputBorderRadiusLeftDecimalTablet' => array(
695 'type' => 'number',
696 'default' => '',
697 ),
698 'formInputBorderRadiusLeftDecimalMobile' => array(
699 'type' => 'number',
700 'default' => '',
701 ),
702 'formInputBorderRadiusUnit' => array(
703 'type' => 'string',
704 'default' => 'px',
705 ),
706 'formInputBorderRadiusUnitTablet' => array(
707 'type' => 'string',
708 'default' => 'px',
709 ),
710 'formInputBorderRadiusUnitMobile' => array(
711 'type' => 'string',
712 'default' => 'px',
713 ),
714 'formInputColor' => array(
715 'type' => 'string',
716 'default' => '',
717 ),
718 'formInputFocusColor' => array(
719 'type' => 'string',
720 'default' => '',
721 ),
722 'formInputBackgroundColor' => array(
723 'type' => 'string',
724 'default' => '',
725 ),
726 'formInputFocusBackgroundColor' => array(
727 'type' => 'string',
728 'default' => '',
729 ),
730 'formInputBorderColor' => array(
731 'type' => 'string',
732 'default' => '',
733 ),
734 'formInputFocusBorderColor' => array(
735 'type' => 'string',
736 'default' => '',
737 ),
738 'formInputBoxShadowColor' => array(
739 'type' => 'string',
740 'default' => '',
741 ),
742 'formInputBoxShadowHorizontal' => array(
743 'type' => 'number',
744 'default' => '',
745 ),
746 'formInputBoxShadowVertical' => array(
747 'type' => 'number',
748 'default' => '',
749 ),
750 'formInputBoxShadowBlur' => array(
751 'type' => 'number',
752 'default' => '',
753 ),
754 'formInputBoxShadowSpread' => array(
755 'type' => 'number',
756 'default' => '',
757 ),
758 'formInputBoxShadowPosition' => array(
759 'type' => 'string',
760 'default' => '',
761 ),
762 'formInputFocusBoxShadowColor' => array(
763 'type' => 'string',
764 'default' => '',
765 ),
766 'formInputFocusBoxShadowHorizontal' => array(
767 'type' => 'number',
768 'default' => '',
769 ),
770 'formInputFocusBoxShadowVertical' => array(
771 'type' => 'number',
772 'default' => '',
773 ),
774 'formInputFocusBoxShadowBlur' => array(
775 'type' => 'number',
776 'default' => '',
777 ),
778 'formInputFocusBoxShadowSpread' => array(
779 'type' => 'number',
780 'default' => '',
781 ),
782 'formInputFocusBoxShadowPosition' => array(
783 'type' => 'string',
784 'default' => '',
785 ),
786 ),
787 qi_blocks_get_block_option_typography_attributes( 'formButton' ),
788 array(
789 'formButtonPaddingTop' => array(
790 'type' => 'number',
791 'default' => '',
792 ),
793 'formButtonPaddingTopTablet' => array(
794 'type' => 'number',
795 'default' => '',
796 ),
797 'formButtonPaddingTopMobile' => array(
798 'type' => 'number',
799 'default' => '',
800 ),
801 'formButtonPaddingTopDecimal' => array(
802 'type' => 'number',
803 'default' => '',
804 ),
805 'formButtonPaddingTopDecimalTablet' => array(
806 'type' => 'number',
807 'default' => '',
808 ),
809 'formButtonPaddingTopDecimalMobile' => array(
810 'type' => 'number',
811 'default' => '',
812 ),
813 'formButtonPaddingRight' => array(
814 'type' => 'number',
815 'default' => '',
816 ),
817 'formButtonPaddingRightTablet' => array(
818 'type' => 'number',
819 'default' => '',
820 ),
821 'formButtonPaddingRightMobile' => array(
822 'type' => 'number',
823 'default' => '',
824 ),
825 'formButtonPaddingRightDecimal' => array(
826 'type' => 'number',
827 'default' => '',
828 ),
829 'formButtonPaddingRightDecimalTablet' => array(
830 'type' => 'number',
831 'default' => '',
832 ),
833 'formButtonPaddingRightDecimalMobile' => array(
834 'type' => 'number',
835 'default' => '',
836 ),
837 'formButtonPaddingBottom' => array(
838 'type' => 'number',
839 'default' => '',
840 ),
841 'formButtonPaddingBottomTablet' => array(
842 'type' => 'number',
843 'default' => '',
844 ),
845 'formButtonPaddingBottomMobile' => array(
846 'type' => 'number',
847 'default' => '',
848 ),
849 'formButtonPaddingBottomDecimal' => array(
850 'type' => 'number',
851 'default' => '',
852 ),
853 'formButtonPaddingBottomDecimalTablet' => array(
854 'type' => 'number',
855 'default' => '',
856 ),
857 'formButtonPaddingBottomDecimalMobile' => array(
858 'type' => 'number',
859 'default' => '',
860 ),
861 'formButtonPaddingLeft' => array(
862 'type' => 'number',
863 'default' => '',
864 ),
865 'formButtonPaddingLeftTablet' => array(
866 'type' => 'number',
867 'default' => '',
868 ),
869 'formButtonPaddingLeftMobile' => array(
870 'type' => 'number',
871 'default' => '',
872 ),
873 'formButtonPaddingLeftDecimal' => array(
874 'type' => 'number',
875 'default' => '',
876 ),
877 'formButtonPaddingLeftDecimalTablet' => array(
878 'type' => 'number',
879 'default' => '',
880 ),
881 'formButtonPaddingLeftDecimalMobile' => array(
882 'type' => 'number',
883 'default' => '',
884 ),
885 'formButtonPaddingUnit' => array(
886 'type' => 'string',
887 'default' => 'px',
888 ),
889 'formButtonPaddingUnitTablet' => array(
890 'type' => 'string',
891 'default' => 'px',
892 ),
893 'formButtonPaddingUnitMobile' => array(
894 'type' => 'string',
895 'default' => 'px',
896 ),
897 'formButtonMarginTop' => array(
898 'type' => 'number',
899 'default' => '',
900 ),
901 'formButtonMarginTopUnit' => array(
902 'type' => 'string',
903 'default' => 'px',
904 ),
905 'formButtonMarginTopDecimal' => array(
906 'type' => 'number',
907 'default' => '',
908 ),
909 'formButtonBorderStyle' => array(
910 'type' => 'string',
911 'default' => '',
912 ),
913 'formButtonBorderWidthTop' => array(
914 'type' => 'number',
915 'default' => '',
916 ),
917 'formButtonBorderWidthTopTablet' => array(
918 'type' => 'number',
919 'default' => '',
920 ),
921 'formButtonBorderWidthTopMobile' => array(
922 'type' => 'number',
923 'default' => '',
924 ),
925 'formButtonBorderWidthRight' => array(
926 'type' => 'number',
927 'default' => '',
928 ),
929 'formButtonBorderWidthRightTablet' => array(
930 'type' => 'number',
931 'default' => '',
932 ),
933 'formButtonBorderWidthRightMobile' => array(
934 'type' => 'number',
935 'default' => '',
936 ),
937 'formButtonBorderWidthBottom' => array(
938 'type' => 'number',
939 'default' => '',
940 ),
941 'formButtonBorderWidthBottomTablet' => array(
942 'type' => 'number',
943 'default' => '',
944 ),
945 'formButtonBorderWidthBottomMobile' => array(
946 'type' => 'number',
947 'default' => '',
948 ),
949 'formButtonBorderWidthLeft' => array(
950 'type' => 'number',
951 'default' => '',
952 ),
953 'formButtonBorderWidthLeftTablet' => array(
954 'type' => 'number',
955 'default' => '',
956 ),
957 'formButtonBorderWidthLeftMobile' => array(
958 'type' => 'number',
959 'default' => '',
960 ),
961 'formButtonBorderWidthUnit' => array(
962 'type' => 'string',
963 'default' => 'px',
964 ),
965 'formButtonBorderWidthUnitTablet' => array(
966 'type' => 'string',
967 'default' => 'px',
968 ),
969 'formButtonBorderWidthUnitMobile' => array(
970 'type' => 'string',
971 'default' => 'px',
972 ),
973 'formButtonBorderRadiusTop' => array(
974 'type' => 'number',
975 'default' => '',
976 ),
977 'formButtonBorderRadiusTopTablet' => array(
978 'type' => 'number',
979 'default' => '',
980 ),
981 'formButtonBorderRadiusTopMobile' => array(
982 'type' => 'number',
983 'default' => '',
984 ),
985 'formButtonBorderRadiusTopDecimal' => array(
986 'type' => 'number',
987 'default' => '',
988 ),
989 'formButtonBorderRadiusTopDecimalTablet' => array(
990 'type' => 'number',
991 'default' => '',
992 ),
993 'formButtonBorderRadiusTopDecimalMobile' => array(
994 'type' => 'number',
995 'default' => '',
996 ),
997 'formButtonBorderRadiusRight' => array(
998 'type' => 'number',
999 'default' => '',
1000 ),
1001 'formButtonBorderRadiusRightTablet' => array(
1002 'type' => 'number',
1003 'default' => '',
1004 ),
1005 'formButtonBorderRadiusRightMobile' => array(
1006 'type' => 'number',
1007 'default' => '',
1008 ),
1009 'formButtonBorderRadiusRightDecimal' => array(
1010 'type' => 'number',
1011 'default' => '',
1012 ),
1013 'formButtonBorderRadiusRightDecimalTablet' => array(
1014 'type' => 'number',
1015 'default' => '',
1016 ),
1017 'formButtonBorderRadiusRightDecimalMobile' => array(
1018 'type' => 'number',
1019 'default' => '',
1020 ),
1021 'formButtonBorderRadiusBottom' => array(
1022 'type' => 'number',
1023 'default' => '',
1024 ),
1025 'formButtonBorderRadiusBottomTablet' => array(
1026 'type' => 'number',
1027 'default' => '',
1028 ),
1029 'formButtonBorderRadiusBottomMobile' => array(
1030 'type' => 'number',
1031 'default' => '',
1032 ),
1033 'formButtonBorderRadiusBottomDecimal' => array(
1034 'type' => 'number',
1035 'default' => '',
1036 ),
1037 'formButtonBorderRadiusBottomDecimalTablet' => array(
1038 'type' => 'number',
1039 'default' => '',
1040 ),
1041 'formButtonBorderRadiusBottomDecimalMobile' => array(
1042 'type' => 'number',
1043 'default' => '',
1044 ),
1045 'formButtonBorderRadiusLeft' => array(
1046 'type' => 'number',
1047 'default' => '',
1048 ),
1049 'formButtonBorderRadiusLeftTablet' => array(
1050 'type' => 'number',
1051 'default' => '',
1052 ),
1053 'formButtonBorderRadiusLeftMobile' => array(
1054 'type' => 'number',
1055 'default' => '',
1056 ),
1057 'formButtonBorderRadiusLeftDecimal' => array(
1058 'type' => 'number',
1059 'default' => '',
1060 ),
1061 'formButtonBorderRadiusLeftDecimalTablet' => array(
1062 'type' => 'number',
1063 'default' => '',
1064 ),
1065 'formButtonBorderRadiusLeftDecimalMobile' => array(
1066 'type' => 'number',
1067 'default' => '',
1068 ),
1069 'formButtonBorderRadiusUnit' => array(
1070 'type' => 'string',
1071 'default' => 'px',
1072 ),
1073 'formButtonBorderRadiusUnitTablet' => array(
1074 'type' => 'string',
1075 'default' => 'px',
1076 ),
1077 'formButtonBorderRadiusUnitMobile' => array(
1078 'type' => 'string',
1079 'default' => 'px',
1080 ),
1081 'formButtonBoxShadowColor' => array(
1082 'type' => 'string',
1083 'default' => '',
1084 ),
1085 'formButtonBoxShadowHorizontal' => array(
1086 'type' => 'number',
1087 'default' => '',
1088 ),
1089 'formButtonBoxShadowVertical' => array(
1090 'type' => 'number',
1091 'default' => '',
1092 ),
1093 'formButtonBoxShadowBlur' => array(
1094 'type' => 'number',
1095 'default' => '',
1096 ),
1097 'formButtonBoxShadowSpread' => array(
1098 'type' => 'number',
1099 'default' => '',
1100 ),
1101 'formButtonBoxShadowPosition' => array(
1102 'type' => 'string',
1103 'default' => '',
1104 ),
1105 'formButtonShowIcon' => array(
1106 'type' => 'boolean',
1107 'default' => true,
1108 ),
1109 'formButtonIcon' => array(
1110 'type' => 'object',
1111 'default' => array(
1112 'html' => '',
1113 ),
1114 ),
1115 'formButtonIconSize' => array(
1116 'type' => 'number',
1117 'default' => '',
1118 ),
1119 'formButtonColor' => array(
1120 'type' => 'string',
1121 'default' => '',
1122 ),
1123 'formButtonHoverColor' => array(
1124 'type' => 'string',
1125 'default' => '',
1126 ),
1127 'formButtonBackgroundColor' => array(
1128 'type' => 'string',
1129 'default' => '',
1130 ),
1131 'formButtonHoverBackgroundColor' => array(
1132 'type' => 'string',
1133 'default' => '',
1134 ),
1135 'formButtonBorderColor' => array(
1136 'type' => 'string',
1137 'default' => '',
1138 ),
1139 'formButtonHoverBorderColor' => array(
1140 'type' => 'string',
1141 'default' => '',
1142 ),
1143 )
1144 ),
1145 );
1146
1147 $this->set_block_options( $block_options );
1148
1149 parent::__construct();
1150 }
1151
1152 /**
1153 * @return Qi_Blocks_Comments_Template_Block
1154 */
1155 public static function get_instance() {
1156 if ( is_null( self::$instance ) ) {
1157 self::$instance = new self();
1158 }
1159
1160 return self::$instance;
1161 }
1162
1163 function dynamic_render_callback( $attributes, $content, $block ) {
1164 $html = '';
1165
1166 if ( ! empty( $block ) && empty( $block->context['postId'] ) ) {
1167 return '';
1168 }
1169
1170 $block_classes = qi_blocks_get_block_holder_classes( 'comments-template', $attributes );
1171
1172 $html .= '<div ' . qi_blocks_get_block_container_html_attributes_string( $attributes ) . '>';
1173 $html .= '<div id="qodef-comments-template" class="' . implode( ' ', $block_classes ) . '">';
1174
1175 ob_start();
1176
1177 qi_blocks_template_part( 'comments', 'templates/comments-template', '', array( 'post_ID' => $block->context['postId'], 'attributes' => $attributes ) );
1178
1179 $html .= ob_get_clean();
1180
1181 $html .= '</div>';
1182 $html .= '</div>';
1183
1184 return $html;
1185 }
1186 }
1187
1188 Qi_Blocks_Comments_Template_Block::get_instance();
1189 }
1190