class ET_Builder_Module_Blurb extends ET_Builder_Module {
$this->name = esc_html__( 'Blurb', 'et_builder' );
$this->plural = esc_html__( 'Blurbs', 'et_builder' );
$this->slug = 'et_pb_blurb';
$this->vb_support = 'on';
$this->main_css_element = '%%order_class%%.et_pb_blurb';
$this->settings_modal_toggles = array(
'main_content' => et_builder_i18n( 'Text' ),
'image' => esc_html__( 'Image & Icon', 'et_builder' ),
'icon_settings' => esc_html__( 'Image & Icon', 'et_builder' ),
'title' => et_builder_i18n( 'Text' ),
'title' => et_builder_i18n( 'Sizing' ),
'title' => esc_html__( 'Animation', 'et_builder' ),
'title' => esc_html__( 'Attributes', 'et_builder' ),
$this->advanced_fields = array(
'label' => et_builder_i18n( 'Title' ),
'main' => "{$this->main_css_element} .et_pb_module_header, {$this->main_css_element} .et_pb_module_header a",
'hover' => "{$this->main_css_element}:hover .et_pb_module_header, {$this->main_css_element}:hover .et_pb_module_header a",
'label' => et_builder_i18n( 'Body' ),
'line_height' => "{$this->main_css_element} p",
'text_align' => "{$this->main_css_element} .et_pb_blurb_description",
'text_shadow' => "{$this->main_css_element} .et_pb_blurb_description",
'block_elements' => array(
'tabbed_subtoggles' => true,
'bb_icons_support' => true,
'main' => "{$this->main_css_element} .et_pb_blurb_description",
'border_radii' => '%%order_class%% .et_pb_main_blurb_image .et_pb_image_wrap',
'border_radii_hover' => '%%order_class%%:hover .et_pb_main_blurb_image .et_pb_image_wrap',
'border_styles' => '%%order_class%% .et_pb_main_blurb_image .et_pb_image_wrap',
'border_styles_hover' => '%%order_class%%:hover .et_pb_main_blurb_image .et_pb_image_wrap',
'label_prefix' => et_builder_i18n( 'Image' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'depends_on' => array( 'use_icon' ),
'depends_show_if' => 'off',
'label' => esc_html__( 'Image Box Shadow', 'et_builder' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'main' => '%%order_class%% .et_pb_main_blurb_image .et_pb_image_wrap',
'hover' => '%%order_class%%:hover .et_pb_main_blurb_image .et_pb_image_wrap',
'default_on_fronts' => array(
'margin_padding' => array(
'main' => $this->main_css_element,
'module_alignment' => '%%order_class%%.et_pb_blurb.et_pb_module',
'use_background_layout' => true,
'text_shadow' => "{$this->main_css_element} .et_pb_blurb_container",
'background_layout' => array(
'default_on_front' => 'light',
'text_orientation' => array(
'default_on_front' => 'left',
'child_filters_target' => array(
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'depends_show_if' => 'off',
'main' => '%%order_class%% .et_pb_main_blurb_image',
'hover' => '%%order_class%%:hover .et_pb_main_blurb_image',
'icon_settings' => array(
'main' => '%%order_class%% .et_pb_main_blurb_image',
$this->custom_css_fields = array(
'label' => esc_html__( 'Blurb Image', 'et_builder' ),
'selector' => '.et_pb_main_blurb_image',
'label' => esc_html__( 'Blurb Title', 'et_builder' ),
'selector' => '.et_pb_module_header',
'blurb_content' => array(
'label' => esc_html__( 'Blurb Content', 'et_builder' ),
'selector' => '.et_pb_blurb_content',
$this->help_videos = array(
'name' => esc_html__( 'An introduction to the Blurb module', 'et_builder' ),
$et_accent_color = et_builder_accent_color();
$image_icon_placement = array(
'top' => et_builder_i18n( 'Top' ),
$image_icon_placement['left'] = et_builder_i18n( 'Left' );
$image_icon_placement['right'] = et_builder_i18n( 'Right' );
'label' => et_builder_i18n( 'Title' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'The title of your blurb will appear in bold below your blurb image.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'mobile_options' => true,
'label' => esc_html__( 'Title Link URL', 'et_builder' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'If you would like to make your blurb a link, input your destination URL here.', 'et_builder' ),
'toggle_slug' => 'link_options',
'dynamic_content' => 'url',
'url_new_window' => array(
'label' => esc_html__( 'Title Link Target', 'et_builder' ),
'option_category' => 'configuration',
'off' => esc_html__( 'In The Same Window', 'et_builder' ),
'on' => esc_html__( 'In The New Tab', 'et_builder' ),
'toggle_slug' => 'link_options',
'description' => esc_html__( 'Here you can choose whether or not your link opens in a new window', 'et_builder' ),
'default_on_front' => 'off',
'label' => esc_html__( 'Use Icon', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'basic_option',
'off' => et_builder_i18n( 'No' ),
'on' => et_builder_i18n( 'Yes' ),
'toggle_slug' => 'image',
'child_filter_hue_rotate',
'child_filter_brightness',
'description' => esc_html__( 'Here you can choose whether icon set below should be used.', 'et_builder' ),
'default_on_front' => 'off',
'label' => esc_html__( 'Icon', 'et_builder' ),
'option_category' => 'basic_option',
'class' => array( 'et-pb-font-icon' ),
'toggle_slug' => 'image',
'description' => esc_html__( 'Choose an icon to display with your blurb.', 'et_builder' ),
'depends_show_if' => 'on',
'mobile_options' => true,
'default' => $et_accent_color,
'label' => esc_html__( 'Icon Color', 'et_builder' ),
'description' => esc_html__( 'Here you can define a custom color for your icon.', 'et_builder' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'mobile_options' => true,
'label' => esc_html__( 'Circle Icon', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'No' ),
'on' => et_builder_i18n( 'Yes' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'description' => esc_html__( 'Here you can choose whether icon set above should display within a circle.', 'et_builder' ),
'depends_show_if' => 'on',
'default_on_front' => 'off',
'default' => $et_accent_color,
'label' => esc_html__( 'Circle Color', 'et_builder' ),
'description' => esc_html__( 'Here you can define a custom color for the icon circle.', 'et_builder' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'mobile_options' => true,
'use_circle_border' => array(
'label' => esc_html__( 'Show Circle Border', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'layout',
'off' => et_builder_i18n( 'No' ),
'on' => et_builder_i18n( 'Yes' ),
'description' => esc_html__( 'Here you can choose whether if the icon circle border should display.', 'et_builder' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'default_on_front' => 'off',
'circle_border_color' => array(
'default' => $et_accent_color,
'label' => esc_html__( 'Circle Border Color', 'et_builder' ),
'description' => esc_html__( 'Here you can define a custom color for the icon circle border.', 'et_builder' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'mobile_options' => true,
'label' => et_builder_i18n( 'Image' ),
'option_category' => 'basic_option',
'upload_button_text' => et_builder_i18n( 'Upload an image' ),
'choose_text' => esc_attr__( 'Choose an Image', 'et_builder' ),
'update_text' => esc_attr__( 'Set As Image', 'et_builder' ),
'depends_show_if' => 'off',
'description' => esc_html__( 'Upload an image to display at the top of your blurb.', 'et_builder' ),
'toggle_slug' => 'image',
'dynamic_content' => 'image',
'mobile_options' => true,
'label' => esc_html__( 'Image Alt Text', 'et_builder' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'Define the HTML ALT text for your image here.', 'et_builder' ),
'depends_show_if' => 'off',
'tab_slug' => 'custom_css',
'toggle_slug' => 'attributes',
'dynamic_content' => 'text',
'icon_placement' => array(
'label' => esc_html__( 'Image/Icon Placement', 'et_builder' ),
'option_category' => 'layout',
'options' => $image_icon_placement,
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'description' => esc_html__( 'Here you can choose where to place the icon.', 'et_builder' ),
'default_on_front' => 'top',
'mobile_options' => true,
'icon_alignment' => array(
'label' => esc_html__( 'Image/Icon Alignment', 'et_builder' ),
'description' => esc_html__( 'Align image/icon to the left, right or center.', 'et_builder' ),
'option_category' => 'layout',
'options' => et_builder_get_text_orientation_options( array( 'justified' ) ),
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'mobile_options' => true,
'icon_placement' => 'top',
'label' => et_builder_i18n( 'Body' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'Input the main text content for your module here.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'mobile_options' => true,
'image_max_width' => array(
'label' => esc_html__( 'Image Width', 'et_builder' ),
'description' => esc_html__( 'Adjust the width of the image within the blurb.', 'et_builder' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'width',
'mobile_options' => true,
'depends_show_if' => 'off',
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
'default_on_front' => '',
'range_settings' => array(
'content_max_width' => array(
'label' => esc_html__( 'Content Width', 'et_builder' ),
'description' => esc_html__( 'Adjust the width of the content within the blurb.', 'et_builder' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'width',
'mobile_options' => true,
'default_on_front' => '',
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
'range_settings' => array(
'use_icon_font_size' => array(
'label' => esc_html__( 'Use Icon Font Size', 'et_builder' ),
'description' => esc_html__( 'If you would like to control the size of the icon, you must first enable this option.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'font_option',
'off' => et_builder_i18n( 'No' ),
'on' => et_builder_i18n( 'Yes' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'default_on_front' => 'off',
'icon_font_size' => array(
'label' => esc_html__( 'Icon Font Size', 'et_builder' ),
'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'et_builder' ),
'option_category' => 'font_option',
'tab_slug' => 'advanced',
'toggle_slug' => 'icon_settings',
'default_on_front' => '',
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
'range_settings' => array(
'mobile_options' => true,
'depends_show_if' => 'on',
public function get_transition_fields_css_props() {
$fields = parent::get_transition_fields_css_props();
$fields['icon_color'] = array(
'color' => '%%order_class%% .et-pb-icon',
$fields['circle_color'] = array(