name = esc_html__('Flip Card', 'addons-for-divi'); $this->icon_path = $this->dtl_icon_path('flip-box'); $this->slug = 'ba_flipbox'; $this->vb_support = 'on'; $this->settings_modal_toggles = array( 'general' => array( 'toggles' => array( 'front' => esc_html__('Front Side', 'addons-for-divi'), 'back' => esc_html__('Back Side', 'addons-for-divi'), 'settings' => esc_html__('Settings', 'addons-for-divi'), ), ), 'advanced' => array( 'toggles' => array( 'front' => esc_html__('Front Side', 'addons-for-divi'), 'back' => esc_html__('Back Side', 'addons-for-divi'), 'front_media' => esc_html__('Front Media', 'addons-for-divi'), 'back_media' => esc_html__('Back Media', 'addons-for-divi'), 'front_text' => array( 'title' => esc_html__('Front Texts', 'addons-for-divi'), 'tabbed_subtoggles' => true, 'sub_toggles' => array( 'title' => array( 'name' => esc_html__('Title', 'addons-for-divi'), ), 'subtitle' => array( 'name' => esc_html__('Subtitle', 'addons-for-divi'), ), 'description' => array( 'name' => esc_html__('Description', 'addons-for-divi'), ), ), ), 'back_text' => array( 'title' => esc_html__('Back Texts', 'addons-for-divi'), 'tabbed_subtoggles' => true, 'sub_toggles' => array( 'title' => array( 'name' => esc_html__('Title', 'addons-for-divi'), ), 'subtitle' => array( 'name' => esc_html__('Subtitle', 'addons-for-divi'), ), 'description' => array( 'name' => esc_html__('Description', 'addons-for-divi'), ), ), ), 'button' => esc_html__('Button', 'addons-for-divi'), 'border' => esc_html__('Border', 'addons-for-divi'), 'box_shadow' => esc_html__('Box Shadow', 'addons-for-divi'), ), ), ); $this->custom_css_fields = array( 'front_icon' => array( 'label' => esc_html__('Front Icon', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-icon-front i', ), 'front_img' => array( 'label' => esc_html__('Front Image', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-figure-front img', ), 'front_title' => array( 'label' => esc_html__('Front Title', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-title-front', ), 'front_sub_title' => array( 'label' => esc_html__('Front Sub Title', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-subtitle-front', ), 'front_desc' => array( 'label' => esc_html__('Front Description', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-desc-front', ), 'back_icon' => array( 'label' => esc_html__('Back Icon', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-icon-back i', ), 'back_img' => array( 'label' => esc_html__('Back Image', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-figure-back img', ), 'back_title' => array( 'label' => esc_html__('Back Title', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-title-back', ), 'back_sub_title' => array( 'label' => esc_html__('Back Sub Title', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-subtitle-back', ), 'back_desc' => array( 'label' => esc_html__('Back Description', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-desc-front', ), 'back_btn' => array( 'label' => esc_html__('Back Button', 'addons-for-divi'), 'selector' => '%%order_class%% .dtq-flipbox-btn', ), ); } public function get_fields() { $front_content = array( 'front_media_type' => array( 'label' => esc_html__('Media Type', 'addons-for-divi'), 'description' => esc_html__('Select front side media type.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'front', 'default' => 'icon', 'options' => array( 'none' => esc_html__('None', 'addons-for-divi'), 'icon' => esc_html__('Icon', 'addons-for-divi'), 'image' => esc_html__('Image', 'addons-for-divi'), ), ), 'front_icon' => array( 'label' => esc_html__('Select Icon', 'addons-for-divi'), 'description' => esc_html__('Select front side icon.', 'addons-for-divi'), 'type' => 'select_icon', 'default' => '||divi||400', 'toggle_slug' => 'front', 'tab_slug' => 'general', 'show_if' => array( 'front_media_type' => 'icon', ), ), 'front_img' => array( 'label' => esc_html__('Upload Image', 'addons-for-divi'), 'description' => esc_html__('Upload an image or type in the URL of the image you would like to display for the front side.', 'addons-for-divi'), 'type' => 'upload', 'default' => DIVI_TORQUE_LITE_ASSETS . 'imgs/placeholder.svg', 'upload_button_text' => esc_attr__('Upload an image', 'addons-for-divi'), 'choose_text' => esc_attr__('Choose an Image', 'addons-for-divi'), 'update_text' => esc_attr__('Set As Image', 'addons-for-divi'), 'toggle_slug' => 'front', 'show_if' => array( 'front_media_type' => 'image', ), ), 'front_img_alt' => array( 'label' => esc_html__('Image Alt Text', 'addons-for-divi'), 'description' => esc_html__('Define the front side image alt text for your flip box.', 'addons-for-divi'), 'type' => 'text', 'toggle_slug' => 'front', 'show_if' => array( 'front_media_type' => 'image', ), ), 'front_title' => array( 'label' => esc_html__('Front Title', 'addons-for-divi'), 'description' => esc_html__('Define the front side title for your flip box.', 'addons-for-divi'), 'type' => 'text', 'toggle_slug' => 'front', 'dynamic_content' => 'text', ), 'front_subtitle' => array( 'label' => esc_html__('Front Sub Title', 'addons-for-divi'), 'description' => esc_html__('Define the front side sub-title for your flip box.', 'addons-for-divi'), 'type' => 'text', 'toggle_slug' => 'front', 'dynamic_content' => 'text', ), 'front_description' => array( 'label' => esc_html__('Front Description', 'addons-for-divi'), 'description' => esc_html__('Define the front side description text for your flip box.', 'addons-for-divi'), 'type' => 'textarea', 'toggle_slug' => 'front', 'dynamic_content' => 'text', ), ); $back_content = array( 'back_media_type' => array( 'label' => esc_html__('Media Type', 'addons-for-divi'), 'description' => esc_html__('Select back side media type.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'back', 'default' => 'icon', 'options' => array( 'none' => esc_html__('None', 'addons-for-divi'), 'icon' => esc_html__('Icon', 'addons-for-divi'), 'image' => esc_html__('Image', 'addons-for-divi'), ), ), 'back_icon' => array( 'label' => esc_html__('Select Icon', 'addons-for-divi'), 'description' => esc_html__('Select back side icon.', 'addons-for-divi'), 'type' => 'select_icon', 'toggle_slug' => 'back', 'default' => '+||divi||400', 'tab_slug' => 'general', 'show_if' => array( 'back_media_type' => 'icon', ), ), 'back_img' => array( 'label' => esc_html__('Upload Image', 'addons-for-divi'), 'description' => esc_html__('Upload an image or type in the URL of the image you would like to display for the back side.', 'addons-for-divi'), 'type' => 'upload', 'default' => DIVI_TORQUE_LITE_ASSETS . 'imgs/placeholder.svg', 'upload_button_text' => esc_attr__('Upload an image', 'addons-for-divi'), 'choose_text' => esc_attr__('Choose an Image', 'addons-for-divi'), 'update_text' => esc_attr__('Set As Image', 'addons-for-divi'), 'toggle_slug' => 'back', 'show_if' => array( 'back_media_type' => 'image', ), ), 'back_img_alt' => array( 'label' => esc_html__('Image Alt Text', 'addons-for-divi'), 'description' => esc_html__('Define the back side image alt text for your flip box.', 'addons-for-divi'), 'type' => 'text', 'toggle_slug' => 'back', 'show_if' => array( 'back_media_type' => 'image', ), ), 'back_title' => array( 'label' => esc_html__('Back Title', 'addons-for-divi'), 'description' => esc_html__('Define the back side title for your flip box.', 'addons-for-divi'), 'type' => 'text', 'toggle_slug' => 'back', 'dynamic_content' => 'text', ), 'back_subtitle' => array( 'label' => esc_html__('Back Sub Title', 'addons-for-divi'), 'description' => esc_html__('Define the back side sub-title for your flip box.', 'addons-for-divi'), 'type' => 'text', 'toggle_slug' => 'back', 'dynamic_content' => 'text', ), 'back_description' => array( 'label' => esc_html__('Back Description', 'addons-for-divi'), 'description' => esc_html__('Define the back side description text for your flip box.', 'addons-for-divi'), 'type' => 'textarea', 'toggle_slug' => 'back', 'dynamic_content' => 'text', ), 'use_button' => array( 'label' => esc_html__('Use Button', 'addons-for-divi'), 'description' => esc_html__('Here you can choose whether button should be used.', 'addons-for-divi'), 'type' => 'yes_no_button', 'option_category' => 'configuration', 'options' => array( 'on' => esc_html__('Yes', 'addons-for-divi'), 'off' => esc_html__('No', 'addons-for-divi'), ), 'default' => 'off', 'toggle_slug' => 'back', ), 'button_text' => array( 'label' => esc_html__('Button Text', 'addons-for-divi'), 'description' => esc_html__('Here you can define the button text.', 'addons-for-divi'), 'type' => 'text', 'default' => 'Click Here', 'toggle_slug' => 'back', 'dynamic_content' => 'text', 'show_if' => array( 'use_button' => 'on', ), ), 'button_link' => array( 'label' => esc_html__('Button Link', 'addons-for-divi'), 'description' => esc_html__('Define the button link url for your button.', 'addons-for-divi'), 'type' => 'text', 'default' => '', 'toggle_slug' => 'back', 'dynamic_content' => 'url', 'show_if' => array( 'use_button' => 'on', ), ), 'is_new_window' => array( 'label' => esc_html__('Open Button link in new window', 'addons-for-divi'), 'description' => esc_html__('Here you can choose whether button URL should be opened in new window.', 'addons-for-divi'), 'type' => 'yes_no_button', 'option_category' => 'configuration', 'options' => array( 'on' => esc_html__('Yes', 'addons-for-divi'), 'off' => esc_html__('No', 'addons-for-divi'), ), 'default' => 'off', 'toggle_slug' => 'back', 'show_if' => array( 'use_button' => 'on', ), ), ); $settings = array( 'animation_type' => array( 'label' => esc_html__('Animation Type', 'addons-for-divi'), 'description' => esc_html__('Select the animation type.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'settings', 'default' => 'flip', 'options' => array( 'flip' => esc_html__('Flip', 'addons-for-divi'), 'diagonal' => esc_html__('Flip Diagonal', 'addons-for-divi'), 'shake' => esc_html__('Flip Shake', 'addons-for-divi'), 'push' => esc_html__('Push', 'addons-for-divi'), 'slide' => esc_html__('Slide', 'addons-for-divi'), 'fade' => esc_html__('Fade', 'addons-for-divi'), 'zoom_in' => esc_html__('Zoom In', 'addons-for-divi'), 'zoom_out' => esc_html__('Zoom Out', 'addons-for-divi'), 'rotate_3d' => esc_html__('Rotate 3D', 'addons-for-divi'), 'open_up' => esc_html__('Open Up', 'addons-for-divi'), ), ), 'flank_color' => array( 'label' => esc_html__('Divider Flank Color', 'addons-for-divi'), 'description' => esc_html__('Pick a color to use for the flank color.', 'addons-for-divi'), 'type' => 'color-alpha', 'custom_color' => true, 'default' => '#dddddd', 'toggle_slug' => 'settings', 'show_if' => array( 'animation_type' => 'rotate_3d', ), ), 'direction' => array( 'label' => esc_html__('Animation Direction', 'addons-for-divi'), 'description' => esc_html__('Select the animation direction.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'settings', 'default' => 'right', 'options' => array( 'up' => esc_html__('Up', 'addons-for-divi'), 'right' => esc_html__('Right', 'addons-for-divi'), 'down' => esc_html__('Down', 'addons-for-divi'), 'left' => esc_html__('Left', 'addons-for-divi'), ), 'show_if' => array( 'animation_type' => array('flip', 'push', 'slide'), ), ), 'direction_diagonal' => array( 'label' => esc_html__('Animation Direction', 'addons-for-divi'), 'description' => esc_html__('Select the animation direction.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'settings', 'default' => 'right', 'options' => array( 'right' => esc_html__('Right', 'addons-for-divi'), 'left' => esc_html__('Left', 'addons-for-divi'), ), 'show_if' => array( 'animation_type' => 'diagonal', ), ), 'direction_alt' => array( 'label' => esc_html__('Animation Direction', 'addons-for-divi'), 'description' => esc_html__('Select the animation direction.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'settings', 'default' => 'h', 'options' => array( 'v' => esc_html__('Vertical', 'addons-for-divi'), 'h' => esc_html__('Horizontal', 'addons-for-divi'), ), 'show_if' => array( 'animation_type' => 'rotate_3d', ), ), 'animation_3d' => array( 'label' => esc_html__('Use 3d Animation', 'addons-for-divi'), 'description' => esc_html__('Here you can choose whether 3d animation should be used.', 'addons-for-divi'), 'type' => 'yes_no_button', 'option_category' => 'configuration', 'options' => array( 'on' => esc_html__('Yes', 'addons-for-divi'), 'off' => esc_html__('No', 'addons-for-divi'), ), 'default' => 'off', 'toggle_slug' => 'settings', 'show_if' => array( 'animation_type' => 'flip', ), ), 'duration' => array( 'label' => esc_html__('Animation Duration', 'addons-for-divi'), 'description' => esc_html__('Define the length of time that the animation takes.', 'addons-for-divi'), 'type' => 'range', 'default' => '600ms', 'fixed_unit' => 'ms', 'range_settings' => array( 'min' => 0, 'step' => 50, 'max' => 3000, ), 'toggle_slug' => 'settings', ), 'main_height' => array( 'label' => esc_html__('Height', 'addons-for-divi'), 'description' => esc_html__('Define height for your flip box.', 'addons-for-divi'), 'type' => 'range', 'default' => '300px', 'default_unit' => 'px', 'mobile_options' => true, 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'settings', ), ); $front_media = array( 'front_img_position' => array( 'label' => esc_html__('Position', 'addons-for-divi'), 'description' => esc_html__('Select image position for the front side.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'front_media', 'tab_slug' => 'advanced', 'default' => 'center', 'options' => array( 'left' => esc_html__('Left', 'addons-for-divi'), 'center' => esc_html__('Center', 'addons-for-divi'), 'right' => esc_html__('Right', 'addons-for-divi'), ), ), 'front_img_padding' => array( 'label' => esc_html__('Padding', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom padding for your front side icon/image.', 'addons-for-divi'), 'type' => 'custom_padding', 'toggle_slug' => 'front_media', 'tab_slug' => 'advanced', 'default' => '0px|0px|0px|0px', 'mobile_options' => true, 'show_if' => array( 'front_media_type' => 'image', ), ), 'front_icon_color' => array( 'label' => esc_html__('Icon Color', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom color for your front side icon.', 'addons-for-divi'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced', 'toggle_slug' => 'front_media', 'show_if' => array( 'front_media_type' => 'icon', ), ), 'front_icon_size' => array( 'label' => esc_html__('Icon Size', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom size for your front side icon.', 'addons-for-divi'), 'type' => 'range', 'default_unit' => 'px', 'default' => '60px', 'mobile_options' => true, 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'front_media', 'tab_slug' => 'advanced', 'show_if' => array( 'front_media_type' => 'icon', ), ), 'front_img_height' => array( 'label' => esc_html__('Height', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom height for your front side image/icon.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'front_media', 'tab_slug' => 'advanced', ), 'front_img_width' => array( 'label' => esc_html__('Width', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom width for your front side image/icon.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'front_media', 'tab_slug' => 'advanced', ), ); $back_media = array( 'back_img_position' => array( 'label' => esc_html__('Position', 'addons-for-divi'), 'description' => esc_html__('Select image position for the back side.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'back_media', 'tab_slug' => 'advanced', 'default' => 'center', 'options' => array( 'flex-start' => esc_html__('Left', 'addons-for-divi'), 'center' => esc_html__('Center', 'addons-for-divi'), 'flex-end' => esc_html__('Right', 'addons-for-divi'), ), ), 'back_img_padding' => array( 'label' => esc_html__('Padding', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom padding for your back side icon/image.', 'addons-for-divi'), 'type' => 'custom_padding', 'toggle_slug' => 'back_media', 'tab_slug' => 'advanced', 'default' => '0px|0px|0px|0px', 'mobile_options' => true, 'show_if' => array( 'back_media_type' => 'image', ), ), 'back_icon_color' => array( 'label' => esc_html__('Icon Color', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom color for your back side icon.', 'addons-for-divi'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced', 'toggle_slug' => 'back_media', 'show_if' => array( 'back_media_type' => 'icon', ), ), 'back_icon_size' => array( 'label' => esc_html__('Icon Size', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom size for your back side icon.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'default' => '60px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'back_media', 'tab_slug' => 'advanced', 'show_if' => array( 'back_media_type' => 'icon', ), ), 'back_img_height' => array( 'label' => esc_html__('Height', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom height for your back side image/icon.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'back_media', 'tab_slug' => 'advanced', ), 'back_img_width' => array( 'label' => esc_html__('Width', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom width for your back side image/icon.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'toggle_slug' => 'back_media', 'tab_slug' => 'advanced', ), ); $front_design = array( 'front_alignment' => array( 'label' => esc_html__('Content Alignment', 'addons-for-divi'), 'description' => esc_html__('Align content to the left, right or center.', 'addons-for-divi'), 'type' => 'text_align', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(array('justified')), 'options_icon' => 'text_align', 'default_on_front' => 'center', 'toggle_slug' => 'front', 'tab_slug' => 'advanced', 'mobile_options' => true, ), 'front_align_items' => array( 'label' => esc_html__('Content Vertical Alignment', 'addons-for-divi'), 'description' => esc_html__('Select front side content vertical alignment.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'front', 'tab_slug' => 'advanced', 'default' => 'center', 'options' => array( 'flex-start' => esc_html__('Start', 'addons-for-divi'), 'center' => esc_html__('Center', 'addons-for-divi'), 'flex-end' => esc_html__('End', 'addons-for-divi'), ), ), 'front_padding' => array( 'label' => esc_html__('Padding', 'addons-for-divi'), 'description' => esc_html__('Padding adds extra space to the inside of the element, increasing the distance between the edge of the element and its inner contents.', 'addons-for-divi'), 'type' => 'custom_padding', 'toggle_slug' => 'front', 'tab_slug' => 'advanced', 'default' => '30px|30px|30px|30px', 'mobile_options' => true, ), 'front_ct_padding' => array( 'label' => esc_html__('Content Padding', 'addons-for-divi'), 'description' => esc_html__('Set front side card content padding.', 'addons-for-divi'), 'type' => 'custom_padding', 'toggle_slug' => 'front', 'tab_slug' => 'advanced', 'default' => '0px|0px|0px|0px', 'mobile_options' => true, ), ); $back_design = array( 'back_alignment' => array( 'label' => esc_html__('Content Alignment', 'addons-for-divi'), 'description' => esc_html__('Align content to the left, right or center.', 'addons-for-divi'), 'type' => 'text_align', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(array('justified')), 'options_icon' => 'text_align', 'default_on_front' => 'center', 'toggle_slug' => 'back', 'tab_slug' => 'advanced', 'mobile_options' => true, ), 'back_align_items' => array( 'label' => esc_html__('Content Vertical Alignment', 'addons-for-divi'), 'description' => esc_html__('Select back side content vertical alignment.', 'addons-for-divi'), 'type' => 'select', 'toggle_slug' => 'back', 'tab_slug' => 'advanced', 'default' => 'center', 'options' => array( 'flex-start' => esc_html__('Start', 'addons-for-divi'), 'center' => esc_html__('Center', 'addons-for-divi'), 'flex-end' => esc_html__('End', 'addons-for-divi'), ), ), 'back_padding' => array( 'label' => esc_html__('Padding', 'addons-for-divi'), 'description' => esc_html__('Padding adds extra space to the inside of the element, increasing the distance between the edge of the element and its inner contents.', 'addons-for-divi'), 'type' => 'custom_padding', 'toggle_slug' => 'back', 'tab_slug' => 'advanced', 'default' => '30px|30px|30px|30px', 'mobile_options' => true, ), 'back_ct_padding' => array( 'label' => esc_html__('Content Padding', 'addons-for-divi'), 'description' => esc_html__('Set back side card content padding.', 'addons-for-divi'), 'type' => 'custom_padding', 'toggle_slug' => 'back', 'tab_slug' => 'advanced', 'default' => '0px|0px|0px|0px', 'mobile_options' => true, ), ); $front_bg = $this->custom_background_fields( 'front', '', 'advanced', 'front', array('color', 'gradient', 'image'), array(), '#efefef' ); $back_bg = $this->custom_background_fields( 'back', '', 'advanced', 'back', array('color', 'gradient', 'image'), array(), '#efefef' ); $front_img_bg = $this->custom_background_fields( 'front_img', '', 'advanced', 'front_media', array('color', 'gradient', 'image'), array(), '' ); $back_img_bg = $this->custom_background_fields( 'back_img', '', 'advanced', 'back_media', array('color', 'gradient', 'image'), array(), '' ); $texts_spacing = array( 'front_subtitle_spacing' => array( 'label' => esc_html__('Spacing Top', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom spacing at the top of the front card subtitle.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'default' => '0px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 150, ), 'toggle_slug' => 'front_text', 'sub_toggle' => 'subtitle', 'tab_slug' => 'advanced', ), 'back_subtitle_spacing' => array( 'label' => esc_html__('Spacing Top', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom spacing at the top of the back card subtitle.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'default' => '0px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 150, ), 'toggle_slug' => 'back_text', 'sub_toggle' => 'subtitle', 'tab_slug' => 'advanced', ), 'front_desc_spacing' => array( 'label' => esc_html__('Spacing Top', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom spacing at the top of the front card description.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'default' => '0px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 150, ), 'toggle_slug' => 'front_text', 'sub_toggle' => 'description', 'tab_slug' => 'advanced', ), 'back_desc_spacing' => array( 'label' => esc_html__('Spacing Top', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom spacing at the top of the back card description.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'default' => '0px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 150, ), 'toggle_slug' => 'back_text', 'sub_toggle' => 'description', 'tab_slug' => 'advanced', ), ); $button = array( 'btn_spacing' => array( 'label' => esc_html__('Spacing Top', 'addons-for-divi'), 'description' => esc_html__('Here you can define a custom spacing at the top of the back card button.', 'addons-for-divi'), 'type' => 'range', 'mobile_options' => true, 'default_unit' => 'px', 'default' => '15px', 'range_settings' => array( 'min' => 0, 'step' => 1, 'max' => 150, ), 'toggle_slug' => 'button', 'tab_slug' => 'advanced', ), ); return array_merge( $front_content, $back_content, $settings, $front_design, $back_design, $front_media, $back_media, $back_bg, $front_bg, $front_img_bg, $back_img_bg, $texts_spacing, $button ); } public function get_advanced_fields_config() { $advanced_fields = array(); $advanced_fields['text'] = false; $advanced_fields['text_shadow'] = false; $advanced_fields['fonts'] = array(); $advanced_fields['box_shadow']['card'] = array( 'label' => esc_html__('Box Shadow', 'addons-for-divi'), 'toggle_slug' => 'box_shadow', 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-card', 'important' => 'all', ), ); $advanced_fields['borders']['card'] = array( 'toggle_slug' => 'border', 'css' => array( 'main' => array( 'border_radii' => '%%order_class%% .dtq-flipbox-card', 'border_styles' => '%%order_class%% .dtq-flipbox-card', ), 'important' => 'all', ), 'defaults' => array( 'border_radii' => 'on|0px|0px|0px|0px', 'border_styles' => array( 'width' => '0px', 'color' => '#333333', 'style' => 'solid', ), ), ); $advanced_fields['borders']['front_media'] = array( 'toggle_slug' => 'front_media', 'css' => array( 'main' => array( 'border_radii' => '%%order_class%% .dtq-flipbox-figure-front', 'border_styles' => '%%order_class%% .dtq-flipbox-figure-front', ), 'important' => 'all', ), ); $advanced_fields['borders']['back_media'] = array( 'toggle_slug' => 'back_media', 'css' => array( 'main' => array( 'border_radii' => '%%order_class%% .dtq-flipbox-figure-back', 'border_styles' => '%%order_class%% .dtq-flipbox-figure-back', ), 'important' => 'all', ), ); $advanced_fields['fonts']['front_title'] = array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-title-front', 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'front_text', 'sub_toggle' => 'title', 'hide_text_align' => true, 'font_size' => array( 'default' => '26px', ), 'line_height' => array( 'default' => '1.5em', ), ); $advanced_fields['fonts']['front_description'] = array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-desc-front', 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'front_text', 'sub_toggle' => 'description', 'hide_text_align' => true, 'font_size' => array( 'default' => '14px', ), 'line_height' => array( 'default' => '1.6em', ), ); $advanced_fields['fonts']['back_title'] = array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-title-back', 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'back_text', 'sub_toggle' => 'title', 'hide_text_align' => true, 'font_size' => array( 'default' => '26px', ), 'line_height' => array( 'default' => '1.5em', ), ); $advanced_fields['fonts']['back_description'] = array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-desc-back', 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'back_text', 'sub_toggle' => 'description', 'hide_text_align' => true, 'font_size' => array( 'default' => '14px', ), 'line_height' => array( 'default' => '1.6em', ), ); $advanced_fields['button']['back_btn'] = array( 'label' => esc_html__('Button', 'addons-for-divi'), 'toggle_slug' => 'button', 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-btn', 'important' => 'all', ), 'use_alignment' => false, 'box_shadow' => array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-btn', ), ), 'borders' => array( 'css' => array( 'important' => 'all', ), ), 'margin_padding' => array( 'css' => array( 'important' => 'all', ), ), ); $advanced_fields['fonts']['front_subtitle'] = array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-subtitle-front', 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'front_text', 'sub_toggle' => 'subtitle', 'hide_text_align' => true, 'font_size' => array( 'default' => '18px', ), 'line_height' => array( 'default' => '1.5em', ), ); $advanced_fields['fonts']['back_subtitle'] = array( 'css' => array( 'main' => '%%order_class%% .dtq-flipbox-subtitle-back', 'important' => 'all', ), 'tab_slug' => 'advanced', 'toggle_slug' => 'back_text', 'sub_toggle' => 'subtitle', 'hide_text_align' => true, 'font_size' => array( 'default' => '18px', ), 'line_height' => array( 'default' => '1.5em', ), ); return $advanced_fields; } public function render_icon_front() { $icon_name = esc_attr(et_pb_process_font_icon($this->props['front_icon'])); return sprintf( '
', $icon_name ); } public function render_icon_back() { $icon_name = esc_attr(et_pb_process_font_icon($this->props['back_icon'])); return sprintf( '', $icon_name ); } public function render_img_front() { return sprintf( '