'triangle', 'divider_position' => 'center', 'hide_on_mobile' => fusion_builder_default_visibility( 'string' ), 'class' => '', 'id' => '', 'backgroundcolor' => $fusion_settings->get( 'section_sep_bg' ), 'bordersize' => $fusion_settings->get( 'section_sep_border_size' ), 'bordercolor' => $fusion_settings->get( 'section_sep_border_color' ), 'divider_candy' => 'top', 'icon' => '', 'icon_color' => $fusion_settings->get( 'icon_color' ), ]; } /** * Maps settings to param variables. * * @static * @access public * @since 2.0.0 * @return array */ public static function settings_to_params() { return [ 'section_sep_bg' => 'backgroundcolor', 'section_sep_border_size' => 'bordersize', 'section_sep_border_color' => 'bordercolor', 'icon_color' => 'icon_color', ]; } /** * Used to set any other variables for use on front-end editor template. * * @static * @access public * @since 2.0.0 * @return array */ public static function get_element_extras() { $fusion_settings = fusion_get_fusion_settings(); return [ 'container_padding_100' => $fusion_settings->get( 'container_padding_100' ), 'layout' => fusion_get_option( 'layout' ), 'site_width' => esc_attr( $fusion_settings->get( 'site_width' ) ), 'header_position' => esc_attr( fusion_get_option( 'header_position' ) ), 'side_header_width' => $fusion_settings->get( 'side_header_width' ), 'hundredp_padding' => esc_attr( $fusion_settings->get( 'hundredp_padding' ) ), 'visibility_large' => $fusion_settings->get( 'visibility_large' ), 'visibility_medium' => $fusion_settings->get( 'visibility_medium' ), 'visibility_small' => $fusion_settings->get( 'visibility_small' ), ]; } /** * Maps settings to extra variables. * * @static * @access public * @since 2.0.0 * @return array */ public static function settings_to_extras() { return [ 'container_padding_100' => 'container_padding_100', 'layout' => 'layout', 'site_width' => 'site_width', 'header_position' => 'header_position', 'side_header_width' => 'side_header_width', 'hundredp_padding' => 'hundredp_padding', ]; } /** * Render the shortcode * * @access public * @since 1.0 * @param array $args Shortcode parameters. * @param string $content Content between shortcode. * @return string HTML output. */ public function render( $args, $content = '' ) { global $fusion_settings, $fusion_fwc_type, $fusion_col_type; $defaults = FusionBuilder::set_shortcode_defaults( self::get_element_defaults(), $args, 'fusion_section_separator' ); $defaults['bordersize'] = FusionBuilder::validate_shortcode_attr_value( $defaults['bordersize'], 'px' ); extract( $defaults ); $this->args = $defaults; if ( 'triangle' === $divider_type ) { if ( $icon ) { if ( ! $icon_color ) { $this->args['icon_color'] = $bordercolor; } $icon = '
'; } $candy = '
'; if ( false !== strpos( $this->args['divider_candy'], 'top' ) && false !== strpos( $this->args['divider_candy'], 'bottom' ) ) { $candy = '
'; } $candy = $icon . $candy; } elseif ( 'bigtriangle' === $divider_type ) { $candy = ''; if ( 'top' === $divider_candy ) { if ( 'right' === $divider_position ) { $candy .= ''; } elseif ( 'left' === $divider_position ) { $candy .= ''; } else { $candy .= ''; } } else { if ( 'right' === $divider_position ) { $candy .= ''; } elseif ( 'left' === $divider_position ) { $candy .= ''; } else { $candy .= ''; } } $candy .= ''; } elseif ( 'slant' === $divider_type ) { $candy = ''; if ( 'left' === $divider_position && 'top' === $divider_candy ) { $candy .= ''; } elseif ( 'right' === $divider_position && 'top' === $divider_candy ) { $candy .= ''; } elseif ( 'right' === $divider_position && 'bottom' === $divider_candy ) { $candy .= ''; } else { $candy .= ''; } $candy .= ''; } elseif ( 'rounded-split' === $divider_type ) { $candy = sprintf( '
', FusionBuilder::attributes( 'section-separator-shortcode-divider-rounded-split' ) ); } elseif ( 'big-half-circle' === $divider_type ) { $candy = ''; if ( 'top' === $divider_candy ) { $candy .= ''; } else { $candy .= ''; } $candy .= ''; } elseif ( 'curved' === $divider_type ) { $candy = ''; if ( 'left' === $divider_position ) { if ( 'top' === $divider_candy ) { $candy .= ''; } else { $candy .= ''; } } else { if ( 'top' === $divider_candy ) { $candy .= ''; } else { $candy .= ''; } } $candy .= ''; } elseif ( 'clouds' === $divider_type ) { $candy = ''; $candy .= ' '; $candy .= ''; } elseif ( 'horizon' === $divider_type ) { $y_min = ( 'top' === $divider_candy ) ? '-0.5' : '0'; $candy = ''; if ( 'top' === $divider_candy ) { $candy .= ' '; } else { $candy .= ' '; } $candy .= ''; } elseif ( 'hills' === $divider_type ) { if ( 'top' === $divider_candy ) { $candy = ''; $candy .= ''; } else { $candy = ''; $candy .= ''; } $candy .= ''; } elseif ( 'hills_opacity' === $divider_type ) { $y_min = ( 'top' === $divider_candy ) ? '-0.5' : '0'; $candy = ''; if ( 'top' === $divider_candy ) { $candy .= ' '; } else { $candy .= ' '; } $candy .= ''; } elseif ( 'waves' === $divider_type ) { $y_min = ( 'top' === $divider_candy ) ? '54' : '1'; $candy = ''; if ( 'left' === $divider_position ) { if ( 'top' === $divider_candy ) { $candy .= ''; } else { $candy .= ''; } } else { if ( 'top' === $divider_candy ) { $candy .= ''; } else { $candy .= ''; } } $candy .= ''; } elseif ( 'waves_opacity' === $divider_type ) { $y_min = ( 'top' === $divider_candy ) ? '0' : '1'; $candy = ''; if ( 'left' === $divider_position ) { if ( 'top' === $divider_candy ) { $candy .= ' '; } else { $candy .= ' '; } } else { if ( 'top' === $divider_candy ) { $candy .= ' '; } else { $candy .= ' '; } } $candy .= ''; } $html = '
'; $html .= '
' . $candy . '
'; $html .= '
'; $html .= '
'; $html .= '
'; if ( $this->args['additional_styles'] ) { $html .= ''; } $html .= '
'; $this->element_counter++; return apply_filters( 'fusion_element_section_separator_content', $html, $args ); } /** * Builds the attributes array. * * @access public * @since 1.0 * @return array */ public function attr() { $attr = fusion_builder_visibility_atts( $this->args['hide_on_mobile'], [ 'class' => 'fusion-section-separator section-separator ' . esc_attr( str_replace( '_', '-', $this->args['divider_type'] ) ) . ' fusion-section-separator-' . $this->element_counter, ] ); if ( 'rounded-split' === $this->args['divider_type'] ) { $attr['class'] .= ' rounded-split-separator'; } if ( $this->args['class'] ) { $attr['class'] .= ' ' . $this->args['class']; } if ( $this->args['id'] ) { $attr['id'] = $this->args['id']; } return $attr; } /** * Builds the attributes array for the svg wrapper. * * @access public * @since 3.0 * @return array */ public function svg_wrapper_attr() { global $fusion_settings, $fusion_fwc_type, $fusion_col_type; $attr = [ 'class' => 'fusion-section-separator-svg', 'style' => '', ]; if ( 'triangle' === $this->args['divider_type'] ) { if ( $this->args['bordercolor'] ) { if ( 'bottom' === $this->args['divider_candy'] ) { $attr['style'] = 'border-bottom:' . $this->args['bordersize'] . ' solid ' . $this->args['bordercolor'] . ';'; } elseif ( 'top' === $this->args['divider_candy'] ) { $attr['style'] = 'border-top:' . $this->args['bordersize'] . ' solid ' . $this->args['bordercolor'] . ';'; } elseif ( false !== strpos( $this->args['divider_candy'], 'top' ) && false !== strpos( $this->args['divider_candy'], 'bottom' ) ) { $attr['style'] = 'border:' . $this->args['bordersize'] . ' solid ' . $this->args['bordercolor'] . ';'; } } } elseif ( 'bigtriangle' === $this->args['divider_type'] || 'slant' === $this->args['divider_type'] || 'big-half-circle' === $this->args['divider_type'] || 'clouds' === $this->args['divider_type'] || 'curved' === $this->args['divider_type'] ) { $attr['style'] = 'padding:0;'; } elseif ( 'horizon' === $this->args['divider_type'] || 'waves' === $this->args['divider_type'] || 'waves_opacity' === $this->args['divider_type'] || 'hills' === $this->args['divider_type'] || 'hills_opacity' === $this->args['divider_type'] ) { $attr['style'] = 'font-size:0;line-height:0;'; } $this->args['additional_styles'] = ''; if ( ! empty( $fusion_fwc_type ) && isset( $fusion_col_type['type'] ) ) { // 100% width template && 1/1 column. if ( $fusion_fwc_type['width_100_percent'] && '1_1' === $fusion_col_type['type'] ) { if ( 'boxed' === fusion_get_option( 'layout' ) ) { foreach ( $fusion_fwc_type['padding_flex'] as $size => $paddings ) { if ( ! empty( $fusion_fwc_type['padding_flex'][ $size ]['left'] ) || ! empty( $fusion_fwc_type['padding_flex'][ $size ]['right'] ) ) { $this->args['additional_styles'] .= 'large' === $size ? '' : '@media only screen and (max-width:' . $fusion_settings->get( 'visibility_' . $size ) . 'px) {'; $this->args['additional_styles'] .= '.fusion-section-separator-' . $this->element_counter . ' .fusion-section-separator-svg {'; $this->args['additional_styles'] .= 'position: relative;'; if ( ! empty( $fusion_fwc_type['padding_flex'][ $size ]['left'] ) ) { $this->args['additional_styles'] .= 'margin-left:-' . $fusion_fwc_type['padding_flex'][ $size ]['left'] . ' !important;'; } if ( ! empty( $fusion_fwc_type['padding_flex'][ $size ]['right'] ) ) { $this->args['additional_styles'] .= 'margin-right:-' . $fusion_fwc_type['padding_flex'][ $size ]['right'] . '!important;'; } $this->args['additional_styles'] .= '}'; $this->args['additional_styles'] .= 'large' === $size ? '' : '}'; } } } else { $attr['class'] .= ' fusion-section-separator-fullwidth'; } } else { $margin_left = 0; $margin_right = 0; // Flex container. if ( isset( $fusion_col_type['margin'] ) ) { foreach ( $fusion_col_type['margin'] as $size => $margins ) { if ( ! empty( $fusion_col_type['margin'][ $size ]['left'] ) || ! empty( $fusion_col_type['margin'][ $size ]['right'] ) ) { $this->args['additional_styles'] .= 'large' === $size ? '' : '@media only screen and (max-width:' . $fusion_settings->get( 'visibility_' . $size ) . 'px) {'; $this->args['additional_styles'] .= '.fusion-section-separator-' . $this->element_counter . ' .fusion-section-separator-svg {'; if ( ! empty( $fusion_col_type['margin'][ $size ]['left'] ) ) { $this->args['additional_styles'] .= 'margin-left:' . $fusion_col_type['margin'][ $size ]['left'] . ';'; } if ( ! empty( $fusion_col_type['margin'][ $size ]['right'] ) ) { $this->args['additional_styles'] .= 'margin-right:' . $fusion_col_type['margin'][ $size ]['right'] . ';'; } $this->args['additional_styles'] .= '}'; $this->args['additional_styles'] .= 'large' === $size ? '' : '}'; } } } else { $attr['style'] .= 'margin-left: 0px;'; $attr['style'] .= 'margin-right: 0px;'; } } } return $attr; } /** * Builds the attributes array for the spacer. * * @access public * @since 3.0 * @return array */ public function spacer_attr() { global $fusion_fwc_type, $fusion_col_type; $attr['class'] = 'fusion-section-separator-spacer'; // 100% width template && 1/1 column. if ( ! empty( $fusion_fwc_type ) && isset( $fusion_col_type['type'] ) && $fusion_fwc_type['width_100_percent'] && '1_1' === $fusion_col_type['type'] ) { if ( 'wide' === fusion_get_option( 'layout' ) ) { $attr['class'] .= ' fusion-section-separator-fullwidth'; } else { $attr['style'] = 'display: none;'; } } return $attr; } /** * Builds the attributes array for the spacer height container. * * @access public * @since 3.0 * @return array */ public function spacer_height_attr() { $attr['class'] = 'fusion-section-separator-spacer-height'; $hundred_px_separators = [ 'slant', 'bigtriangle', 'curved', 'big-half-circle', 'clouds' ]; if ( in_array( $this->args['divider_type'], $hundred_px_separators, true ) ) { $attr['style'] = 'height:99px;'; } elseif ( 'triangle' === $this->args['divider_type'] ) { if ( $this->args['bordercolor'] ) { if ( 'bottom' === $this->args['divider_candy'] || 'top' === $this->args['divider_candy'] ) { $attr['style'] = 'height:' . $this->args['bordersize'] . ';'; } elseif ( false !== strpos( $this->args['divider_candy'], 'top' ) && false !== strpos( $this->args['divider_candy'], 'bottom' ) ) { $attr['style'] = 'height:calc( ' . $this->args['bordersize'] . ' * 2 );'; } } } elseif ( 'rounded-split' === $this->args['divider_type'] ) { $attr['style'] = 'height:71px;'; } elseif ( 'hills_opacity' === $this->args['divider_type'] ) { $attr['style'] = 'padding-top:' . ( 182 / 1024 * 100 ) . '%;'; } elseif ( 'hills' === $this->args['divider_type'] ) { $attr['style'] = 'padding-top:' . ( 107 / 1024 * 100 ) . '%;'; } elseif ( 'horizon' === $this->args['divider_type'] ) { $attr['style'] = 'padding-top:' . ( 178 / 1024 * 100 ) . '%;'; } elseif ( 'waves_opacity' === $this->args['divider_type'] ) { $attr['style'] = 'padding-top:' . ( 216 / 1024 * 100 ) . '%;'; } elseif ( 'waves' === $this->args['divider_type'] ) { $attr['style'] = 'padding-top:' . ( 162 / 1024 * 100 ) . '%;'; } return $attr; } /** * Builds the rounded split attributes array. * * @access public * @since 1.0 * @return array */ public function divider_svg_attr() { $attr = []; if ( 'bigtriangle' === $this->args['divider_type'] || 'slant' === $this->args['divider_type'] || 'big-half-circle' === $this->args['divider_type'] || 'clouds' === $this->args['divider_type'] || 'curved' === $this->args['divider_type'] ) { $attr['style'] = sprintf( 'fill:%s;padding:0;', $this->args['backgroundcolor'] ); } if ( 'slant' === $this->args['divider_type'] && 'bottom' === $this->args['divider_candy'] ) { $attr['style'] = sprintf( 'fill:%s;padding:0;margin-bottom:-3px;display:block', $this->args['backgroundcolor'] ); } return $attr; } /** * Builds the rounded split attributes array. * * @access public * @since 1.0 * @return array */ public function divider_rounded_split_attr() { return [ 'class' => 'rounded-split ' . $this->args['divider_candy'], 'style' => 'background-color:' . $this->args['backgroundcolor'] . ';', ]; } /** * Builds the icon attributes array. * * @access public * @since 1.0 * @return array */ public function icon_attr() { $attr = [ 'class' => 'section-separator-icon icon ' . fusion_font_awesome_name_handler( $this->args['icon'] ), 'style' => 'color:' . $this->args['icon_color'] . ';', 'aria-hidden' => 'true', ]; if ( FusionBuilder::strip_unit( $this->args['bordersize'] ) > 1 ) { $divider_candy = $this->args['divider_candy']; if ( 'bottom' === $divider_candy ) { $attr['style'] .= 'bottom:-' . ( FusionBuilder::strip_unit( $this->args['bordersize'] ) + 10 ) . 'px;top:auto;'; } elseif ( 'top' === $divider_candy ) { $attr['style'] .= 'top:-' . ( FusionBuilder::strip_unit( $this->args['bordersize'] ) + 10 ) . 'px;'; } } return $attr; } /** * Builds the divider attributes array. * * @access public * @since 1.0 * @param array $args The arguments array. * @return array */ public function divider_candy_attr( $args ) { $attr = [ 'class' => 'divider-candy', ]; $divider_candy = ( $args ) ? $args['divider_candy'] : $this->args['divider_candy']; if ( 'bottom' === $divider_candy ) { $attr['class'] .= ' bottom'; $attr['style'] = 'bottom:-' . ( FusionBuilder::strip_unit( $this->args['bordersize'] ) + 20 ) . 'px;border-bottom:1px solid ' . $this->args['bordercolor'] . ';border-left:1px solid ' . $this->args['bordercolor'] . ';'; } elseif ( 'top' === $divider_candy ) { $attr['class'] .= ' top'; $attr['style'] = 'top:-' . ( FusionBuilder::strip_unit( $this->args['bordersize'] ) + 20 ) . 'px;border-bottom:1px solid ' . $this->args['bordercolor'] . ';border-left:1px solid ' . $this->args['bordercolor'] . ';'; // Modern setup, that won't work in IE8. } elseif ( false !== strpos( $this->args['divider_candy'], 'top' ) && false !== strpos( $this->args['divider_candy'], 'bottom' ) ) { $attr['class'] .= ' both'; $attr['style'] = 'background-color:' . $this->args['backgroundcolor'] . ';border:1px solid ' . $this->args['bordercolor'] . ';'; } return $attr; } /** * Builds the divider-arrow attributes array. * * @access public * @since 1.0 * @param array $args The arguments array. * @return array */ public function divider_candy_arrow_attr( $args ) { $attr = [ 'class' => 'divider-candy-arrow', ]; $divider_candy = ( $args ) ? $args['divider_candy'] : $this->args['divider_candy']; // For borders of size 1, we need to hide the border line on the arrow, thus we set it to 0. $arrow_position = FusionBuilder::strip_unit( $this->args['bordersize'] ); if ( '1' == $arrow_position ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison $arrow_position = 0; } if ( 'bottom' === $divider_candy ) { $attr['class'] .= ' bottom'; $attr['style'] = 'top:' . $arrow_position . 'px;border-top-color: ' . $this->args['backgroundcolor'] . ';'; } elseif ( 'top' === $divider_candy ) { $attr['class'] .= ' top'; $attr['style'] = 'bottom:' . $arrow_position . 'px;border-bottom-color: ' . $this->args['backgroundcolor'] . ';'; } return $attr; } /** * Load base CSS. * * @access public * @since 3.0 * @return void */ public function add_css_files() { FusionBuilder()->add_element_css( FUSION_BUILDER_PLUGIN_DIR . 'assets/css/shortcodes/section-separator.min.css' ); } /** * Adds settings to element options panel. * * @access public * @since 1.1 * @return array $sections Section Separator settings. */ public function add_options() { return [ 'section_separator_shortcode_section' => [ 'label' => esc_html__( 'Section Separator', 'fusion-builder' ), 'description' => '', 'id' => 'section_separator_shortcode_section', 'type' => 'accordion', 'icon' => 'fusiona-ellipsis', 'fields' => [ 'section_sep_border_size' => [ 'label' => esc_html__( 'Section Separator Border Size', 'fusion-builder' ), 'description' => esc_html__( 'Controls the border size of the section separator.', 'fusion-builder' ), 'id' => 'section_sep_border_size', 'default' => '1', 'type' => 'slider', 'transport' => 'postMessage', 'choices' => [ 'min' => '0', 'max' => '50', 'step' => '1', ], ], 'section_sep_bg' => [ 'label' => esc_html__( 'Section Separator Background Color', 'fusion-builder' ), 'description' => esc_html__( 'Controls the background color of the section separator style.', 'fusion-builder' ), 'id' => 'section_sep_bg', 'default' => '#f9f9fb', 'type' => 'color-alpha', 'transport' => 'postMessage', ], 'section_sep_border_color' => [ 'label' => esc_html__( 'Section Separator Border Color', 'fusion-builder' ), 'description' => esc_html__( 'Controls the border color of the separator.', 'fusion-builder' ), 'id' => 'section_sep_border_color', 'default' => '#e2e2e2', 'type' => 'color-alpha', 'transport' => 'postMessage', ], ], ], ]; } } } new FusionSC_SectionSeparator(); } /** * Map shortcode to Avada Builder. * * @since 1.0 */ function fusion_element_section_separator() { global $fusion_settings; fusion_builder_map( fusion_builder_frontend_data( 'FusionSC_SectionSeparator', [ 'name' => esc_attr__( 'Section Separator', 'fusion-builder' ), 'shortcode' => 'fusion_section_separator', 'icon' => 'fusiona-ellipsis', 'preview' => FUSION_BUILDER_PLUGIN_DIR . 'inc/templates/previews/fusion-section-separator-preview.php', 'preview_id' => 'fusion-builder-block-module-section-separator-preview-template', 'help_url' => 'https://theme-fusion.com/documentation/fusion-builder/elements/section-separator-element/', 'params' => [ [ 'type' => 'select', 'heading' => esc_attr__( 'Section Separator Style', 'fusion-builder' ), 'description' => esc_attr__( 'Select the type of the section separator', 'fusion-builder' ), 'param_name' => 'divider_type', 'value' => [ 'triangle' => esc_attr__( 'Triangle', 'fusion-builder' ), 'slant' => esc_attr__( 'Slant', 'fusion-builder' ), 'bigtriangle' => esc_attr__( 'Big Triangle', 'fusion-builder' ), 'rounded-split' => esc_attr__( 'Rounded Split', 'fusion-builder' ), 'curved' => esc_attr__( 'Curved', 'fusion-builder' ), 'big-half-circle' => esc_attr__( 'Big Half Circle', 'fusion-builder' ), 'clouds' => esc_attr__( 'Clouds', 'fusion-builder' ), 'horizon' => esc_attr__( 'Horizon', 'fusion-builder' ), 'waves' => esc_attr__( 'Waves', 'fusion-builder' ), 'waves_opacity' => esc_attr__( 'Waves Opacity', 'fusion-builder' ), 'hills' => esc_attr__( 'Hills', 'fusion-builder' ), 'hills_opacity' => esc_attr__( 'Hills Opacity', 'fusion-builder' ), ], 'default' => 'triangle', ], [ 'type' => 'radio_button_set', 'heading' => esc_attr__( 'Horizontal Position of the Section Separator', 'fusion-builder' ), 'description' => esc_attr__( 'Select the horizontal position of the section separator.', 'fusion-builder' ), 'param_name' => 'divider_position', 'value' => [ 'left' => esc_attr__( 'Left', 'fusion-builder' ), 'center' => esc_attr__( 'Center', 'fusion-builder' ), 'right' => esc_attr__( 'Right', 'fusion-builder' ), ], 'default' => 'center', 'dependency' => [ [ 'element' => 'divider_type', 'value' => 'triangle', 'operator' => '!=', ], [ 'element' => 'divider_type', 'value' => 'rounded-split', 'operator' => '!=', ], [ 'element' => 'divider_type', 'value' => 'big-half-circle', 'operator' => '!=', ], [ 'element' => 'divider_type', 'value' => 'clouds', 'operator' => '!=', ], [ 'element' => 'divider_type', 'value' => 'horizon', 'operator' => '!=', ], [ 'element' => 'divider_type', 'value' => 'hills', 'operator' => '!=', ], [ 'element' => 'divider_type', 'value' => 'hills_opacity', 'operator' => '!=', ], ], ], [ 'type' => 'radio_button_set', 'heading' => esc_attr__( 'Vertical Position of the Section Separator', 'fusion-builder' ), 'description' => esc_attr__( 'Select the vertical position of the section separator.', 'fusion-builder' ), 'param_name' => 'divider_candy', 'value' => [ 'top' => esc_attr__( 'Top', 'fusion-builder' ), 'bottom' => esc_attr__( 'Bottom', 'fusion-builder' ), 'bottom,top' => esc_attr__( 'Top and Bottom', 'fusion-builder' ), ], 'default' => 'top', 'dependency' => [ [ 'element' => 'divider_type', 'value' => 'clouds', 'operator' => '!=', ], ], ], [ 'type' => 'iconpicker', 'heading' => esc_attr__( 'Icon', 'fusion-builder' ), 'param_name' => 'icon', 'value' => '', 'description' => esc_attr__( 'Click an icon to select, click again to deselect.', 'fusion-builder' ), 'dependency' => [ [ 'element' => 'divider_type', 'value' => 'triangle', 'operator' => '==', ], ], ], [ 'type' => 'colorpickeralpha', 'heading' => esc_attr__( 'Icon Color', 'fusion-builder' ), 'description' => '', 'param_name' => 'icon_color', 'value' => '', 'default' => $fusion_settings->get( 'icon_color' ), 'dependency' => [ [ 'element' => 'divider_type', 'value' => 'triangle', 'operator' => '==', ], [ 'element' => 'icon', 'value' => '', 'operator' => '!=', ], ], ], [ 'type' => 'range', 'heading' => __( 'Border', 'fusion-builder' ), 'heading' => esc_attr__( 'Border', 'fusion-builder' ), 'description' => esc_attr__( 'In pixels.', 'fusion-builder' ), 'param_name' => 'bordersize', 'value' => '', 'min' => '0', 'max' => '50', 'step' => '1', 'default' => $fusion_settings->get( 'section_sep_border_size' ), 'dependency' => [ [ 'element' => 'divider_type', 'value' => 'triangle', 'operator' => '==', ], ], ], [ 'type' => 'colorpickeralpha', 'heading' => __( 'Border Color', 'fusion-builder' ), 'heading' => esc_attr__( 'Border Color', 'fusion-builder' ), 'description' => esc_attr__( 'Controls the border color. ', 'fusion-builder' ), 'param_name' => 'bordercolor', 'value' => '', 'default' => $fusion_settings->get( 'section_sep_border_color' ), 'dependency' => [ [ 'element' => 'divider_type', 'value' => 'triangle', 'operator' => '==', ], [ 'element' => 'bordersize', 'value' => '0', 'operator' => '!=', ], ], ], [ 'type' => 'colorpickeralpha', 'heading' => esc_attr__( 'Background Color of the Section Separator', 'fusion-builder' ), 'description' => esc_attr__( 'Controls the background color of the section separator style.', 'fusion-builder' ), 'param_name' => 'backgroundcolor', 'value' => '', 'default' => $fusion_settings->get( 'section_sep_bg' ), ], [ 'type' => 'checkbox_button_set', 'heading' => esc_attr__( 'Element Visibility', 'fusion-builder' ), 'param_name' => 'hide_on_mobile', 'value' => fusion_builder_visibility_options( 'full' ), 'default' => fusion_builder_default_visibility( 'array' ), 'description' => esc_attr__( 'Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time.', 'fusion-builder' ), ], [ 'type' => 'textfield', 'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ), 'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ), 'param_name' => 'class', 'value' => '', ], [ 'type' => 'textfield', 'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ), 'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ), 'param_name' => 'id', 'value' => '', ], ], ] ) ); } add_action( 'fusion_builder_before_init', 'fusion_element_section_separator' );