'https://www.diviessential.com/divi-timeline/', 'author' => 'Divi Next', 'author_uri' => 'www.divinext.com', ); public function init(){ $this->name = esc_html__('Timeline Item', 'dnxte-divi-essential'); $this->settings_modal_toggles = array( 'general' => array( 'toggles' => array( 'dnxte_timeline_elements' => esc_html__( 'Timeline Elements', 'dnxte-divi-essential') ) ), 'advanced' => array( 'toggles' => array( 'dnxte_timeline_settings' => esc_html__( 'Timeline', 'dnxte-divi-essential'), 'dnxte_title_settings' => esc_html__( 'Title', 'dnxte-divi-essential'), 'dnxte_desc_settings' => esc_html__( 'Description', 'dnxte-divi-essential'), 'dnxte_image_settings' => esc_html__( 'Image', 'dnxte-divi-essential'), 'dnxte_btn_settings' => esc_html__( 'Button', 'dnxte-divi-essential'), 'dnxte_icon_settings' => esc_html__( 'Icon', 'dnxte-divi-essential'), 'dnxte_identifier_settings' => esc_html__( 'Identifier', 'dnxte-divi-essential'), ) ), 'custom_css' => array( 'toggles' => array( 'custom_class_id' => esc_html__( 'CSS ID & Classes', 'dnxte-divi-essential' ) ), ), ); $this->custom_css_fields = array( 'title' => array( 'label' => esc_html__('Title', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte-timline-heading', ), 'description' => array( 'label' => esc_html__('Description', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte-timline-pra', ), 'button' => array( 'label' => esc_html__('Button', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte-timline-btn-more', ), 'icon' => array( 'label' => esc_html__('Icon/Image', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte-timline-img', ), 'identifier' => array( 'label' => esc_html__('Identifier', 'dnxte-divi-essential'), 'selector' => '%%order_class%% .dnxte-timline-date', ), ); } public function get_advanced_fields_config(){ return array( 'text' => false, 'max_width' => false, 'fonts' => array( 'header' => array( 'label' => esc_html__('Title', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% h4.dnxte-timline-heading, %%order_class%% h1.dnxte-timline-heading, %%order_class%% h2.dnxte-timline-heading, %%order_class%% h3.dnxte-timline-heading, %%order_class%% h5.dnxte-timline-heading, %%order_class%% h6.dnxte-timline-heading", 'important' => 'plugin-only', ), 'header_level' => array( 'default' => 'h2', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_title_settings', ), 'content' => array( 'label' => esc_html__('Content', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte-timline-pra", 'important' => 'plugin-only', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_desc_settings', ), 'button' => array( 'label' => esc_html__('Button', 'dnxte-divi-essential'), 'hide_text_align' => true, 'css' => array( 'main' => "%%order_class%% .dnxte-timline-btn-more", 'important' => 'plugin-only', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_btn_settings', ), 'identifier' => array( 'label' => esc_html__('Identifier', 'dnxte-divi-essential'), 'css' => array( 'main' => "%%order_class%% .dnxte-timline-date", 'important' => 'plugin-only', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_identifier_settings', ), ), 'borders' => array( 'timeline' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-content", 'border_styles' => "%%order_class%% .dnxte-timline-content", ), 'important' => 'all' ), 'label_prefix' => esc_html__('Timeline', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_timeline_settings', ), 'title' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-heading", 'border_styles' => "%%order_class%% .dnxte-timline-heading", ), 'important' => 'all' ), 'label_prefix' => esc_html__('Title', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_title_settings', ), 'content' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-pra", 'border_styles' => "%%order_class%% .dnxte-timline-pra", ), 'important' => 'all' ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_desc_settings', ), 'image' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-image-section img", 'border_styles' => "%%order_class%% .dnxte-timline-image-section img", ), 'important' => 'all' ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_image_settings', ), 'button' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-btn-more", 'border_styles' => "%%order_class%% .dnxte-timline-btn-more", ), 'important' => 'all' ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_btn_settings', ), 'identifier' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-date", 'border_styles' => "%%order_class%% .dnxte-timline-date", ), 'important' => 'all' ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_identifier_settings', ), 'icon' => array( 'css' => array( 'main' => array( 'border_radii' => "%%order_class%% .dnxte-timline-img", 'border_styles' => "%%order_class%% .dnxte-timline-img", ), 'important' => 'all' ), 'defaults' => array( 'border_radii' => 'on|50%|50%|50%|50%', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_icon_settings', ), ), 'box_shadow' => array( 'default' => array(), 'timeline' => array( 'label' => esc_html__('Timeline Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_timeline_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-content', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), 'title' => array( 'label' => esc_html__('Title Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_title_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-heading', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), 'content' => array( 'label' => esc_html__('Content Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_desc_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-pra', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), 'image' => array( 'label' => esc_html__('Image Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_image_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-image-section img', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), 'button' => array( 'label' => esc_html__('Button Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_btn_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-btn-more', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), 'identifer' => array( 'label' => esc_html__('Identifier Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_identifier_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-date', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), 'icon' => array( 'label' => esc_html__('Image/Icon Box Shadow', 'dnxte-divi-essential'), 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_icon_settings', 'css' => array( 'main' => '%%order_class%% .dnxte-timline-img', 'important' => 'all', 'custom_style' => true, ), 'default_on_fronts' => array( 'color' => '', 'position' => '', ), ), ) ); } public function get_fields() { $field = array( 'timeline_title' => array( 'label' => esc_html__('Title', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input Pre Heading text', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_timeline_elements', 'dynamic_content' => 'text', ), 'timeline_content' => array( 'label' => esc_html__('Content', 'dnxte-divi-essential'), 'type' => 'tiny_mce', 'option_category' => 'basic_option', 'description' => esc_html__('Input the main text content for your module here.', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_timeline_elements', 'dynamic_content' => 'text', ), 'timeline_use_image' => array( 'label' => esc_html__('Use Image', 'dnxte-divi-essential'), 'type' => 'yes_no_button', 'toggle_slug' => 'dnxte_timeline_elements', 'options' => array( 'on' => esc_html__('Yes', 'dnxte-divi-essential'), 'off' => esc_html__('No', 'dnxte-divi-essential'), ), 'affects' => array( 'timeline_main_image', 'timeline_main_image_alt' ), 'default_on_front' => 'on', ), 'timeline_main_image' => array( 'label' => esc_html__('Timeline Content 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 timeline section.', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_timeline_elements', 'dynamic_content' => 'image', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'timeline_use_image' => 'on' ) ), 'timeline_main_image_alt' => array( 'label' => esc_html__('Content Image Alt', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input Pre Heading text', 'dnxte-divi-essential'), 'default' => "Timeline main image", 'toggle_slug' => 'dnxte_timeline_elements', 'dynamic_content' => 'text', 'show_if' => array( 'timeline_use_image' => 'on' ) ), 'timeline_use_icon' => array( 'label' => esc_html__('Use Icon', 'dnxte-divi-essential'), 'type' => 'yes_no_button', 'toggle_slug' => 'dnxte_timeline_elements', 'options' => array( 'on' => esc_html__('Yes', 'dnxte-divi-essential'), 'off' => esc_html__('No', 'dnxte-divi-essential'), ), 'affects' => array( 'timeline_icon' ), 'default_on_front' => 'on', ), 'timeline_icon' => array( 'label' => esc_html__('Icon', 'dnxte-divi-essential'), 'type' => 'select_icon', 'class' => array('et-pb-font-icon'), 'default' => 'N', 'toggle_slug' => 'dnxte_timeline_elements', 'option_category' => 'basic_option', 'show_if' => array( 'timeline_use_icon' => 'on', ), ), 'timeline_image' => array( 'label' => esc_html__('Timeline Icon/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 icon section.', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_timeline_elements', 'dynamic_content' => 'image', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'timeline_use_icon' => 'off' ) ), 'timeline_date' => array( 'label' => esc_html__('Identifier', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Input Timeline date', 'dnxte-divi-essential'), 'toggle_slug' => 'dnxte_timeline_elements', 'dynamic_content' => 'text', ), 'timeline_use_button' => array( 'label' => esc_html__('Use Button', 'dnxte-divi-essential'), 'type' => 'yes_no_button', 'toggle_slug' => 'dnxte_timeline_elements', 'options' => array( 'on' => esc_html__('Yes', 'dnxte-divi-essential'), 'off' => esc_html__('No', 'dnxte-divi-essential'), ), 'affects' => array( 'timeline_button_text', 'timeline_button_link', 'timeline_button_target', ), 'default_on_front' => 'on', ), 'timeline_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' => 'dnxte_timeline_elements', 'dynamic_content' => 'text', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'timeline_use_button' => 'on', ), ), 'timeline_button_link' => array( 'label' => esc_html__('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' => 'dnxte_timeline_elements', 'show_if' => array( 'timeline_use_button' => 'on', ), ), 'timeline_button_target' => array( 'label' => esc_html__('Link Target', 'dnxte-divi-essential'), 'type' => 'select', 'description' => esc_html__('Select the link target', 'dnxte-divi-essential'), 'option_category' => 'basic_option', 'toggle_slug' => 'dnxte_timeline_elements', '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( 'timeline_use_button' => 'on', ), ), 'timeline_button_alignment'=> array( 'label' => esc_html__( 'Button Alignment', 'dnxte-divi-essential' ), 'description' => esc_html__( 'Align your button to the left, right or center of the module.', 'dnxte-divi-essential' ), 'type' => 'text_align', 'option_category' => 'configuration', 'options' => et_builder_get_text_orientation_options( array('justified') ), 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_btn_settings', 'mobile_options' => true, 'description' => esc_html__( 'Here you can define the alignment of Button', 'dnxte-divi-essential' ), ), 'timeline_icon_position' => array( 'label' => esc_html__('Icon Position', 'dnxte-divi-essential'), 'description' => esc_html__('Adjust the position of the icon within.', 'dnxte-divi-essential'), 'type' => 'range', 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_icon_settings', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'default' => '0px', 'default_unit' => 'px', 'default_on_front' => '0px', 'allow_empty' => true, 'range_settings' => array( 'min' => '0', 'max' => '100', 'step' => '1', ), 'mobile_options' => true, 'hover' => 'tabs', ), 'timeline_icon_color' => array( 'label' => esc_html__('Icon Color', 'dnxte-divi-essential'), 'type' => 'color-alpha', 'custom_color' => true, 'default' => '#545454', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_icon_settings', 'mobile_options' => true, 'hover' => 'tabs', 'show_if' => array( 'timeline_use_icon' => 'on' ) ), 'timeline_icon_size' => array( 'label' => esc_html__('Icon Size', 'dnxte-divi-essential'), 'description' => esc_html__('Adjust the size of the icon within.', 'dnxte-divi-essential'), 'type' => 'range', 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_icon_settings', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'default' => '16px', 'default_unit' => 'px', 'default_on_front' => '16px', 'allow_empty' => true, 'range_settings' => array( 'min' => '0', 'max' => '100', 'step' => '1', ), 'mobile_options' => true, 'hover' => 'tabs', ), 'timeline_title_margin' => array( 'label' => esc_html__('Title 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' => 'margin_padding', ), 'timeline_title_padding' => array( 'label' => esc_html__('Title 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' => 'margin_padding', ), 'timeline_desc_margin' => array( 'label' => esc_html__('Description 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' => 'margin_padding', ), 'timeline_desc_padding' => array( 'label' => esc_html__('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' => 'margin_padding', ), 'timeline_main_image_margin' => array( 'label' => esc_html__('Image 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' => 'margin_padding', ), 'timeline_main_image_padding' => array( 'label' => esc_html__('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' => 'margin_padding', ), 'timeline_btn_margin' => array( 'label' => esc_html__('Button 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' => 'margin_padding', ), 'timeline_btn_padding' => array( 'label' => esc_html__('Button 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' => 'margin_padding', ), 'timeline_icon_padding' => array( 'label' => esc_html__('Icon/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' => 'margin_padding', ), 'timeline_identifier_margin' => array( 'label' => esc_html__('Identifier 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' => 'margin_padding', ), 'timeline_identifier_padding' => array( 'label' => esc_html__('Identifier 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' => 'margin_padding', ), 'timeline_main_image_width' => array( 'label' => esc_html__('Image Width', 'dnxte-divi-essential'), 'description' => esc_html__('Adjust the position of the image within.', 'dnxte-divi-essential'), 'type' => 'range', 'option_category' => 'layout', 'tab_slug' => 'advanced', 'toggle_slug' => 'dnxte_image_settings', 'allowed_units' => array('%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw'), 'default' => '100%', 'default_unit' => '%', 'default_on_front' => '100%', 'allow_empty' => true, 'range_settings' => array( 'min' => '0', 'max' => '100', 'step' => '1', ), 'mobile_options' => true, 'hover' => 'tabs', ), 'timeline_main_image_alignment' => array( 'label' => esc_html__( 'Image Alignment', 'dnxte-divi-essential' ), 'description' => esc_html__( 'Align image 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' => 'dnxte_image_settings', 'mobile_options' => true, ), 'timeline_css_id' => array( 'label' => esc_html__('CSS ID', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Assign a unique CSS ID to the element which can be used to assign custom CSS styles from within your child theme or from within Divi\'s custom CSS inputs.', 'dnxte-divi-essential'), 'tab_slug' => 'custom_css', 'toggle_slug' => 'custom_class_id', ), 'timeline_css_classes' => array( 'label' => esc_html__('CSS Class', 'dnxte-divi-essential'), 'type' => 'text', 'option_category' => 'basic_option', 'description' => esc_html__('Assign any number of CSS Classes to the element, Separated by spaces, which can be used to assign custom CSS styles from within your child theme or from within Divi\'s custom CSS inputs.', 'dnxte-divi-essential'), 'tab_slug' => 'custom_css', 'toggle_slug' => 'custom_class_id', ), ); $additional = array( 'timeline_bg_color' => array( 'label' => esc_html__('Timeline Background', 'dnxte-divi-essential'), 'type' => 'background-field', 'base_name' => "timeline_bg", 'context' => "timeline_bg", 'option_category' => 'layout', 'custom_color' => true, 'default' => ET_Global_Settings::get_value('all_buttons_bg_color'), 'depends_show_if' => 'on', 'tab_slug' => 'advanced', 'toggle_slug' => "dnxte_timeline_settings", 'background_fields' => array_merge( ET_Builder_Element::generate_background_options( 'timeline_bg', 'gradient', "advanced", "dnxte_timeline_settings", "timeline_bg_gradient" ), ET_Builder_Element::generate_background_options( "timeline_bg", "color", "advanced", "dnxte_timeline_settings", "timeline_bg_color" ) ), 'mobile_options' => true, 'hover' => 'tabs' ), 'button_bg_color' => array( 'label' => esc_html__('Button Background', 'dnxte-divi-essential'), 'type' => 'background-field', 'base_name' => "button_bg", 'context' => "button_bg", 'option_category' => 'layout', 'custom_color' => true, 'default' => ET_Global_Settings::get_value('all_buttons_bg_color'), 'depends_show_if' => 'on', 'tab_slug' => 'advanced', 'toggle_slug' => "dnxte_btn_settings", 'background_fields' => array_merge( ET_Builder_Element::generate_background_options( 'button_bg', 'gradient', "advanced", "dnxte_btn_settings", "button_bg_gradient" ), ET_Builder_Element::generate_background_options( "button_bg", "color", "advanced", "dnxte_btn_settings", "button_bg_color" ) ), 'mobile_options' => true, 'hover' => 'tabs' ), 'icon_bg_color' => array( 'label' => esc_html__('Icon Background', 'dnxte-divi-essential'), 'type' => 'background-field', 'base_name' => "icon_bg", 'context' => "icon_bg", 'option_category' => 'layout', 'custom_color' => true, 'default' => ET_Global_Settings::get_value('all_buttons_bg_color'), 'depends_show_if' => 'on', 'tab_slug' => 'advanced', 'toggle_slug' => "dnxte_icon_settings", 'background_fields' => array_merge( ET_Builder_Element::generate_background_options( 'icon_bg', 'gradient', "advanced", "dnxte_icon_settings", "icon_bg_gradient" ), ET_Builder_Element::generate_background_options( "icon_bg", "color", "advanced", "dnxte_icon_settings", "icon_bg_color" ) ), 'mobile_options' => true, 'hover' => 'tabs' ) ); $additional = array_merge( $additional, $this->generate_background_options( 'timeline_bg', 'skip', "advanced", "dnxte_timeline_settings", "timeline_bg_gradient" ), $this->generate_background_options( 'button_bg', 'skip', "advanced", "dnxte_btn_settings", "button_bg_gradient" ), $this->generate_background_options( 'icon_bg', 'skip', "advanced", "dnxte_icon_settings", "icon_bg_gradient" ) ); $additional = array_merge( $additional, $this->generate_background_options( 'timeline_bg', 'skip', "advanced", "dnxte_timeline_settings", "timeline_bg_color" ), $this->generate_background_options( 'button_bg', 'skip', "advanced", "dnxte_btn_settings", "button_bg_color" ), $this->generate_background_options( 'icon_bg', 'skip', "advanced", "dnxte_icon_settings", "icon_bg_color" ) ); return array_merge($field,$additional); } public function render($attrs, $content, $render_slug){ $multi_view = et_pb_multi_view_options($this); $button_link = $this->props['timeline_button_link']; $button_target = $this->props['timeline_button_target']; $timeline_use_icon = $this->props['timeline_use_icon']; $timeline_css_id = "" !== $this->props['timeline_css_id'] ? sprintf('id="%1$s"', $this->props['timeline_css_id']) : ""; $timeline_css_classes = "" !== $this->props['timeline_css_classes'] ? $this->props['timeline_css_classes'] : ""; // Image $dnxte_timeline_img = ""; if ($this->props['timeline_use_icon'] === "off" && $multi_view->has_value('timeline_image')) { $dnxte_timeline_img = Common::get_image_html( 'timeline_image', // image_slug 'timeline', // alt_text '', // title $multi_view, // multi_view $this // context ); } // Content Image $image_alignment_classes = Common::get_alignment("timeline_main_image_alignment", $this); $dnxte_timeline_main_image_html = ""; $dnxte_timeline_main_image = ""; if($this->props['timeline_use_image'] === "on" && $multi_view->has_value('timeline_main_image')) { $dnxte_timeline_main_image = Common::get_image_html( 'timeline_main_image', // image_slug esc_attr( $this->props['timeline_main_image_alt'] ), // alt_text '', // title $multi_view, // multi_view $this // context ); $dnxte_timeline_main_image_html = 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( ["