'https://www.diviessential.com/divi-next-advanced-tab/', 'author' => 'Divi Next', 'author_uri' => 'www.divinext.com', ); public function init() { $this->name = esc_html__('Advanced Tab Item', 'dnxte-divi-essential'); $this->settings_modal_toggles = array( 'general' => array( 'toggles' => array( 'tab_content' => array( 'title' => esc_html__('Tab Content', 'dnxte-divi-essential'), ), 'body_content' => array( 'title' => esc_html__('Body Content', 'dnxte-divi-essential'), ), 'tab_bg' => array( 'title' => esc_html__('Tab Background', 'dnxte-divi-essential'), ), 'content_bg' => array( 'title' => esc_html__('Content Background', 'dnxte-divi-essential'), ), ), ), 'advanced' => array( 'toggles' => array( 'tab_settings' => array( 'title' => esc_html__('Tab Settings ', 'dnxte-divi-essential'), 'sub_toggles' => array( 'title' => array( 'name' => esc_html__('Title', 'dnxte-divi-essential'), ), 'subtitle' => array( 'name' => esc_html__('Subtitle', 'dnxte-divi-essential'), ), ), 'tabbed_subtoggles' => true, ), 'body_settings' => array( 'title' => esc_html__('Body Settings ', 'dnxte-divi-essential'), 'sub_toggles' => array( 'title' => array( 'name' => esc_html__('Title', 'dnxte-divi-essential'), ), 'description' => array( 'name' => esc_html__('Description', 'dnxte-divi-essential'), ), ), 'tabbed_subtoggles' => true, ), 'image_settings' => esc_html__('Image Settings', 'dnxte-divi-essential'), 'tab_icon_settings' => array( 'title' =>esc_html__('Tab Icon/Image Settings', 'dnxte-divi-essential'), 'sub_toggles' => array( 'normal' => array( 'name' => esc_html__('Normal', 'dnxte-divi-essential'), ), 'active' => array( 'name' => esc_html__('Active', 'dnxte-divi-essential'), ), ), 'tabbed_subtoggles' => true, ), 'body_icon_settings' => esc_html__('Body Icon Settings', 'dnxte-divi-essential'), 'tab_spacing' => esc_html__('Tab Spacing', 'dnxte-divi-essential'), 'body_spacing' => esc_html__('Body Spacing', 'dnxte-divi-essential'), 'border' => array( 'title' => esc_html__('Border', 'dnxte-divi-essential'), 'sub_toggles' => array( 'tab' => array( 'name' => esc_html__('Tab', 'dnxte-divi-essential'), ), 'body' => array( 'name' => esc_html__('Body', 'dnxte-divi-essential'), ), ), 'tabbed_subtoggles' => true, ), 'box_shadows' => array( 'title' => esc_html__('Box Shadow', 'dnxte-divi-essential'), 'sub_toggles' => array( 'tab' => array( 'name' => esc_html__('Tab', 'dnxte-divi-essential'), ), 'body' => array( 'name' => esc_html__('Body', 'dnxte-divi-essential'), ), ), 'tabbed_subtoggles' => true, ), ), ), ); $this->custom_css_fields = array( 'tab_title' => array( 'label' => esc_html__('Tab Title', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte_tab_nav_title', ), 'tab_subtitle' => array( 'label' => esc_html__('Tab Subtitle', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte_tab_nav_pra', ), 'tab_icon' => array( 'label' => esc_html__('Tab Icon/Image', 'dnxte-divi-essential'), 'selector' => '%%order_class%% span.dnxte_tab_nav_icon,%%order_class%% .dnxte_tab_nav_image', ), 'tab_active_icon' => array( 'label' => esc_html__('Active Tab Icon/Image', 'dnxte-divi-essential'), 'selector' => '%%order_class%% span.dnxte_tab_nav_icon_active,%%order_class%% .dnxte_tab_nav_image_active', ), 'body_title' => array( 'label' => esc_html__('Body Title', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_title', ), 'body_description' => array( 'label' => esc_html__('Body Description', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_pra', ), 'body_icon' => array( 'label' => esc_html__('Body Icon', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte_tab_content_slidebar_one .dnxte_tab_content_icon', ), 'body_image' => array( 'label' => esc_html__('Body Image', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte_tab_content_slidebar_one img', ), ); } public function get_advanced_fields_config() { return array( 'text' => false, 'link_options' => false, 'fonts' => array( 'default' => array( 'label' => esc_html__('Body Title', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_title", 'important' => 'plugin-only', ), 'header_level' => array( 'default' => 'h3', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_settings', 'sub_toggle' => 'title', ), 'description' => array( 'label' => esc_html__('Body Description', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_pra", 'important' => 'plugin-only', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_settings', 'sub_toggle' => 'description', ), 'tab_title' => array( 'label' => esc_html__('Tab Title', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte_tab_nav_title", 'hover' => "%%order_class%%:hover .dnxte_tab_nav_title", 'important' => 'plugin-only', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_settings', 'sub_toggle' => 'title', ), 'tab_subtitle' => array( 'label' => esc_html__('Tab Subtitle', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte_tab_nav_pra", 'hover' => "%%order_class%%:hover .dnxte_tab_nav_pra", 'important' => 'plugin-only', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_settings', 'sub_toggle' => 'subtitle', ), ), 'button' => array( 'button' => array( 'label' => esc_html__('Button', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte_tab_content_btn", 'important' => true, ), 'use_alignment' => true, 'custom_button' => true, 'box_shadow' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_content_btn', ), ), 'tab_slug' => 'advanced', ), ), 'borders' => array( 'default' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%%.dnxte-ad-tab,%%order_class%% .dnxte_tab_a", 'border_styles' => "%%order_class%%.dnxte-ad-tab,%%order_class%% .dnxte_tab_a", ), // 'important' => 'all', ), 'toggle_slug' => 'border', 'sub_toggle' => 'tab', 'tab_slug' => 'advanced', ), 'body' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%%.dnxte-ad-panel, %%order_class%% .dnxte_tab_content", 'border_styles' => "%%order_class%%.dnxte-ad-panel, %%order_class%% .dnxte_tab_content", ), 'important' => 'all', ), 'toggle_slug' => 'border', 'sub_toggle' => 'body', 'tab_slug' => 'advanced', ), 'body_image' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_content_slidebar_one img", 'border_styles' => "%%order_class%% .dnxte_tab_content_slidebar_one img", ), 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', ), 'tab_image' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_nav_image img", 'border_styles' => "%%order_class%% .dnxte_tab_nav_image img", ), 'important' => 'all', ), 'label_prefix' => esc_html__('Tab image', 'dnxte-divi-essential'), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal' ), 'tab_image_active' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_nav_image_active img", 'border_styles' => "%%order_class%% .dnxte_tab_nav_image_active img", ), 'important' => 'all', ), 'label_prefix' => esc_html__('Tab image', 'dnxte-divi-essential'), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'active' ), 'tab_title' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_nav_title", 'border_styles' => "%%order_class%% .dnxte_tab_nav_title", ), 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_settings', 'sub_toggle' => 'title', ), 'tab_subtitle' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_nav_pra", 'border_styles' => "%%order_class%% .dnxte_tab_nav_pra", ), 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_settings', 'sub_toggle' => 'subtitle', ), 'body_title' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_title", 'border_styles' => "%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_title", ), 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_settings', 'sub_toggle' => 'title', ), 'body_description' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_pra", 'border_styles' => "%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_pra", ), 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_settings', 'sub_toggle' => 'description', ), ), 'box_shadow' => array( 'default' => array( 'css' => array( 'main' => '%%order_class%%.dnxte-ad-tab, %%order_class%% .dnxte_tab_a', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'toggle_slug' => 'box_shadows', 'sub_toggle' => 'tab', 'tab_slug' => 'advanced', ), 'body' => array( 'css' => array( 'main' => '%%order_class%%.dnxte-ad-panel, %%order_class%% .dnxte_tab_content', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'toggle_slug' => 'box_shadows', 'sub_toggle' => 'body', 'tab_slug' => 'advanced', ), 'body_image' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_content_slidebar_one img', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', ), 'tab_image' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_nav_image img', ), 'label_prefix' => esc_html__('Tab Image', 'dnxte-divi-essential'), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal', ), 'tab_image_active' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_nav_image_active img', ), 'label_prefix' => esc_html__('Tab Image Active', 'dnxte-divi-essential'), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'active', ), 'tab_title' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_nav_title', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_settings', 'sub_toggle' => 'title', ), 'tab_subtitle' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_nav_pra', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_settings', 'sub_toggle' => 'subtitle', ), 'body_title' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_title', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_settings', 'sub_toggle' => 'title', ), 'body_description' => array( 'css' => array( 'main' => '%%order_class%% .dnxte_tab_content_slidebar_two .dnxte_tab_content_pra', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_settings', 'sub_toggle' => 'description', ), ), 'filters' => array( 'child_filters_target' => array( 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', ), ), 'margin_padding' => false, 'background' => false, ); } public function get_fields() { $admin_label = array( 'admin_label_text' => array( 'label' => esc_html__('Admin Label', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('This will change the label of the module in the builder for easy identification.', 'dnxte-divi-essential'), 'toggle_slug' => 'admin_label', 'default' => 'Tab Item', ), ); $tab_settings = array( 'tab_title' => array( 'label' => esc_html__('Title', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input the title of the tab', 'dnxte-divi-essential'), 'toggle_slug' => 'tab_content', 'dynamic_content' => 'text', ), 'tab_subtitle' => array( 'label' => esc_html__('Subtitle', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input the subtitle or a short description of the tab.', 'dnxte-divi-essential'), 'toggle_slug' => 'tab_content', 'dynamic_content' => 'text', ), 'tab_use_icon_or_image' => array( 'label' => esc_html__('Use Icon/Image', 'dnxte-divi-essential'), 'type' => 'select', 'description' => esc_html__('Choose an Icon you want to use in the tab.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'none' => esc_html__('None', 'dnxte-divi-essential'), 'image' => esc_html__('Image', 'dnxte-divi-essential'), 'icon' => esc_html__('Icon', 'dnxte-divi-essential'), ), 'default' => 'none', 'toggle_slug' => 'tab_content', 'affects' => array( 'tab_icon', 'tab_image' ), ), // 'tab_icon' => array( // 'label' => esc_html__('Icon', 'dnxte-divi-essential'), // 'type' => 'select_icon', // 'option_category' => 'basic_option', // 'class' => array('et-pb-font-icon'), // 'toggle_slug' => 'tab_content', // 'description' => esc_html__('Choose an icon to display in the tab.', 'dnxte-divi-essential'), // 'show_if' => array( // 'tab_use_icon_or_image' => 'icon', // ), // ), // 'tab_image' => array( // 'label' => esc_html__('Image', 'dnxte-divi-essential'), // 'type' => 'upload', // 'option_category' => 'basic_option', // 'upload_button_text' => esc_attr__('Upload an image', 'dnxte-divi-essential'), // 'choose_text' => esc_attr__('Choose an Image', 'dnxte-divi-essential'), // 'update_text' => esc_attr__('Set As Image', 'dnxte-divi-essential'), // 'description' => esc_html__('Upload an image to display in the tab.', 'dnxte-divi-essential'), // 'toggle_slug' => 'tab_content', // 'dynamic_content' => 'image', // 'mobile_options' => true, // 'hover' => 'tabs', // 'show_if' => array( // 'tab_use_icon_or_image' => 'image' // ) // ), 'active_on_load' => array( 'label' => esc_html__('Active On Load', 'dnxte-divi-essential'), 'type' => 'yes_no_button', 'description' => esc_html__('Keep the Tab active on load.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'off' => esc_html__('No', 'dnxte-divi-essential'), 'on' => esc_html__('Yes', 'dnxte-divi-essential'), ), 'default' => 'off', 'toggle_slug' => 'tab_content', ), ); $tab_settings['tabs_image_icon'] = array( 'label' => esc_html__('Tab Icon/Image', 'dnxte-divi-essential'), 'type' => 'composite', 'description' => esc_html__('Use different Icon/Image on tab normal and active mode.','dnxte-divi-essential'), 'toggle_slug' => 'tab_content', 'composite_type' => 'default', 'composite_structure' => array( 'normal' => array( 'label' => esc_html__("Normal", 'dnxte-divi-essential'), 'controls' => array( 'tab_icon' => array( 'label' => esc_html__('Icon', 'dnxte-divi-essential'), 'type' => 'select_icon', 'option_category' => 'basic_option', 'class' => array('et-pb-font-icon'), // 'toggle_slug' => 'tab_content', 'description' => esc_html__('Choose an icon to display in the tab.', 'dnxte-divi-essential'), 'show_if' => array( 'tab_use_icon_or_image' => 'icon', ), ), 'tab_image' => array( 'label' => esc_html__('Image', 'dnxte-divi-essential'), 'type' => 'upload', 'option_category' => 'basic_option', 'upload_button_text' => esc_attr__('Upload an image', 'dnxte-divi-essential'), 'choose_text' => esc_attr__('Choose an Image', 'dnxte-divi-essential'), 'update_text' => esc_attr__('Set As Image', 'dnxte-divi-essential'), 'description' => esc_html__('Upload an image to display in the tab.', 'dnxte-divi-essential'), // 'toggle_slug' => 'tab_content', 'dynamic_content' => 'image', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'tab_use_icon_or_image' => 'image' ) ), ) ), 'active' => array( 'label' => esc_html__("Active", 'dnxte-divi-essential'), 'controls' => array( 'use_different_icon_image' => array( 'label' => esc_html__('Use Different Icon/Image', 'dnxte-divi-essential'), 'type' => 'yes_no_button', 'description' => esc_html__('Switch to change the active icon or image in the tab.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'off' => esc_html__('No', 'dnxte-divi-essential'), 'on' => esc_html__('Yes', 'dnxte-divi-essential'), ), 'default' => 'off', ), 'tab_icon_active' => array( 'label' => esc_html__('Icon', 'dnxte-divi-essential'), 'type' => 'select_icon', 'option_category' => 'basic_option', 'class' => array('et-pb-font-icon'), // 'toggle_slug' => 'tab_content', 'description' => esc_html__('Choose an icon to display in the tab.', 'dnxte-divi-essential'), 'show_if' => array( 'tab_use_icon_or_image' => 'icon', 'use_different_icon_image' => 'on' ), ), 'tab_image_active' => array( 'label' => esc_html__('Image', 'dnxte-divi-essential'), 'type' => 'upload', 'option_category' => 'basic_option', 'upload_button_text' => esc_attr__('Upload an image', 'dnxte-divi-essential'), 'choose_text' => esc_attr__('Choose an Image', 'dnxte-divi-essential'), 'update_text' => esc_attr__('Set As Image', 'dnxte-divi-essential'), 'description' => esc_html__('Upload an image to display in the tab.', 'dnxte-divi-essential'), // 'toggle_slug' => 'tab_content', 'dynamic_content' => 'image', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'tab_use_icon_or_image' => 'image', 'use_different_icon_image' => 'on' ) ), ) ), ), 'show_if_not' => array( 'tab_use_icon_or_image' => 'none' ) ); $warning_msg = esc_html__('The settings below will only work on the tab images.', 'dnxte-divi-essential'); $tab_icon_settings = array( 'tab_icon_placement' => array( 'label' => esc_html__('Tab Icon/Image Placement', 'dnxte-divi-essential'), 'type' => 'select', 'description' => esc_html__('Choose where you want to show the Icon/Image in the tab panel.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'center' => esc_html__('Top', 'dnxte-divi-essential'), 'bottom' => esc_html__('Bottom', 'dnxte-divi-essential'), 'left' => esc_html__('Left', 'dnxte-divi-essential'), 'right' => esc_html__('Right', 'dnxte-divi-essential'), ), 'default' => 'center', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal', 'mobile_options' => true, 'responsive' => true, 'show_if' => array( 'tab_use_icon_or_image' => array('icon', 'image'), ), ), 'tabs_icon_alignment' => array( 'label' => esc_html__('Icon/Image Alignment', 'dnxte-divi-essential'), 'description' => esc_html__('Align image/icon to the left, right or center.', 'dnxte-divi-essential'), 'type' => 'align', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(array('justified')), 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal', 'default' => 'center', 'mobile_options' => true, 'responsive' => true, 'show_if' => array( 'tab_use_icon_or_image' => array('icon', 'image') // "tab_icon_placement" => array('center', 'bottom') ), ), 'tabs_icon_width' => array( 'label' => esc_html__('Tabs Icon/Image Size', 'dnxte-divi-essential'), 'type' => 'range', 'description' => esc_html__('Adjust the size of the tab icon/image.','dnxte-divi-essential'), // 'default' => '20px', 'default_unit' => 'px', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal', 'range_settings' => array( 'min' => '1', 'max' => '300', 'step' => '1', ), 'show_if' => array( 'tab_use_icon_or_image' => array('icon', 'image'), ), ), 'tab_icon_color' => array( 'label' => esc_html__('Icon Color', 'dnxte-divi-essential'), 'type' => 'color-alpha', 'description' => esc_html__('Select a color fot the tab icon using the pointer or you can use a hex code to get the exact color required for your design.','dnxte-divi-essential'), 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal', 'tab_slug' => 'advanced', // 'default' => '#000', 'mobile_options' => true, 'hover' => 'tabs', 'depends_show_if' => 'on', 'show_if' => array( 'tab_use_icon_or_image' => 'icon', ), ), 'tab_image_setting_warning'=> array( 'type' => 'warning', 'value' => true, 'display_if' => true, 'show_if' => array( 'tab_use_icon_or_image' => 'icon', ), 'message' => $warning_msg, 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'normal', 'tab_slug' => 'advanced', ), 'tab_image_active_setting_warning'=> array( 'type' => 'warning', 'value' => true, 'display_if' => true, 'show_if' => array( 'tab_use_icon_or_image' => 'icon', ), 'message' => $warning_msg, 'toggle_slug' => 'tab_icon_settings', 'sub_toggle' => 'active', 'tab_slug' => 'advanced', ), ); $body_settings = array( 'use_divi_library' => array( 'label' => esc_html__('Use Library Layouts', 'dnxte-divi-essential'), 'type' => 'yes_no_button', 'description' => esc_html__('Switch to use the divi library layouts.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'off' => esc_html__('No', 'dnxte-divi-essential'), 'on' => esc_html__('Yes', 'dnxte-divi-essential'), ), 'computed_affects' => array( '__libraryLayouts', ), 'default' => 'off', 'toggle_slug' => 'body_content', 'affects' => array( 'body_title', 'body_description', 'body_use_image_or_icon', ), ), 'divi_library' => array( 'label' => esc_html__('Divi Library', 'dnxte-divi-essential'), 'description' => esc_html__('Select a divi layout. This field won\'t change on the builder. But will show on the frontend.', 'dnxte-divi-essential'), 'options' => Common::get_divi_library_options(), 'type' => 'select', 'computed_affects' => array( '__libraryLayouts', ), 'toggle_slug' => 'body_content', 'show_if' => array( 'use_divi_library' => 'on', ), ), 'body_title' => array( 'label' => esc_html__('Title', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input the title of the tab body', 'dnxte-divi-essential'), 'toggle_slug' => 'body_content', 'dynamic_content' => 'text', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_description' => array( 'label' => esc_html__('Description', 'dnxte-divi-essential'), 'type' => 'tiny_mce', 'option_category' => 'basic_option', 'description' => esc_html__('Input the description of the tab body.', 'dnxte-divi-essential'), 'toggle_slug' => 'body_content', 'dynamic_content' => 'text', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_use_image_or_icon' => array( 'label' => esc_html__('Use Image/Icon', 'dnxte-divi-essential'), 'type' => 'select', 'description' => esc_html__('Choose Image or Icon you want to use in the tab body.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'none' => esc_html__('None', 'dnxte-divi-essential'), 'image' => esc_html__('Image', 'dnxte-divi-essential'), 'icon' => esc_html__('Icon', 'dnxte-divi-essential'), ), 'default' => 'none', 'toggle_slug' => 'body_content', 'affects' => array( 'body_icon', 'body_image', ), 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_icon' => array( 'label' => esc_html__('Icon', 'dnxte-divi-essential'), 'type' => 'select_icon', 'option_category' => 'basic_option', 'class' => array('et-pb-font-icon'), 'toggle_slug' => 'body_content', 'description' => esc_html__('Choose an icon to display in the tab.', 'dnxte-divi-essential'), 'default' => '#', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'body_use_image_or_icon' => 'icon', ), ), 'body_image' => array( 'label' => esc_html__('Image', 'dnxte-divi-essential'), 'type' => 'upload', 'option_category' => 'basic_option', 'upload_button_text' => esc_attr__('Upload an image', 'dnxte-divi-essential'), 'choose_text' => esc_attr__('Choose an Image', 'dnxte-divi-essential'), 'update_text' => esc_attr__('Set As Image', 'dnxte-divi-essential'), 'description' => esc_html__('Upload an image to display at the top of your team person.', 'dnxte-divi-essential'), 'toggle_slug' => 'body_content', 'dynamic_content' => 'image', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'body_use_image_or_icon' => 'image', ), ), 'button_text' => array( 'label' => esc_html__('Button Text', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input button text', 'dnxte-divi-essential'), 'toggle_slug' => 'body_content', 'dynamic_content' => 'text', 'default' => '', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'button_link' => array( 'label' => esc_html__('Button Link', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'default' => '#', 'description' => esc_html__('When clicked the module will link to this URL.', 'dnxte-divi-essential'), 'toggle_slug' => 'body_content', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'button_target' => array( 'label' => esc_html__('Button Link Target', 'dnxte-divi-essential'), 'type' => 'select', 'description' => esc_html__('Select the link target', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'toggle_slug' => 'body_content', 'options' => array( '_self' => esc_html__('In The Same Window', 'dnxte-divi-essential'), '_blank' => esc_html__('In The New Tab', 'dnxte-divi-essential'), ), 'default' => '_self', 'show_if' => array( 'use_divi_library' => 'off', ), ), '__libraryLayouts' => array( 'type' => 'computed', 'computed_callback' => array('NextAdvancedTabItem', 'get_library_content'), 'computed_depends_on' => array( 'use_divi_library', 'divi_library', ), ), ); $body_icon_settings = array( 'body_icon_alignment' => array( 'label' => esc_html__('Icon Alignment', 'dnxte-divi-essential'), 'description' => esc_html__('Align image/icon to the left, right or center.', 'dnxte-divi-essential'), 'type' => 'align', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(array('justified')), 'tab_slug' => 'advanced', 'toggle_slug' => 'body_icon_settings', 'default' => 'center', 'mobile_options' => true, 'responsive' => true, 'show_if' => array( 'body_use_image_or_icon' => 'icon', ), ), 'body_icon_size' => array( 'label' => esc_html__('Tabs Icon Size', 'dnxte-divi-essential'), 'type' => 'range', // 'default' => '20px', 'default_unit' => 'px', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_icon_settings', 'range_settings' => array( 'min' => '1', 'max' => '300', 'step' => '1', ), 'show_if' => array( 'body_use_image_or_icon' => 'icon', ), ), 'body_icon_color' => array( 'label' => esc_html__('Icon Color', 'dnxte-divi-essential'), 'type' => 'color-alpha', 'toggle_slug' => 'body_icon_settings', 'tab_slug' => 'advanced', 'mobile_options' => true, 'depends_show_if' => 'on', 'show_if' => array( 'body_use_image_or_icon' => 'icon', ), ), ); $image_settings = array( 'body_image_width' => array( 'label' => esc_html__('Image Width', 'dnxte-divi-essential'), 'type' => 'range', 'default' => '50%', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm'), 'default_unit' => '%', 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', 'mobile_options' => true, 'responsive' => true, 'range_settings' => array( 'min' => '1', 'max' => '100', 'step' => '1', ), 'show_if' => array( 'body_use_image_or_icon' => 'image', ), ), 'body_image_max_width' => array( 'label' => esc_html__('Image Max Width', 'dnxte-divi-essential'), 'type' => 'range', 'default' => '100%', 'default_unit' => '%', 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', 'mobile_options' => true, 'responsive' => true, 'range_settings' => array( 'min' => '1', 'max' => '100', 'step' => '1', ), 'show_if' => array( 'body_use_image_or_icon' => 'image', ), ), 'body_image_placement' => array( 'label' => esc_html__('Image Placement', 'dnxte-divi-essential'), 'type' => 'select', 'description' => esc_html__('Choose where you want to show the Icon in the tab panel.', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'options' => array( 'center' => esc_html__('Top', 'dnxte-divi-essential'), 'bottom' => esc_html__('Bottom', 'dnxte-divi-essential'), 'left' => esc_html__('Left', 'dnxte-divi-essential'), 'right' => esc_html__('Right', 'dnxte-divi-essential'), ), 'default' => 'center', 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', 'mobile_options' => true, 'responsive' => true, 'show_if' => array( 'body_use_image_or_icon' => 'image', ), ), 'body_image_alignment' => array( 'label' => esc_html__('Image Alignment', 'dnxte-divi-essential'), 'description' => esc_html__('Align image/icon to the left, right or center.', 'dnxte-divi-essential'), 'type' => 'align', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(array('justified')), 'tab_slug' => 'advanced', 'toggle_slug' => 'image_settings', 'default' => 'center', 'mobile_options' => true, 'responsive' => true, 'show_if' => array( 'body_use_image_or_icon' => 'image', ), ), ); $tab_margin_padding = array( 'tab_item_margin' => array( 'label' => esc_html__('Tab Item Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space/margin of the tab item element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_item_padding' => array( 'label' => esc_html__('Tab Item Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space/padding of the tab item element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_title_margin' => array( 'label' => esc_html__('Tab Title Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space of the tab title element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_title_padding' => array( 'label' => esc_html__('Tab Title Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space of the tab title element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_subtitle_margin' => array( 'label' => esc_html__('Tab Subtitle Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space of the tab subtitle element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_subtitle_padding' => array( 'label' => esc_html__('Tab Subtitle Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space of the tab subtitle element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_icon_margin' => array( 'label' => esc_html__('Tab Icon/Image Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space of the tab icon/image element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_icon_padding' => array( 'label' => esc_html__('Tab Icon/Image Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space of the tab icon/image element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_icon_active_margin' => array( 'label' => esc_html__('Active Tab Icon/Image Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space of the active tab icon/image element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), 'tab_icon_active_padding' => array( 'label' => esc_html__('Active Tab Icon/Image Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space of the active tab icon/image element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'tab_spacing', ), ); $body_margin_padding = array( 'body_item_margin' => array( 'label' => esc_html__('Body Item Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space of the body item element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_item_padding' => array( 'label' => esc_html__('Body Item Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space of the body item element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_title_margin' => array( 'label' => esc_html__('Body Title Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'description' => esc_html__('Adjust the outer space of the body title element.','dnxte-divi-essential'),'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_title_padding' => array( 'label' => esc_html__('Body Title Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'description' => esc_html__('Adjust the inner space of the body title element.','dnxte-divi-essential'), 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_description_margin' => array( 'label' => esc_html__('Body Description Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'mobile_options' => true, 'hover' => 'tabs', 'default' => '0|0|20px|0', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_description_padding' => array( 'label' => esc_html__('Body Description Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', ), ), 'body_image_padding' => array( 'label' => esc_html__('Body Image Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', 'body_use_image_or_icon' => 'image', ), ), 'body_icon_margin' => array( 'label' => esc_html__('Body Icon Margin', 'dnxte-divi-essential'), 'type' => 'custom_margin', 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', 'body_use_image_or_icon' => 'icon', ), ), 'body_icon_padding' => array( 'label' => esc_html__('Body Icon Padding', 'dnxte-divi-essential'), 'type' => 'custom_padding', 'mobile_options' => true, 'hover' => 'tabs', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'body_spacing', 'show_if' => array( 'use_divi_library' => 'off', 'body_use_image_or_icon' => 'icon', ), ), ); $background_opt = array( 'hover' => 'tabs', 'description' => esc_html__('Add a background fill color or gradient for the area.', 'dnxte-divi-essential'), ); $tab_bg = Common::background_fields($this, "tab_", "Background Color", "tab_bg", "general", $background_opt); $content_bg = Common::background_fields($this, "content_", "Background Color", "content_bg", "general", $background_opt); return array_merge($admin_label, $tab_settings, $tab_icon_settings, $body_settings, $body_icon_settings, $image_settings, $tab_margin_padding, $body_margin_padding, $tab_bg, $content_bg); } public static function get_library_content($args = array()) { $defaults = array(); $args = wp_parse_args($args, $defaults); if (empty($args['divi_library'])) { return; } ob_start(); ET_Builder_Element::clean_internal_modules_styles(); echo do_shortcode( sprintf( '[et_pb_section global_module="%1$s" template_type="section" fullwidth="on"][/et_pb_section]', $args['divi_library'] ) ); $internal_style = ET_Builder_Element::get_style(); ET_Builder_Element::clean_internal_modules_styles(false); if ($internal_style) { $modules_style = sprintf( '', $internal_style, $args['divi_library'] ); } if (function_exists('et_core_is_fb_enabled') && et_core_is_fb_enabled()) { echo et_core_esc_previously($modules_style); } $render_shortcode = ob_get_clean(); return $render_shortcode; } protected function render_content($render_slug) { $module_order_class = self::get_module_order_class($render_slug); $content_type = $this->props['use_divi_library']; $divi_library = $this->props['divi_library']; $custom_content = $this->render_custom_content($render_slug); $args = array('divi_library' => $divi_library); return 'on' === $content_type ? sprintf('
/s', '$1', $content); } protected function process_content($content){ $content = $this->sanitize_content($content); $content = str_replace(["[", "]"], ["[", "]"], $content); $content = do_shortcode($content); $content = str_replace( ["