<?php
/**
 * Add a custom tab to the Divi Theme Options panel tabs.
 *
 * @param array $tabs
 *
 * @return array
 */
if (!function_exists('pac_drh_epanel_tabs')):
    function pac_drh_epanel_tabs($tabs)
    {
        return array_merge($tabs, ['drh' => __('Divi Responsive Helper', 'divi-responsive-helper')]);
    }

    add_filter("et_epanel_tab_names", 'pac_drh_epanel_tabs');
endif;
/**
 * Add custom fields to Divi ePanel.
 *
 * @param array $options
 *
 * @return array
 */
if (!function_exists('pac_drh_epanel_fields')):
    function pac_drh_epanel_fields($options)
    {

        $options[] = [
            "name" => "wrap-drh",
            "type" => "contenttab-wrapstart",
        ];
        $options[] = [
            "type" => "subnavtab-start",
        ];
        $options[] = [
            "name" => "drh-0",
            "type" => "subnav-tab",
            "desc" => __("Custom Breakpoints", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-1",
            "type" => "subnav-tab",
            "desc" => __("Preview Size", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-2",
            "type" => "subnav-tab",
            "desc" => __("Widow Fixer", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-3",
            "type" => "subnav-tab",
            "desc" => __("Column Stacking", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-4",
            "type" => "subnav-tab",
            "desc" => __("Typography", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-5",
            "type" => "subnav-tab",
            "desc" => __("Menu", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-6",
            "type" => "subnav-tab",
            "desc" => __("CSS Media Queries", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-7",
            "type" => "subnav-tab",
            "desc" => __("Layout", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-8",
            "type" => "subnav-tab",
            "desc" => __("Miscellaneous", 'divi-responsive-helper')
        ];
        $options[] = [
            "name" => "drh-9",
            "type" => "subnav-tab",
            "desc" => __("Plugin Data", 'divi-responsive-helper')
        ];
        $options[] = [
            "type" => "subnavtab-end",
        ];
        $options[] = [
            "name" => "drh-0",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Change Desktop Breakpoint (Default 981px)', 'divi-responsive-helper'),
            "id" => "pac_drh_custom_breakpoint_1",
            "type" => "text",
            "std" => "",
            "desc" => __("Enter a number (without 'px') to change the pixel value of the breakpoint where your design switches from Desktop to Tablet layout. The default is 981px, but you can customize it to fit your design needs.", 'divi-responsive-helper'),

        ];
        $options[] = [
            "name" => __('Change Phone Breakpoint (Default 767px)', 'divi-responsive-helper'),
            "id" => "pac_drh_custom_breakpoint_2",
            "type" => "text",
            "std" => "",
            "desc" => __("Enter a number (without 'px') to change the pixel value of the breakpoint where your design switches from Tablet to Phone layout. The default is 767px, but you can customize it to fit your design needs.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-0",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-1",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Preview Size Presets', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_presets",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to show the preview size preset buttons in the Visual Builder page settings (located in the bottom left corner by default).", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Phone Preset Button One', 'divi-responsive-helper'),
            "id" => "pac_drh_phone_preset_one",
            "type" => "text",
            "std" => "320",
            "desc" => __("Enter a custom value for the 1st preview size preset button in the Phone view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Phone Preset Button Two', 'divi-responsive-helper'),
            "id" => "pac_drh_phone_preset_two",
            "type" => "text",
            "std" => "479",
            "desc" => __("Enter a custom value for the 2nd preview size preset button in the Phone view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Phone Preset Button Three', 'divi-responsive-helper'),
            "id" => "pac_drh_phone_preset_three",
            "type" => "text",
            "std" => "767",
            "desc" => __("Enter a custom value for the 3rd preview size preset button in the Phone view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Tablet Preset Button One', 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_preset_one",
            "type" => "text",
            "std" => "768",
            "desc" => __("Enter a custom value for the 1st preview size preset button in the Tablet view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Tablet Preset Button Two', 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_preset_two",
            "type" => "text",
            "std" => "880",
            "desc" => __("Enter a custom value for the 2nd preview size preset button in the Tablet view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Tablet Preset Button Three', 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_preset_three",
            "type" => "text",
            "std" => "980",
            "desc" => __("Enter a custom value for the 3rd preview size preset button in the Tablet view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Desktop Preset Button One', 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_preset_one",
            "type" => "text",
            "std" => "982",
            "desc" => __("Enter a custom value for the 1st preview size preset button in the Desktop view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Desktop Preset Button Two', 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_preset_two",
            "type" => "text",
            "std" => "1024",
            "desc" => __("Enter a custom value for the 2nd preview size preset button in the Desktop view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Desktop Preset Button Three', 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_preset_three",
            "type" => "text",
            "std" => "1200",
            "desc" => __("Enter a custom value for the 3rd preview size preset button in the Desktop view.", 'divi-responsive-helper'),
            "validation_type" => "number"
        ];
        $options[] = [
            "name" => __('Preview Size Custom Value', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_custom_preview",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => 'Enable this feature to show the preview size custom value field in the Visual Builder page settings (located in the bottom left corner by default).',
        ];
        $options[] = [
            "name" => __('Disable Divi Responsive Views Settings', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_hide_responsive_view",
            "type" => "checkbox2",
            "std" => "on",
            "desc" => __("Enable this feature to completely remove the default Divi Responsive Views settings.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Show Viewport Size', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_view_port_size",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to add the current viewport width and height size in the Visual Builder page settings.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Show Viewport Size In Admin Bar', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_viewport_adminbar",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to show the current viewport width and height size in the admin bar in the top right corner.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-1",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-2",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Widow Fixer', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_widow_fixer",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable the Widow Fixer feature.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Paragraphs', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_paragraph_widow_fixer",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to remove the widow words on the last line of paragraph text.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Minimum Paragraph Widow Words', 'divi-responsive-helper'),
            "id" => "pac_drh_widow_fixer_paragraph_select",
            "type" => "select",
            "std" => "asc",
            "options" => [2, 3, 4],
            "desc" => __(" Select the minimum number of words allowed on the last line of each paragraph.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Headings', 'divi-responsive-helper'),
            "id" => "pac_drh_widow_fixer_headings",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable the Widow Fixer feature for headings (H1-H6).", 'divi-responsive-helper'),
            "class" => 'my_class',
        ];
        $options[] = [
            "name" => __('Minimum Heading Widow Words', 'divi-responsive-helper'),
            "id" => "pac_drh_widow_fixer_heading_select",
            "type" => "select",
            "std" => "asc",
            "options" => [2, 3, 4],
            "desc" => __(" Select the minimum number of words allowed on the last line of each heading.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Exclude Pages', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_pages_widow_fixer",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to excluded the Widow Fixer on selected pages.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Select Pages To Exclude', 'divi-responsive-helper'),
            "id" => "pac_drh_pages_widow_fixer",
            "type" => "checkboxes",
            "desc" => __("Choose which pages you want to include or exclude from the Widow Fixer settings. The Widow Fixer will apply to all pages marked with a checkmark, and all pages marked with an X will be excluded.", 'divi-responsive-helper'),
            "usefor" => "pages",
            "options" => pac_drh_get_pages_list(),
        ];
        $options[] = [
            "name" => __('Exclude Sections, Rows, or Modules', 'divi-responsive-helper'),
            "id" => "pac_drh_exclude_widow_fixer",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("This feature requires you to add a CSS class to the section, row, or module that you want to exclude from the Widow Fixer. To do this, simply open the settings of that element and go to the Advanced tab. There you will see a toggle called CSS ID & Classes. Open that toggle and place the CSS class “exclude-drh-widow-fixer” into the CSS Class input field.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-2",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-3",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Row Column Stacking Order', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_col_stacking",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the additional settings located in the Advanced tab of the Divi Builder Row and Column settings for choosing the order in which columns stack on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Row Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the additional settings located in the Advanced tab of the Divi Builder Row settings for choosing the number of columns to show on each device. ", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Blog Module Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_blog_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the additional settings located in the Design tab of the Divi Blog module settings when the Grid Layout is used for choosing the number of blog columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Portfolio Modules Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_portfolio_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the additional settings located in the Design tab of both the Divi Portfolio module and Divi Filterable Portfolio module settings when the Grid Layout is used for choosing the number of portfolio columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Gallery Module Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_gallery_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the additional settings located in the Design tab of the Divi Gallery module settings when the Grid Layout is used for choosing the number of image columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Woo Products Module Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_shop_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the additional settings located in the Content tab of the Divi Woo Products module settings for choosing the number of product columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Woo Related Products Module Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_related_products_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the missing responsive number of columns of the Divi Woo Related Products module settings for choosing the number of product columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Woo Cross Sells Module Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_crosssells_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the missing responsive number of columns of the Divi Woo Cross Sells module settings for choosing the number of product columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Woo Product Upsell Module Number of Columns', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_upsells_number_of_columns",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate the missing responsive number of columns of the Divi Woo Product Upsell module settings for choosing the number of product columns to show on each device.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-3",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-4",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Text Sizes', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_text_sizes",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to set the heading (H1, H2, H3, H4, H5, H6) and paragraph text sizes to apply across the entire website on Desktop, Tablet, and Phone.", 'divi-responsive-helper'),
        ];
        $desktop_heading = absint(et_get_option('body_header_size', '42'));
        $tablet_heading = absint(et_get_option('tablet_header_font_size', '38'));
        $phone_heading = absint(et_get_option('phone_header_font_size', '34'));
        $heading_line_height = (float)et_get_option('body_font_height', '1.7');
        $options[] = [
            "name" => __('H1 Heading Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_h1_desktop",
            "type" => "text",
            "std" => $desktop_heading.'px',
            "desc" => __("Set the H1 heading text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H1 Heading Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_h1_tablet",
            "type" => "text",
            "std" => $tablet_heading.'px',
            "desc" => __("Set the H1 heading text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H1 Heading Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_h1_phone",
            "type" => "text",
            "std" => $phone_heading.'px',
            "desc" => __("Set the H1 heading text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H1 Heading Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_h1_line_height",
            "type" => "text",
            "std" => $heading_line_height.'em',
            "desc" => __("Set the H1 heading line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H2 Heading Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_h2_desktop",
            "type" => "text",
            "std" => esc_html((int)($desktop_heading * .86)).'px',
            "desc" => __("Set the H2 heading text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H2 Heading Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_h2_tablet",
            "type" => "text",
            "std" => esc_html((int)($tablet_heading * .86)).'px',
            "desc" => __("Set the H2 heading text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H2 Heading Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_h2_phone",
            "type" => "text",
            "std" => esc_html((int)($phone_heading * .86)).'px',
            "desc" => __("Set the H2 heading text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H2 Heading Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_h2_line_height",
            "type" => "text",
            "std" => $heading_line_height * .86 .'em',
            "desc" => __("Set the H2 heading line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H3 Heading Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_h3_desktop",
            "type" => "text",
            "std" => esc_html((int)($desktop_heading * .73)).'px',
            "desc" => __("Set the H3 heading text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H3 Heading Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_h3_tablet",
            "type" => "text",
            "std" => esc_html((int)($tablet_heading * .73)).'px',
            "desc" => __("Set the H3 heading text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H3 Heading Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_h3_phone",
            "type" => "text",
            "std" => esc_html((int)($phone_heading * .73)).'px',
            "desc" => __("Set the H3 heading text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H3 Heading Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_h3_line_height",
            "type" => "text",
            "std" => $heading_line_height * .73 .'em',
            "desc" => __("Set the H3 heading line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H4 Heading Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_h4_desktop",
            "type" => "text",
            "std" => esc_html((int)($desktop_heading * .6)).'px',
            "desc" => __("Set the H4 heading text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H4 Heading Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_h4_tablet",
            "type" => "text",
            "std" => esc_html((int)($tablet_heading * .6)).'px',
            "desc" => __("Set the H4 heading text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H4 Heading Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_h4_phone",
            "type" => "text",
            "std" => esc_html((int)($phone_heading * .6)).'px',
            "desc" => __("Set the H4 heading text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H4 Heading Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_h4_line_height",
            "type" => "text",
            "std" => $heading_line_height * .6 .'em',
            "desc" => __("Set the H4 heading line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H5 Heading Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_h5_desktop",
            "type" => "text",
            "std" => esc_html((int)($desktop_heading * .53)).'px',
            "desc" => __("Set the H5 heading text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H5 Heading Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_h5_tablet",
            "type" => "text",
            "std" => esc_html((int)($tablet_heading * .53)).'px',
            "desc" => __("Set the H5 heading text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H5 Heading Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_h5_phone",
            "type" => "text",
            "std" => esc_html((int)($phone_heading * .53)).'px',
            "desc" => __("Set the H5 heading text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H5 Heading Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_h5_line_height",
            "type" => "text",
            "std" => $heading_line_height * .53 .'em',
            "desc" => __("Set the H5 heading line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H6 Heading Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_h6_desktop",
            "type" => "text",
            "std" => esc_html((int)($desktop_heading * .47)).'px',
            "desc" => __("Set the H6 heading text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H6 Heading Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_h6_tablet",
            "type" => "text",
            "std" => esc_html((int)($tablet_heading * .47)).'px',
            "desc" => __("Set the H6 heading text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H6 Heading Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_h6_phone",
            "type" => "text",
            "std" => esc_html((int)($phone_heading * .47)).'px',
            "desc" => __("Set the H6 heading text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('H6 Heading Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_h6_line_height",
            "type" => "text",
            "std" => $heading_line_height * .47 .'em',
            "desc" => __("Set the H6 heading line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Paragraph Text Size - Desktop', 'divi-responsive-helper'),
            "id" => "pac_drh_p_desktop",
            "type" => "text",
            "std" => absint(et_get_option('body_font_size', '20')).'px',
            "desc" => __("Set the paragraph text size value and unit to apply across the entire website on Desktop.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Paragraph Text Size - Tablet', 'divi-responsive-helper'),
            "id" => "pac_drh_p_tablet",
            "type" => "text",
            "std" => absint(et_get_option('tablet_body_font_size', '18')).'px',
            "desc" => __("Set the paragraph text size value and unit to apply across the entire website on Tablet.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Paragraph Text Size - Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_p_phone",
            "type" => "text",
            "std" => absint(et_get_option('phone_body_font_size', '16')).'px',
            "desc" => __("Set the paragraph text size value and unit to apply across the entire website on Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Paragraph Line Height', 'divi-responsive-helper'),
            "id" => "pac_drh_p_line_height",
            "type" => "text",
            "std" => $heading_line_height.'em',
            "desc" => __("Set the paragraph line height value and unit to apply across the entire website.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-4",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-5",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Show/Hide Menu Items Per Device', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_show_hide_menu_item",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to add new checkmarks in the WordPress navigation menu items to show or hide the menu items on Desktop, Tablet, or Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Enable Settings In Menu Module', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_menu_module_settings",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to enable all the menu related settings in the Divi Menu module.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Enable Settings For Default Header Menu', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_default_menu_settings",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to enable all menu related settings for the default Divi header menu.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Show X Icon When Opened (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_open_mobile_icon",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Change the mobile menu hamburger icon to an X when the menu it is toggled open.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Show A Hamburger Menu On Desktop (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_hamburger_menu_desktop",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to replace the open Desktop menu with a hamburger menu instead.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Add Text Beside Hamburger Menu Icon (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_hamburger_menu_text",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Add custom text to the left side of the hamburger menu icon.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Hamburger Menu Text (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_hamburger_header_menu_text",
            "type" => "text",
            "std" => __('Menu', 'divi-responsive-helper'),
            "desc" => __("Enter custom text to show on the left side of the hamburger menu.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Collapse Mobile Menu Submenus (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_collapse_mobile_submenus",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to collapse the submenu by default.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __("Collapsible Submenu Icon Color", 'divi-responsive-helper'),
            "id" => "pac_drh_collapse_icon_color",
            "type" => "et_color_palette",
            "items_amount" => 1,
            "std" => '#2ea3f2',
            "desc" => __("Pick a color for the collapsible submenus icon.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __("Collapsible Submenu Icon Background Color", 'divi-responsive-helper'),
            "id" => "pac_drh_collapse_icon_bg_color",
            "type" => "et_color_palette",
            "items_amount" => 1,
            "std" => '#f0f3f6',
            "desc" => __("Pick a color for the collapsible submenus icon background.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Collapse Submenu When Another Is Opened (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_collapse_other_submenus",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to collapse the open submenu when another submenu is opened.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Open/Close Submenus By Clicking Parent Menu Item (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_openclose_submenu_with_parent",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to open and close the submenu by clicking the parent menu item. This effectively disables the parent menu link.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Close Mobile Menu By Clicking Outside Dropdown (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_close_mobile_menu_outside_click",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to make the mobile menu dropdown close by clicking the area around the outside of it.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Fixed Navigation Bar On Mobile (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_fixed_navigation_bar",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this setting to make the header menu navigation bar stay fixed at the top of the screen on Tablet and Phone device sizes.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Menu Breakpoint (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_menu_breakpoint",
            "type" => "text",
            "std" => "",
            "desc" => __("Enter the screen width pixel value for the responsive breakpoint for when the menu changes between desktop and mobile versions. The default value in Divi is 981px.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Make Mobile Menu Height Scrollable (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_mobile_menu_scrollable",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose to make the mobile menu scrollable to solve the situations when the menu is too tall and goes off the bottom of the screen.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Mobile Menu Scrollable Max Height (Default Header)', 'divi-responsive-helper'),
            "id" => "pac_drh_mobile_menu_max_height",
            "type" => "text",
            "std" => "80vh",
            "desc" => __("Set the maximum height of the mobile menu. A scrollbar will be used if the menu is taller than this height.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-5",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-6",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __("Custom CSS For Desktop Only", 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_media_query",
            "type" => "textarea",
            "std" => "",
            "desc" => __("Place any custom CSS here that you want to apply on Desktop device sizes only (981px and up).", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __("Custom CSS For Tablet Only", 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_media_query",
            "type" => "textarea",
            "std" => "",
            "desc" => __("Place any custom CSS here that you want to apply on Tablet device sizes only (767px - 980px).", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __("Custom CSS For Phone Only", 'divi-responsive-helper'),
            "id" => "pac_drh_phone_media_query",
            "type" => "textarea",
            "std" => "",
            "desc" => __("Place any custom CSS here that you want to apply on Phone device sizes only (0px - 767px).", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __("Custom CSS For Desktop And Tablet Only", 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_tablet_media_query",
            "type" => "textarea",
            "std" => "",
            "desc" => __("Place any custom CSS here that you want to apply on Desktop and Tablet device sizes only (0px - 767px).", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __("Custom CSS For Tablet and Phone Only", 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_phone_media_query",
            "type" => "textarea",
            "std" => "",
            "desc" => __("Place any custom CSS here that you want to apply on Tablet and Phone device sizes only (0px - 767px).", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $cmq_counter = 0;
        foreach (pac_drh_custom_media_queries() as $cmq) {
            $cmq_counter++;
            $options[] = [
                'name' => '',
                'id' => 'pac_drh_cmq_divider',
                'type' => 'callback_function',
                'function_name' => function () use ($cmq_counter) {
                    echo "<b>Custom CSS Media Query ".esc_html($cmq_counter)."</b>";
                },
                'desc' => '',
            ];
            $options[] = [
                "name" => __("Custom Min-Width Value", 'divi-responsive-helper'),
                "id" => "pac_drh_cmq_min_$cmq",
                "type" => "text",
                "std" => "",
                "desc" => __("Enter a custom value to set the minimum device size for the code to take effect in the custom media query.", 'divi-responsive-helper'),
                "validation_type" => "nohtml"
            ];
            $options[] = [
                "name" => __("Custom Max-Width Value", 'divi-responsive-helper'),
                "id" => "pac_drh_cmq_max_$cmq",
                "type" => "text",
                "std" => "",
                "desc" => __("Enter a custom value to set the maximum device size for the code to take effect in the custom media query. ", 'divi-responsive-helper'),
                "validation_type" => "nohtml"
            ];
            $options[] = [
                "name" => __("Custom CSS Media Query", 'divi-responsive-helper'),
                "id" => "pac_drh_cmq_css_$cmq",
                "type" => "textarea",
                "std" => "",
                "desc" => __("Place any custom CSS here that you want to apply only on device sizes between the custom min-width and max-width values.", 'divi-responsive-helper'),
                "validation_type" => "nohtml"
            ];
        }
        $options[] = [
            "name" => "drh-6",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-7",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Section Default Top/Bottom Padding On Desktop (%)', 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_section_height",
            "type" => "text",
            "std" => esc_html(et_get_option('section_padding')),
            "desc" => __("Set the default top and bottom padding percentage value to apply to all sections across the entire website on Desktop.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Section Default Top/Bottom Padding On Tablet (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_section_height",
            "type" => "text",
            "std" => esc_html(et_get_option('tablet_section_height')),
            "desc" => __("Set the default top and bottom padding pixel value to apply to all sections across the entire website on Tablet.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Section Default Top/Bottom Padding On Phone (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_phone_section_height",
            "type" => "text",
            "std" => esc_html(et_get_option('phone_section_height')),
            "desc" => __("Set the default top and bottom padding pixel value to apply to all sections across the entire website on Phone.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Top/Bottom Padding On Desktop (%)', 'divi-responsive-helper'),
            "id" => "pac_drh_desktop_row_height",
            "type" => "text",
            "std" => esc_html(et_get_option('row_padding')),
            "desc" => __("Set the default top and bottom padding percentage value to apply to all rows across the entire website on Desktop.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Top/Bottom Padding On Tablet (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_tablet_row_height",
            "type" => "text",
            "std" => esc_html(et_get_option('tablet_row_height')),
            "desc" => __("Set the default top and bottom padding pixel value to apply to all rows across the entire website on Tablet.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Top/Bottom Padding On Phone (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_phone_row_height",
            "type" => "text",
            "std" => esc_html(et_get_option('phone_row_height')),
            "desc" => __("Set the default top and bottom padding pixel value to apply to all rows across the entire website on Phone.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Width On Desktop (%)', 'divi-responsive-helper'),
            "id" => "pac_drh_row_width_desktop",
            "type" => "text",
            "std" => "",
            "desc" => __("Set the default width percentage value to apply to all rows across the entire website on Desktop.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Width On Tablet (%)', 'divi-responsive-helper'),
            "id" => "pac_drh_row_width_tablet",
            "type" => "text",
            "std" => "",
            "desc" => __("Set the default width percentage value to apply to all rows across the entire website on Tablet.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Width On Phone (%)', 'divi-responsive-helper'),
            "id" => "pac_drh_row_width_phone",
            "type" => "text",
            "std" => "",
            "desc" => __("Set the default width percentage value to apply to all rows across the entire website on Phone.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Max Width On Desktop (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_row_max_width_desktop",
            "type" => "text",
            "std" => "",
            "desc" => __("Set the default max-width pixel value to all rows across the entire website on Desktop.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Max Width On Tablet (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_row_max_width_tablet",
            "type" => "text",
            "std" => "",
            "desc" => __("Set the default max-width pixel value to apply to all rows across the entire website on Phone.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Row Default Max Width On Phone (px)', 'divi-responsive-helper'),
            "id" => "pac_drh_row_max_width_phone",
            "type" => "text",
            "std" => "",
            "desc" => __("Set the default max-width value and unit to apply to all rows across the entire website on Phone.", 'divi-responsive-helper'),
            "validation_type" => "nohtml"
        ];
        $options[] = [
            "name" => __('Custom Gutter Width', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_custom_gutter_width",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate an additional setting in the Divi Builder Rows in the Sizing toggle for setting the custom value and unit for the gutter on any device size.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-7",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-8",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Blog Module Post Count', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_responsive_blog_count",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this setting to activate responsive options in the Blog module for setting the post count on Desktop, Tablet, and Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Woo Products Module Product Count', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_responsive_shop_count",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this setting to activate responsive options in the Woo Products Module for setting the product count on Desktop, Tablet, and Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Gallery Module Image Count', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_responsive_gallery_count",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this setting to activate responsive options in the Gallery module for setting the image count on Desktop, Tablet, and Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Portfolio Module Project Count', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_responsive_portfolio_count",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this setting to activate responsive options in the Portfolio module for setting the project count on Desktop, Tablet, and Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Image Module Lightbox', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_responsive_image_lightbox",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this toggle to activate responsive options in the Image module for setting the image to open in a lightbox for Desktop, Tablet, and Phone.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Auto Open Responsive Tabs', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_auto_responsive",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable and this feature to automatically open the responsive Desktop, Tablet and Phone tabs in the Visual Builder.This setting should only be used after carefully understanding it and only when you are ready to go through the website and adjust responsive settings for each device. Opening the responsive options automatically can cause unwanted changes to all your settings for each device, so this is very important to use with great caution. Only enable this setting if you have tested this on a development or staging site first to see how it works.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Disable Hover Effects On Touch Devices', 'divi-responsive-helper'),
            "id" => "pac_drh_disabled_hover_effects",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to automatically disabled hover effects on touch devices.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Parallax On Mobile Devices', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_mobile_parallax",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to automatically add support for parallax effect on mobile devices whenever the Use Parallax Effect setting is enabled within any Divi section, row, column, or module.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Disable Animations On Mobile', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_remove_animation",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to disable animations on mobile to improve performance.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Prevent Horizontal Scroll', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_prevent_horizontal_scroll",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to prevent a common issue with Divi which causes the mobile site to scroll sideways with a horizontal scroll bar.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Mobile Pinch Zooming', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_mobile_pinch_zoom",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to allow users to pinch and zoom on mobile.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __("Mobile Logo", 'divi-responsive-helper'),
            "id" => "pac_drh_mobile_logo",
            "type" => "upload",
            "button_text" => __("Set As Logo", 'divi-responsive-helper'),
            "std" => "",
            "desc" => __("Set a different logo image to appear in the default header menu on tablet and phone devices.", 'divi-responsive-helper'),
            "validation_type" => "url",
        ];
        $options[] = [
            "name" => __("Mobile Header Bar Color", 'divi-responsive-helper'),
            "id" => "pac_drh_mobile_header_color",
            "type" => "et_color_palette",
            "items_amount" => 1,
            "std" => '#FFFFFF',
            "desc" => __("Set a color for the mobile address bar header for Android devices using the Chrome browser.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Tabs Module Tab Layout', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_tabs_layout_settings",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to show settings in the Design tab of the Divi Tabs module for setting the tab stacking layout.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Blurb Image/Icon Position On Phone', 'divi-responsive-helper'),
            "id" => "pac_drh_enable_blurb_settings",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Enable this feature to activate new settings in the Design tab of the Divi Blurb module settings for setting the blurb image/icon position on Phone devices when the default placement is set to left.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Back To Top Button Visibility', 'divi-responsive-helper'),
            "id" => "pac_drh_back_top_visibility",
            "type" => "select",
            "options" => [
                "off" => __("Show On All Devices", 'divi-responsive-helper'),
                "desktop" => __("Show On Desktop", 'divi-responsive-helper'),
                "tablet" => __("Show On Tablet", 'divi-responsive-helper'),
                "phone" => __("Show On Phone", 'divi-responsive-helper'),
                "desktop_tablet" => __("Show On Desktop And Tablet", 'divi-responsive-helper'),
                "tablet_phone" => __("Show On Tablet And Phone", 'divi-responsive-helper'),
                "desktop_phone" => __("Show On Desktop And Phone", 'divi-responsive-helper'),
            ],
            "std" => "off",
            'usefor' => 'custom',
            'et_save_values' => true,
            "desc" => __("Choose on which devices to show the Back To Top Button. This feature first requires the main Back To Top Button to be enabled in Divi>Theme Options>General.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-8",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "drh-9",
            "type" => "subcontent-start",
        ];
        $options[] = [
            "name" => __('Render Scripts Inline', 'divi-responsive-helper'),
            "id" => "pac_drh_load_resources_inline",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("Choose how you want scripts to load. When this setting is disabled, scripts will render from a URL by default. When this setting is enabled, scripts will render inline.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => __('Remove Plugin Data When Uninstalled', 'divi-responsive-helper'),
            "id" => "pac_drh_remove_plugin_data",
            "type" => "checkbox2",
            "std" => "off",
            "desc" => __("This setting will remove all plugin data and saved settings when you uninstall the plugin. Please use this setting carefully with the understanding that if you enable the setting you will lose all saved settings if you uninstall the plugin.", 'divi-responsive-helper'),
        ];
        $options[] = [
            "name" => "drh-9",
            "type" => "subcontent-end",
        ];
        $options[] = [
            "name" => "wrap-drh",
            "type" => "contenttab-wrapend",
        ];

        return $options;
    }

    add_filter('et_epanel_layout_data', 'pac_drh_epanel_fields');
endif;
/**
 * Ensure compatibility for pac_drh_et_core_portability function.
 *
 * @param object $data
 *
 * @return object
 */
if (!function_exists('pac_drh_et_core_portability')):
    function pac_drh_et_core_portability($data)
    {
        $drh_settings = [];
        $options = get_option(pac_drh_get_theme_option_name());
        if (!empty($options)) {
            foreach ($options as $key => $value) {
                if (str_contains($key, 'pac_drh_')) {
                    $drh_settings[$key] = 'true';
                }
            }
        }
        if (!empty($drh_settings)) {
            $data->include = wp_parse_args($drh_settings, $data->include);
        }

        return $data;
    }
endif;
/**
 * Check of 'context' and 'action'
 * are set in $_POST, and if the context is 'epanel'
 * and action is either 'et_core_portability_export' or 'et_core_portability_import'.
 * If conditions are met, add a filter to modify portability arguments.
 *
 * @param mixed $context
 * @param mixed $action
 *
 * @return void
 */
if (isset($_POST['context'], $_POST['action']) && 'epanel' === sanitize_text_field($_POST['context']) && ('et_core_portability_export' === sanitize_text_field($_POST['action']) || 'et_core_portability_import' === sanitize_text_field($_POST['action']))) { // phpcs:ignore WordPress.Security.NonceVerification
    add_filter('et_core_portability_args_epanel', 'pac_drh_et_core_portability');
}