← All changes
|
includes/Admin/Customizer/Sections/FaqBuilder.php
+585
-28
4.5.5
→
4.9.3
View file →
| @@ -476,9 +476,9 @@ | ||
| 476 | 476 | [ |
| 477 | 477 | 'label' => __( 'FAQ List Background Color', 'betterdocs' ), |
| 478 | 478 | 'section' => 'betterdocs_faq_section', |
| 479 | 479 | 'settings' => 'betterdocs_faq_list_background_color', |
| 480 | - 'priority' => 636 | |
| 480 | + 'priority' => 638 | |
| 481 | 481 | ] |
| 482 | 482 | ) |
| 483 | 483 | ); |
| 484 | 484 | } |
| @@ -501,9 +501,9 @@ | ||
| 501 | 501 | [ |
| 502 | 502 | 'label' => __( 'FAQ List Content Background Color', 'betterdocs' ), |
| 503 | 503 | 'section' => 'betterdocs_faq_section', |
| 504 | 504 | 'settings' => 'betterdocs_faq_list_content_background_color', |
| 505 | - 'priority' => 637 | |
| 505 | + 'priority' => 639 | |
| 506 | 506 | ] |
| 507 | 507 | ) |
| 508 | 508 | ); |
| 509 | 509 | } |
| @@ -526,9 +526,9 @@ | ||
| 526 | 526 | [ |
| 527 | 527 | 'label' => __( 'FAQ List Content Color', 'betterdocs' ), |
| 528 | 528 | 'section' => 'betterdocs_faq_section', |
| 529 | 529 | 'settings' => 'betterdocs_faq_list_content_color', |
| 530 | - 'priority' => 638 | |
| 530 | + 'priority' => 640 | |
| 531 | 531 | ] |
| 532 | 532 | ) |
| 533 | 533 | ); |
| 534 | 534 | } |
| @@ -552,10 +552,10 @@ | ||
| 552 | 552 | [ |
| 553 | 553 | 'type' => 'betterdocs-range-value', |
| 554 | 554 | 'section' => 'betterdocs_faq_section', |
| 555 | 555 | 'settings' => 'betterdocs_faq_list_content_font_size', |
| 556 | - 'label' => __( 'FAQ Content Font Size', 'betterdocs' ), | |
| 557 | - 'priority' => 639, | |
| 556 | + 'label' => __( 'FAQ List Content Font Size', 'betterdocs' ), | |
| 557 | + 'priority' => 641, | |
| 558 | 558 | 'input_attrs' => [ |
| 559 | 559 | 'class' => '', |
| 560 | 560 | 'min' => 0, |
| 561 | 561 | 'max' => 50, |
| @@ -587,9 +587,9 @@ | ||
| 587 | 587 | 'type' => 'betterdocs-range-value', |
| 588 | 588 | 'section' => 'betterdocs_faq_section', |
| 589 | 589 | 'settings' => 'betterdocs_faq_list_font_size', |
| 590 | 590 | 'label' => __( 'FAQ List Font Size', 'betterdocs' ), |
| 591 | - 'priority' => 640, | |
| 591 | + 'priority' => 636, | |
| 592 | 592 | 'input_attrs' => [ |
| 593 | 593 | 'class' => '', |
| 594 | 594 | 'min' => 0, |
| 595 | 595 | 'max' => 50, |
| @@ -618,9 +618,9 @@ | ||
| 618 | 618 | [ |
| 619 | 619 | 'label' => __( 'FAQ List Padding (PX)', 'betterdocs' ), |
| 620 | 620 | 'section' => 'betterdocs_faq_section', |
| 621 | 621 | 'settings' => 'betterdocs_faq_list_padding', |
| 622 | - 'priority' => 641, | |
| 622 | + 'priority' => 637, | |
| 623 | 623 | 'input_fields' => [ |
| 624 | 624 | 'input1' => __( 'top', 'betterdocs' ), |
| 625 | 625 | 'input2' => __( 'right', 'betterdocs' ), |
| 626 | 626 | 'input3' => __( 'bottom', 'betterdocs' ), |
| @@ -636,8 +636,565 @@ | ||
| 636 | 636 | ) |
| 637 | 637 | ); |
| 638 | 638 | } |
| 639 | 639 | |
| 640 | + /** | |
| 641 | + * ---------------------------------------------------------------------- | |
| 642 | + * Product FAQ for WooCommerce controls. | |
| 643 | + * | |
| 644 | + * Styles the FAQ rendered on single WooCommerce product pages | |
| 645 | + * (`.betterdocs-woo-product-faq`). Only the Group Title + FAQ List | |
| 646 | + * controls are offered — the product FAQ has no section title, layout | |
| 647 | + * picker or active-group-title state, so those controls are intentionally | |
| 648 | + * omitted. Registered only when WooCommerce is active. | |
| 649 | + * ---------------------------------------------------------------------- | |
| 650 | + */ | |
| 651 | + public function section_woo_seperator() { | |
| 652 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 653 | + return; | |
| 654 | + } | |
| 655 | + | |
| 656 | + $this->customizer->add_setting( | |
| 657 | + 'betterdocs_faq_section_woo_seperator', | |
| 658 | + [ | |
| 659 | + 'default' => $this->defaults['betterdocs_faq_section_woo_seperator'], | |
| 660 | + 'sanitize_callback' => 'esc_html' | |
| 661 | + ] | |
| 662 | + ); | |
| 663 | + | |
| 664 | + $this->customizer->add_control( | |
| 665 | + new SeparatorControl( | |
| 666 | + $this->customizer, | |
| 667 | + 'betterdocs_faq_section_woo_seperator', | |
| 668 | + [ | |
| 669 | + 'label' => __( 'Product FAQ for WooCommerce', 'betterdocs' ), | |
| 670 | + 'settings' => 'betterdocs_faq_section_woo_seperator', | |
| 671 | + 'section' => 'betterdocs_faq_section', | |
| 672 | + 'priority' => 675 | |
| 673 | + ] | |
| 674 | + ) | |
| 675 | + ); | |
| 676 | + } | |
| 677 | + | |
| 678 | + public function faq_group_title_tag_woo() { | |
| 679 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 680 | + return; | |
| 681 | + } | |
| 682 | + | |
| 683 | + $this->customizer->add_setting( | |
| 684 | + 'betterdocs_faq_group_title_tag_woo', | |
| 685 | + [ | |
| 686 | + 'default' => $this->defaults['betterdocs_faq_group_title_tag_woo'], | |
| 687 | + 'capability' => 'edit_theme_options', | |
| 688 | + 'sanitize_callback' => [ $this->sanitizer, 'choices' ] | |
| 689 | + ] | |
| 690 | + ); | |
| 691 | + | |
| 692 | + $this->customizer->add_control( | |
| 693 | + new WP_Customize_Control( | |
| 694 | + $this->customizer, | |
| 695 | + 'betterdocs_faq_group_title_tag_woo', | |
| 696 | + [ | |
| 697 | + 'label' => __( 'Group Title Tag', 'betterdocs' ), | |
| 698 | + 'section' => 'betterdocs_faq_section', | |
| 699 | + 'settings' => 'betterdocs_faq_group_title_tag_woo', | |
| 700 | + 'type' => 'select', | |
| 701 | + 'choices' => [ | |
| 702 | + 'h1' => 'h1', | |
| 703 | + 'h2' => 'h2', | |
| 704 | + 'h3' => 'h3', | |
| 705 | + 'h4' => 'h4', | |
| 706 | + 'h5' => 'h5', | |
| 707 | + 'h6' => 'h6' | |
| 708 | + ], | |
| 709 | + 'priority' => 680 | |
| 710 | + ] | |
| 711 | + ) | |
| 712 | + ); | |
| 713 | + } | |
| 714 | + | |
| 715 | + public function faq_category_title_color_woo() { | |
| 716 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 717 | + return; | |
| 718 | + } | |
| 719 | + | |
| 720 | + $this->customizer->add_setting( | |
| 721 | + 'betterdocs_faq_category_title_color_woo', | |
| 722 | + [ | |
| 723 | + 'default' => $this->defaults['betterdocs_faq_category_title_color_woo'], | |
| 724 | + 'capability' => 'edit_theme_options', | |
| 725 | + 'transport' => 'postMessage', | |
| 726 | + 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 727 | + ] | |
| 728 | + ); | |
| 729 | + | |
| 730 | + $this->customizer->add_control( | |
| 731 | + new AlphaColorControl( | |
| 732 | + $this->customizer, | |
| 733 | + 'betterdocs_faq_category_title_color_woo', | |
| 734 | + [ | |
| 735 | + 'label' => __( 'Group Title Color', 'betterdocs' ), | |
| 736 | + 'section' => 'betterdocs_faq_section', | |
| 737 | + 'priority' => 681, | |
| 738 | + 'settings' => 'betterdocs_faq_category_title_color_woo' | |
| 739 | + ] | |
| 740 | + ) | |
| 741 | + ); | |
| 742 | + } | |
| 743 | + | |
| 744 | + public function faq_category_name_font_size_woo() { | |
| 745 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 746 | + return; | |
| 747 | + } | |
| 748 | + | |
| 749 | + $this->customizer->add_setting( | |
| 750 | + 'betterdocs_faq_category_name_font_size_woo', | |
| 751 | + [ | |
| 752 | + 'default' => $this->defaults['betterdocs_faq_category_name_font_size_woo'], | |
| 753 | + 'capability' => 'edit_theme_options', | |
| 754 | + 'transport' => 'postMessage', | |
| 755 | + 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 756 | + ] | |
| 757 | + ); | |
| 758 | + | |
| 759 | + $this->customizer->add_control( | |
| 760 | + new RangeValueControl( | |
| 761 | + $this->customizer, | |
| 762 | + 'betterdocs_faq_category_name_font_size_woo', | |
| 763 | + [ | |
| 764 | + 'type' => 'betterdocs-range-value', | |
| 765 | + 'section' => 'betterdocs_faq_section', | |
| 766 | + 'settings' => 'betterdocs_faq_category_name_font_size_woo', | |
| 767 | + 'label' => __( 'Group Title Font Size', 'betterdocs' ), | |
| 768 | + 'priority' => 682, | |
| 769 | + 'input_attrs' => [ | |
| 770 | + 'class' => '', | |
| 771 | + 'min' => 0, | |
| 772 | + 'max' => 50, | |
| 773 | + 'step' => 1, | |
| 774 | + 'suffix' => 'px' | |
| 775 | + ] | |
| 776 | + ] | |
| 777 | + ) | |
| 778 | + ); | |
| 779 | + } | |
| 780 | + | |
| 781 | + public function faq_category_name_padding_woo() { | |
| 782 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 783 | + return; | |
| 784 | + } | |
| 785 | + | |
| 786 | + $this->customizer->add_setting( | |
| 787 | + 'betterdocs_faq_category_name_padding_woo', | |
| 788 | + [ | |
| 789 | + 'default' => $this->defaults['betterdocs_faq_category_name_padding_woo'], | |
| 790 | + 'transport' => 'postMessage', | |
| 791 | + 'capability' => 'edit_theme_options' | |
| 792 | + ] | |
| 793 | + ); | |
| 794 | + | |
| 795 | + $this->customizer->add_control( | |
| 796 | + new MultiDimensionControl( | |
| 797 | + $this->customizer, | |
| 798 | + 'betterdocs_faq_category_name_padding_woo', | |
| 799 | + [ | |
| 800 | + 'label' => __( 'Group Title Padding (PX)', 'betterdocs' ), | |
| 801 | + 'section' => 'betterdocs_faq_section', | |
| 802 | + 'settings' => 'betterdocs_faq_category_name_padding_woo', | |
| 803 | + 'priority' => 683, | |
| 804 | + 'input_fields' => [ | |
| 805 | + 'input1' => __( 'top', 'betterdocs' ), | |
| 806 | + 'input2' => __( 'right', 'betterdocs' ), | |
| 807 | + 'input3' => __( 'bottom', 'betterdocs' ), | |
| 808 | + 'input4' => __( 'left', 'betterdocs' ) | |
| 809 | + ], | |
| 810 | + 'defaults' => [ | |
| 811 | + 'input1' => 20, | |
| 812 | + 'input2' => 0, | |
| 813 | + 'input3' => 20, | |
| 814 | + 'input4' => 0 | |
| 815 | + ] | |
| 816 | + ] | |
| 817 | + ) | |
| 818 | + ); | |
| 819 | + } | |
| 820 | + | |
| 821 | + public function faq_list_color_woo() { | |
| 822 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 823 | + return; | |
| 824 | + } | |
| 825 | + | |
| 826 | + $this->customizer->add_setting( | |
| 827 | + 'betterdocs_faq_list_color_woo', | |
| 828 | + [ | |
| 829 | + 'default' => $this->defaults['betterdocs_faq_list_color_woo'], | |
| 830 | + 'capability' => 'edit_theme_options', | |
| 831 | + 'transport' => 'postMessage', | |
| 832 | + 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 833 | + ] | |
| 834 | + ); | |
| 835 | + | |
| 836 | + $this->customizer->add_control( | |
| 837 | + new AlphaColorControl( | |
| 838 | + $this->customizer, | |
| 839 | + 'betterdocs_faq_list_color_woo', | |
| 840 | + [ | |
| 841 | + 'label' => __( 'FAQ List Color', 'betterdocs' ), | |
| 842 | + 'section' => 'betterdocs_faq_section', | |
| 843 | + 'settings' => 'betterdocs_faq_list_color_woo', | |
| 844 | + 'priority' => 684 | |
| 845 | + ] | |
| 846 | + ) | |
| 847 | + ); | |
| 848 | + } | |
| 849 | + | |
| 850 | + public function faq_list_background_color_woo() { | |
| 851 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 852 | + return; | |
| 853 | + } | |
| 854 | + | |
| 855 | + $this->customizer->add_setting( | |
| 856 | + 'betterdocs_faq_list_background_color_woo', | |
| 857 | + [ | |
| 858 | + 'default' => $this->defaults['betterdocs_faq_list_background_color_woo'], | |
| 859 | + 'capability' => 'edit_theme_options', | |
| 860 | + 'transport' => 'postMessage', | |
| 861 | + 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 862 | + ] | |
| 863 | + ); | |
| 864 | + | |
| 865 | + $this->customizer->add_control( | |
| 866 | + new AlphaColorControl( | |
| 867 | + $this->customizer, | |
| 868 | + 'betterdocs_faq_list_background_color_woo', | |
| 869 | + [ | |
| 870 | + 'label' => __( 'FAQ List Background Color', 'betterdocs' ), | |
| 871 | + 'section' => 'betterdocs_faq_section', | |
| 872 | + 'settings' => 'betterdocs_faq_list_background_color_woo', | |
| 873 | + 'priority' => 687 | |
| 874 | + ] | |
| 875 | + ) | |
| 876 | + ); | |
| 877 | + } | |
| 878 | + | |
| 879 | + public function faq_list_content_background_color_woo() { | |
| 880 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 881 | + return; | |
| 882 | + } | |
| 883 | + | |
| 884 | + $this->customizer->add_setting( | |
| 885 | + 'betterdocs_faq_list_content_background_color_woo', | |
| 886 | + [ | |
| 887 | + 'default' => $this->defaults['betterdocs_faq_list_content_background_color_woo'], | |
| 888 | + 'capability' => 'edit_theme_options', | |
| 889 | + 'transport' => 'postMessage', | |
| 890 | + 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 891 | + ] | |
| 892 | + ); | |
| 893 | + | |
| 894 | + $this->customizer->add_control( | |
| 895 | + new AlphaColorControl( | |
| 896 | + $this->customizer, | |
| 897 | + 'betterdocs_faq_list_content_background_color_woo', | |
| 898 | + [ | |
| 899 | + 'label' => __( 'FAQ List Content Background Color', 'betterdocs' ), | |
| 900 | + 'section' => 'betterdocs_faq_section', | |
| 901 | + 'settings' => 'betterdocs_faq_list_content_background_color_woo', | |
| 902 | + 'priority' => 688 | |
| 903 | + ] | |
| 904 | + ) | |
| 905 | + ); | |
| 906 | + } | |
| 907 | + | |
| 908 | + public function faq_list_content_color_woo() { | |
| 909 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 910 | + return; | |
| 911 | + } | |
| 912 | + | |
| 913 | + $this->customizer->add_setting( | |
| 914 | + 'betterdocs_faq_list_content_color_woo', | |
| 915 | + [ | |
| 916 | + 'default' => $this->defaults['betterdocs_faq_list_content_color_woo'], | |
| 917 | + 'capability' => 'edit_theme_options', | |
| 918 | + 'transport' => 'postMessage', | |
| 919 | + 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 920 | + ] | |
| 921 | + ); | |
| 922 | + | |
| 923 | + $this->customizer->add_control( | |
| 924 | + new AlphaColorControl( | |
| 925 | + $this->customizer, | |
| 926 | + 'betterdocs_faq_list_content_color_woo', | |
| 927 | + [ | |
| 928 | + 'label' => __( 'FAQ List Content Color', 'betterdocs' ), | |
| 929 | + 'section' => 'betterdocs_faq_section', | |
| 930 | + 'settings' => 'betterdocs_faq_list_content_color_woo', | |
| 931 | + 'priority' => 689 | |
| 932 | + ] | |
| 933 | + ) | |
| 934 | + ); | |
| 935 | + } | |
| 936 | + | |
| 937 | + public function faq_list_content_font_size_woo() { | |
| 938 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 939 | + return; | |
| 940 | + } | |
| 941 | + | |
| 942 | + $this->customizer->add_setting( | |
| 943 | + 'betterdocs_faq_list_content_font_size_woo', | |
| 944 | + [ | |
| 945 | + 'default' => $this->defaults['betterdocs_faq_list_content_font_size_woo'], | |
| 946 | + 'capability' => 'edit_theme_options', | |
| 947 | + 'transport' => 'postMessage', | |
| 948 | + 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 949 | + ] | |
| 950 | + ); | |
| 951 | + | |
| 952 | + $this->customizer->add_control( | |
| 953 | + new RangeValueControl( | |
| 954 | + $this->customizer, | |
| 955 | + 'betterdocs_faq_list_content_font_size_woo', | |
| 956 | + [ | |
| 957 | + 'type' => 'betterdocs-range-value', | |
| 958 | + 'section' => 'betterdocs_faq_section', | |
| 959 | + 'settings' => 'betterdocs_faq_list_content_font_size_woo', | |
| 960 | + 'label' => __( 'FAQ List Content Font Size', 'betterdocs' ), | |
| 961 | + 'priority' => 690, | |
| 962 | + 'input_attrs' => [ | |
| 963 | + 'class' => '', | |
| 964 | + 'min' => 0, | |
| 965 | + 'max' => 50, | |
| 966 | + 'step' => 1, | |
| 967 | + 'suffix' => 'px' | |
| 968 | + ] | |
| 969 | + ] | |
| 970 | + ) | |
| 971 | + ); | |
| 972 | + } | |
| 973 | + | |
| 974 | + public function faq_list_font_size_woo() { | |
| 975 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 976 | + return; | |
| 977 | + } | |
| 978 | + | |
| 979 | + $this->customizer->add_setting( | |
| 980 | + 'betterdocs_faq_list_font_size_woo', | |
| 981 | + [ | |
| 982 | + 'default' => $this->defaults['betterdocs_faq_list_font_size_woo'], | |
| 983 | + 'capability' => 'edit_theme_options', | |
| 984 | + 'transport' => 'postMessage', | |
| 985 | + 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 986 | + ] | |
| 987 | + ); | |
| 988 | + | |
| 989 | + $this->customizer->add_control( | |
| 990 | + new RangeValueControl( | |
| 991 | + $this->customizer, | |
| 992 | + 'betterdocs_faq_list_font_size_woo', | |
| 993 | + [ | |
| 994 | + 'type' => 'betterdocs-range-value', | |
| 995 | + 'section' => 'betterdocs_faq_section', | |
| 996 | + 'settings' => 'betterdocs_faq_list_font_size_woo', | |
| 997 | + 'label' => __( 'FAQ List Font Size', 'betterdocs' ), | |
| 998 | + 'priority' => 685, | |
| 999 | + 'input_attrs' => [ | |
| 1000 | + 'class' => '', | |
| 1001 | + 'min' => 0, | |
| 1002 | + 'max' => 50, | |
| 1003 | + 'step' => 1, | |
| 1004 | + 'suffix' => 'px' | |
| 1005 | + ] | |
| 1006 | + ] | |
| 1007 | + ) | |
| 1008 | + ); | |
| 1009 | + } | |
| 1010 | + | |
| 1011 | + public function faq_list_padding_woo() { | |
| 1012 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 1013 | + return; | |
| 1014 | + } | |
| 1015 | + | |
| 1016 | + $this->customizer->add_setting( | |
| 1017 | + 'betterdocs_faq_list_padding_woo', | |
| 1018 | + [ | |
| 1019 | + 'default' => $this->defaults['betterdocs_faq_list_padding_woo'], | |
| 1020 | + 'transport' => 'postMessage', | |
| 1021 | + 'capability' => 'edit_theme_options' | |
| 1022 | + ] | |
| 1023 | + ); | |
| 1024 | + | |
| 1025 | + $this->customizer->add_control( | |
| 1026 | + new MultiDimensionControl( | |
| 1027 | + $this->customizer, | |
| 1028 | + 'betterdocs_faq_list_padding_woo', | |
| 1029 | + [ | |
| 1030 | + 'label' => __( 'FAQ List Padding (PX)', 'betterdocs' ), | |
| 1031 | + 'section' => 'betterdocs_faq_section', | |
| 1032 | + 'settings' => 'betterdocs_faq_list_padding_woo', | |
| 1033 | + 'priority' => 686, | |
| 1034 | + 'input_fields' => [ | |
| 1035 | + 'input1' => __( 'top', 'betterdocs' ), | |
| 1036 | + 'input2' => __( 'right', 'betterdocs' ), | |
| 1037 | + 'input3' => __( 'bottom', 'betterdocs' ), | |
| 1038 | + 'input4' => __( 'left', 'betterdocs' ) | |
| 1039 | + ], | |
| 1040 | + 'defaults' => [ | |
| 1041 | + 'input1' => 20, | |
| 1042 | + 'input2' => 20, | |
| 1043 | + 'input3' => 20, | |
| 1044 | + 'input4' => 20 | |
| 1045 | + ] | |
| 1046 | + ] | |
| 1047 | + ) | |
| 1048 | + ); | |
| 1049 | + } | |
| 1050 | + | |
| 1051 | + public function faq_group_border_width_woo() { | |
| 1052 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 1053 | + return; | |
| 1054 | + } | |
| 1055 | + | |
| 1056 | + $this->customizer->add_setting( | |
| 1057 | + 'betterdocs_faq_group_border_width_woo', | |
| 1058 | + [ | |
| 1059 | + 'default' => $this->defaults['betterdocs_faq_group_border_width_woo'], | |
| 1060 | + 'capability' => 'edit_theme_options', | |
| 1061 | + 'transport' => 'postMessage', | |
| 1062 | + 'sanitize_callback' => [ $this->sanitizer, 'integer' ] | |
| 1063 | + ] | |
| 1064 | + ); | |
| 1065 | + | |
| 1066 | + $this->customizer->add_control( | |
| 1067 | + new RangeValueControl( | |
| 1068 | + $this->customizer, | |
| 1069 | + 'betterdocs_faq_group_border_width_woo', | |
| 1070 | + [ | |
| 1071 | + 'type' => 'betterdocs-range-value', | |
| 1072 | + 'section' => 'betterdocs_faq_section', | |
| 1073 | + 'settings' => 'betterdocs_faq_group_border_width_woo', | |
| 1074 | + 'label' => __( 'FAQ Group Border Width', 'betterdocs' ), | |
| 1075 | + 'priority' => 676, | |
| 1076 | + 'input_attrs' => [ | |
| 1077 | + 'class' => '', | |
| 1078 | + 'min' => 0, | |
| 1079 | + 'max' => 20, | |
| 1080 | + 'step' => 1, | |
| 1081 | + 'suffix' => 'px' | |
| 1082 | + ] | |
| 1083 | + ] | |
| 1084 | + ) | |
| 1085 | + ); | |
| 1086 | + } | |
| 1087 | + | |
| 1088 | + public function faq_group_border_color_woo() { | |
| 1089 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 1090 | + return; | |
| 1091 | + } | |
| 1092 | + | |
| 1093 | + $this->customizer->add_setting( | |
| 1094 | + 'betterdocs_faq_group_border_color_woo', | |
| 1095 | + [ | |
| 1096 | + 'default' => $this->defaults['betterdocs_faq_group_border_color_woo'], | |
| 1097 | + 'capability' => 'edit_theme_options', | |
| 1098 | + 'transport' => 'postMessage', | |
| 1099 | + 'sanitize_callback' => [ $this->sanitizer, 'rgba' ] | |
| 1100 | + ] | |
| 1101 | + ); | |
| 1102 | + | |
| 1103 | + $this->customizer->add_control( | |
| 1104 | + new AlphaColorControl( | |
| 1105 | + $this->customizer, | |
| 1106 | + 'betterdocs_faq_group_border_color_woo', | |
| 1107 | + [ | |
| 1108 | + 'label' => __( 'FAQ Group Border Color', 'betterdocs' ), | |
| 1109 | + 'section' => 'betterdocs_faq_section', | |
| 1110 | + 'settings' => 'betterdocs_faq_group_border_color_woo', | |
| 1111 | + 'priority' => 677 | |
| 1112 | + ] | |
| 1113 | + ) | |
| 1114 | + ); | |
| 1115 | + } | |
| 1116 | + | |
| 1117 | + public function faq_group_padding_woo() { | |
| 1118 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 1119 | + return; | |
| 1120 | + } | |
| 1121 | + | |
| 1122 | + $this->customizer->add_setting( | |
| 1123 | + 'betterdocs_faq_group_padding_woo', | |
| 1124 | + [ | |
| 1125 | + 'default' => $this->defaults['betterdocs_faq_group_padding_woo'], | |
| 1126 | + 'transport' => 'postMessage', | |
| 1127 | + 'capability' => 'edit_theme_options' | |
| 1128 | + ] | |
| 1129 | + ); | |
| 1130 | + | |
| 1131 | + $this->customizer->add_control( | |
| 1132 | + new MultiDimensionControl( | |
| 1133 | + $this->customizer, | |
| 1134 | + 'betterdocs_faq_group_padding_woo', | |
| 1135 | + [ | |
| 1136 | + 'label' => __( 'FAQ Group Padding (PX)', 'betterdocs' ), | |
| 1137 | + 'section' => 'betterdocs_faq_section', | |
| 1138 | + 'settings' => 'betterdocs_faq_group_padding_woo', | |
| 1139 | + 'priority' => 678, | |
| 1140 | + 'input_fields' => [ | |
| 1141 | + 'input1' => __( 'top', 'betterdocs' ), | |
| 1142 | + 'input2' => __( 'right', 'betterdocs' ), | |
| 1143 | + 'input3' => __( 'bottom', 'betterdocs' ), | |
| 1144 | + 'input4' => __( 'left', 'betterdocs' ) | |
| 1145 | + ], | |
| 1146 | + 'defaults' => [ | |
| 1147 | + 'input1' => 0, | |
| 1148 | + 'input2' => 0, | |
| 1149 | + 'input3' => 0, | |
| 1150 | + 'input4' => 0 | |
| 1151 | + ] | |
| 1152 | + ] | |
| 1153 | + ) | |
| 1154 | + ); | |
| 1155 | + } | |
| 1156 | + | |
| 1157 | + public function faq_group_margin_woo() { | |
| 1158 | + if ( ! class_exists( 'WooCommerce' ) ) { | |
| 1159 | + return; | |
| 1160 | + } | |
| 1161 | + | |
| 1162 | + $this->customizer->add_setting( | |
| 1163 | + 'betterdocs_faq_group_margin_woo', | |
| 1164 | + [ | |
| 1165 | + 'default' => $this->defaults['betterdocs_faq_group_margin_woo'], | |
| 1166 | + 'transport' => 'postMessage', | |
| 1167 | + 'capability' => 'edit_theme_options' | |
| 1168 | + ] | |
| 1169 | + ); | |
| 1170 | + | |
| 1171 | + $this->customizer->add_control( | |
| 1172 | + new MultiDimensionControl( | |
| 1173 | + $this->customizer, | |
| 1174 | + 'betterdocs_faq_group_margin_woo', | |
| 1175 | + [ | |
| 1176 | + 'label' => __( 'FAQ Group Margin (PX)', 'betterdocs' ), | |
| 1177 | + 'section' => 'betterdocs_faq_section', | |
| 1178 | + 'settings' => 'betterdocs_faq_group_margin_woo', | |
| 1179 | + 'priority' => 679, | |
| 1180 | + 'input_fields' => [ | |
| 1181 | + 'input1' => __( 'top', 'betterdocs' ), | |
| 1182 | + 'input2' => __( 'right', 'betterdocs' ), | |
| 1183 | + 'input3' => __( 'bottom', 'betterdocs' ), | |
| 1184 | + 'input4' => __( 'left', 'betterdocs' ) | |
| 1185 | + ], | |
| 1186 | + 'defaults' => [ | |
| 1187 | + 'input1' => 0, | |
| 1188 | + 'input2' => 0, | |
| 1189 | + 'input3' => 20, | |
| 1190 | + 'input4' => 0 | |
| 1191 | + ] | |
| 1192 | + ] | |
| 1193 | + ) | |
| 1194 | + ); | |
| 1195 | + } | |
| 1196 | + | |
| 640 | 1197 | public function faq_category_title_color_layout_2() { |
| 641 | 1198 | $this->customizer->add_setting( |
| 642 | 1199 | 'betterdocs_faq_category_title_color_layout_2', |
| 643 | 1200 | [ |
| @@ -775,9 +1332,9 @@ | ||
| 775 | 1332 | [ |
| 776 | 1333 | 'label' => __( 'FAQ List Background Color', 'betterdocs' ), |
| 777 | 1334 | 'section' => 'betterdocs_faq_section', |
| 778 | 1335 | 'settings' => 'betterdocs_faq_list_background_color_layout_2', |
| 779 | - 'priority' => 646 | |
| 1336 | + 'priority' => 648 | |
| 780 | 1337 | ] |
| 781 | 1338 | ) |
| 782 | 1339 | ); |
| 783 | 1340 | } |
| @@ -800,9 +1357,9 @@ | ||
| 800 | 1357 | [ |
| 801 | 1358 | 'label' => __( 'FAQ List Content Background Color', 'betterdocs' ), |
| 802 | 1359 | 'section' => 'betterdocs_faq_section', |
| 803 | 1360 | 'settings' => 'betterdocs_faq_list_content_background_color_layout_2', |
| 804 | - 'priority' => 647 | |
| 1361 | + 'priority' => 649 | |
| 805 | 1362 | ] |
| 806 | 1363 | ) |
| 807 | 1364 | ); |
| 808 | 1365 | } |
| @@ -825,9 +1382,9 @@ | ||
| 825 | 1382 | [ |
| 826 | 1383 | 'label' => __( 'FAQ List Content Color', 'betterdocs' ), |
| 827 | 1384 | 'section' => 'betterdocs_faq_section', |
| 828 | 1385 | 'settings' => 'betterdocs_faq_list_content_color_layout_2', |
| 829 | - 'priority' => 648 | |
| 1386 | + 'priority' => 650 | |
| 830 | 1387 | ] |
| 831 | 1388 | ) |
| 832 | 1389 | ); |
| 833 | 1390 | } |
| @@ -850,10 +1407,10 @@ | ||
| 850 | 1407 | [ |
| 851 | 1408 | 'type' => 'betterdocs-range-value', |
| 852 | 1409 | 'section' => 'betterdocs_faq_section', |
| 853 | 1410 | 'settings' => 'betterdocs_faq_list_content_font_size_layout_2', |
| 854 | - 'label' => __( 'FAQ Content Font Size', 'betterdocs' ), | |
| 855 | - 'priority' => 649, | |
| 1411 | + 'label' => __( 'FAQ List Content Font Size', 'betterdocs' ), | |
| 1412 | + 'priority' => 651, | |
| 856 | 1413 | 'input_attrs' => [ |
| 857 | 1414 | 'class' => '', |
| 858 | 1415 | 'min' => 0, |
| 859 | 1416 | 'max' => 50, |
| @@ -885,9 +1442,9 @@ | ||
| 885 | 1442 | 'type' => 'betterdocs-range-value', |
| 886 | 1443 | 'section' => 'betterdocs_faq_section', |
| 887 | 1444 | 'settings' => 'betterdocs_faq_list_font_size_layout_2', |
| 888 | 1445 | 'label' => __( 'FAQ List Font Size', 'betterdocs' ), |
| 889 | - 'priority' => 650, | |
| 1446 | + 'priority' => 646, | |
| 890 | 1447 | 'input_attrs' => [ |
| 891 | 1448 | 'class' => '', |
| 892 | 1449 | 'min' => 0, |
| 893 | 1450 | 'max' => 50, |
| @@ -917,9 +1474,9 @@ | ||
| 917 | 1474 | [ |
| 918 | 1475 | 'label' => __( 'FAQ List Padding (PX)', 'betterdocs' ), |
| 919 | 1476 | 'section' => 'betterdocs_faq_section', |
| 920 | 1477 | 'settings' => 'betterdocs_faq_list_padding_layout_2', |
| 921 | - 'priority' => 651, | |
| 1478 | + 'priority' => 647, | |
| 922 | 1479 | 'input_fields' => [ |
| 923 | 1480 | 'input1' => __( 'top', 'betterdocs' ), |
| 924 | 1481 | 'input2' => __( 'right', 'betterdocs' ), |
| 925 | 1482 | 'input3' => __( 'bottom', 'betterdocs' ), |
| @@ -1074,9 +1631,9 @@ | ||
| 1074 | 1631 | [ |
| 1075 | 1632 | 'label' => __( 'FAQ List Background Color', 'betterdocs' ), |
| 1076 | 1633 | 'section' => 'betterdocs_faq_section', |
| 1077 | 1634 | 'settings' => 'betterdocs_faq_list_background_color_layout_3', |
| 1078 | - 'priority' => 656 | |
| 1635 | + 'priority' => 658 | |
| 1079 | 1636 | ] |
| 1080 | 1637 | ) |
| 1081 | 1638 | ); |
| 1082 | 1639 | } |
| @@ -1099,9 +1656,9 @@ | ||
| 1099 | 1656 | [ |
| 1100 | 1657 | 'label' => __( 'FAQ List Content Background Color', 'betterdocs' ), |
| 1101 | 1658 | 'section' => 'betterdocs_faq_section', |
| 1102 | 1659 | 'settings' => 'betterdocs_faq_list_content_background_color_layout_3', |
| 1103 | - 'priority' => 657 | |
| 1660 | + 'priority' => 659 | |
| 1104 | 1661 | ] |
| 1105 | 1662 | ) |
| 1106 | 1663 | ); |
| 1107 | 1664 | } |
| @@ -1124,9 +1681,9 @@ | ||
| 1124 | 1681 | [ |
| 1125 | 1682 | 'label' => __( 'FAQ List Content Color', 'betterdocs' ), |
| 1126 | 1683 | 'section' => 'betterdocs_faq_section', |
| 1127 | 1684 | 'settings' => 'betterdocs_faq_list_content_color_layout_3', |
| 1128 | - 'priority' => 658 | |
| 1685 | + 'priority' => 660 | |
| 1129 | 1686 | ] |
| 1130 | 1687 | ) |
| 1131 | 1688 | ); |
| 1132 | 1689 | } |
| @@ -1150,10 +1707,10 @@ | ||
| 1150 | 1707 | [ |
| 1151 | 1708 | 'type' => 'betterdocs-range-value', |
| 1152 | 1709 | 'section' => 'betterdocs_faq_section', |
| 1153 | 1710 | 'settings' => 'betterdocs_faq_list_content_font_size_layout_3', |
| 1154 | - 'label' => __( 'FAQ Content Font Size', 'betterdocs' ), | |
| 1155 | - 'priority' => 659, | |
| 1711 | + 'label' => __( 'FAQ List Content Font Size', 'betterdocs' ), | |
| 1712 | + 'priority' => 661, | |
| 1156 | 1713 | 'input_attrs' => [ |
| 1157 | 1714 | 'class' => '', |
| 1158 | 1715 | 'min' => 0, |
| 1159 | 1716 | 'max' => 50, |
| @@ -1185,9 +1742,9 @@ | ||
| 1185 | 1742 | 'type' => 'betterdocs-range-value', |
| 1186 | 1743 | 'section' => 'betterdocs_faq_section', |
| 1187 | 1744 | 'settings' => 'betterdocs_faq_list_font_size_layout_3', |
| 1188 | 1745 | 'label' => __( 'FAQ List Font Size', 'betterdocs' ), |
| 1189 | - 'priority' => 660, | |
| 1746 | + 'priority' => 656, | |
| 1190 | 1747 | 'input_attrs' => [ |
| 1191 | 1748 | 'class' => '', |
| 1192 | 1749 | 'min' => 0, |
| 1193 | 1750 | 'max' => 50, |
| @@ -1216,9 +1773,9 @@ | ||
| 1216 | 1773 | [ |
| 1217 | 1774 | 'label' => __( 'FAQ List Padding (PX)', 'betterdocs' ), |
| 1218 | 1775 | 'section' => 'betterdocs_faq_section', |
| 1219 | 1776 | 'settings' => 'betterdocs_faq_list_padding_layout_3', |
| 1220 | - 'priority' => 661, | |
| 1777 | + 'priority' => 657, | |
| 1221 | 1778 | 'input_fields' => [ |
| 1222 | 1779 | 'input1' => __( 'top', 'betterdocs' ), |
| 1223 | 1780 | 'input2' => __( 'right', 'betterdocs' ), |
| 1224 | 1781 | 'input3' => __( 'bottom', 'betterdocs' ), |
| @@ -1423,9 +1980,9 @@ | ||
| 1423 | 1980 | [ |
| 1424 | 1981 | 'label' => __( 'FAQ List Background Color', 'betterdocs' ), |
| 1425 | 1982 | 'section' => 'betterdocs_faq_section', |
| 1426 | 1983 | 'settings' => 'betterdocs_faq_list_background_color_layout_4', |
| 1427 | - 'priority' => 666 | |
| 1984 | + 'priority' => 668 | |
| 1428 | 1985 | ] |
| 1429 | 1986 | ) |
| 1430 | 1987 | ); |
| 1431 | 1988 | } |
| @@ -1448,9 +2005,9 @@ | ||
| 1448 | 2005 | [ |
| 1449 | 2006 | 'label' => __( 'FAQ List Content Background Color', 'betterdocs' ), |
| 1450 | 2007 | 'section' => 'betterdocs_faq_section', |
| 1451 | 2008 | 'settings' => 'betterdocs_faq_list_content_background_color_layout_4', |
| 1452 | - 'priority' => 667 | |
| 2009 | + 'priority' => 669 | |
| 1453 | 2010 | ] |
| 1454 | 2011 | ) |
| 1455 | 2012 | ); |
| 1456 | 2013 | } |
| @@ -1473,9 +2030,9 @@ | ||
| 1473 | 2030 | [ |
| 1474 | 2031 | 'label' => __( 'FAQ List Content Color', 'betterdocs' ), |
| 1475 | 2032 | 'section' => 'betterdocs_faq_section', |
| 1476 | 2033 | 'settings' => 'betterdocs_faq_list_content_color_layout_4', |
| 1477 | - 'priority' => 668 | |
| 2034 | + 'priority' => 670 | |
| 1478 | 2035 | ] |
| 1479 | 2036 | ) |
| 1480 | 2037 | ); |
| 1481 | 2038 | } |
| @@ -1499,10 +2056,10 @@ | ||
| 1499 | 2056 | [ |
| 1500 | 2057 | 'type' => 'betterdocs-range-value', |
| 1501 | 2058 | 'section' => 'betterdocs_faq_section', |
| 1502 | 2059 | 'settings' => 'betterdocs_faq_list_content_font_size_layout_4', |
| 1503 | - 'label' => __( 'FAQ Content Font Size', 'betterdocs' ), | |
| 1504 | - 'priority' => 669, | |
| 2060 | + 'label' => __( 'FAQ List Content Font Size', 'betterdocs' ), | |
| 2061 | + 'priority' => 671, | |
| 1505 | 2062 | 'input_attrs' => [ |
| 1506 | 2063 | 'class' => '', |
| 1507 | 2064 | 'min' => 0, |
| 1508 | 2065 | 'max' => 50, |
| @@ -1534,9 +2091,9 @@ | ||
| 1534 | 2091 | 'type' => 'betterdocs-range-value', |
| 1535 | 2092 | 'section' => 'betterdocs_faq_section', |
| 1536 | 2093 | 'settings' => 'betterdocs_faq_list_font_size_layout_4', |
| 1537 | 2094 | 'label' => __( 'FAQ List Font Size', 'betterdocs' ), |
| 1538 | - 'priority' => 670, | |
| 2095 | + 'priority' => 666, | |
| 1539 | 2096 | 'input_attrs' => [ |
| 1540 | 2097 | 'class' => '', |
| 1541 | 2098 | 'min' => 0, |
| 1542 | 2099 | 'max' => 50, |
| @@ -1565,9 +2122,9 @@ | ||
| 1565 | 2122 | [ |
| 1566 | 2123 | 'label' => __( 'FAQ List Padding (PX)', 'betterdocs' ), |
| 1567 | 2124 | 'section' => 'betterdocs_faq_section', |
| 1568 | 2125 | 'settings' => 'betterdocs_faq_list_padding_layout_3', |
| 1569 | - 'priority' => 671, | |
| 2126 | + 'priority' => 667, | |
| 1570 | 2127 | 'input_fields' => [ |
| 1571 | 2128 | 'input1' => __( 'top', 'betterdocs' ), |
| 1572 | 2129 | 'input2' => __( 'right', 'betterdocs' ), |
| 1573 | 2130 | 'input3' => __( 'bottom', 'betterdocs' ), |