selectors; $fields = []; if ( 'rtsb-shipping-form' !== $widget->rtsb_base ) { $fields = self::general_settings() + TitleSettings::title_settings( self::$widget ); } $fields = $fields + self::fields_settings(); return $fields; } /** * Widget Field * * @return array */ public static function general_settings() { // The function will Overwrite. $fields = TitleSettings::general_settings(); $fields['show_title']['selectors'] = [ self::$selectors['show_title'] => 'display:block;', ]; return $fields; } /** * Widget Field * * @return array */ public static function fields_settings() { $fields = [ 'fields_label_style_start' => [ 'mode' => 'section_start', 'tab' => 'style', 'label' => esc_html__( 'Form Label', 'shopbuilder' ), ], 'fields_label_typo' => [ 'mode' => 'group', 'type' => 'typography', 'label' => esc_html__( 'Label Typography', 'shopbuilder' ), 'selector' => self::$selectors['fields_label_typo'], ], 'fields_label_color' => [ 'label' => esc_html__( 'Label Color', 'shopbuilder' ), 'type' => 'color', 'selectors' => [ self::$selectors['fields_label_color'] => 'color: {{VALUE}} !important;', ], ], 'fields_label_reguired_color' => [ 'label' => esc_html__( 'Label Required Color', 'shopbuilder' ), 'type' => 'color', 'selectors' => [ self::$selectors['fields_label_reguired_color'] => 'color: {{VALUE}} !important;', ], ], 'fields_label_margin' => [ 'label' => esc_html__( 'Label Margin', 'shopbuilder' ), 'type' => 'dimensions', 'size_units' => [ 'px' ], 'selectors' => [ self::$selectors['fields_label_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ], 'fields_label_style_end' => [ 'mode' => 'section_end', ], 'fields_style_start' => [ 'mode' => 'section_start', 'tab' => 'style', 'label' => esc_html__( 'Form Fields', 'shopbuilder' ), ], 'fields_height' => [ 'label' => esc_html__( 'Fields Height', 'shopbuilder' ), 'type' => 'slider', 'separator' => 'default', 'range' => [ 'px' => [ 'min' => 10, 'max' => 200, ], ], 'selectors' => [ self::$selectors['fields_height'] => 'height: {{SIZE}}{{UNIT}};', ], ], 'fields_width_100' => [ 'label' => esc_html__( 'Full Width Fields?', 'shopbuilder' ), 'type' => 'switch', 'description' => esc_html__( 'Switch on to set all fields to a 100% width..', 'shopbuilder' ), 'default' => '', ], 'fields_tabs_start' => [ 'mode' => 'tabs_start', ], // Tab For normal view. 'fields_normal' => [ 'mode' => 'tab_start', 'label' => esc_html__( 'Normal', 'shopbuilder' ), ], 'fields_border' => [ 'mode' => 'group', 'type' => 'border', 'selector' => self::$selectors['fields_border'], 'size_units' => [ 'px' ], ], 'fields_border_radius' => [ 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ), 'type' => 'dimensions', 'size_units' => [ 'px' ], 'selectors' => [ self::$selectors['fields_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ], 'fields_text_color' => [ 'label' => esc_html__( 'Text Color', 'shopbuilder' ), 'type' => 'color', 'selectors' => [ self::$selectors['fields_text_color'] => 'color: {{VALUE}};', ], ], 'fields_bg_color' => [ 'label' => esc_html__( 'Background Color', 'shopbuilder' ), 'type' => 'color', 'alpha' => true, 'selectors' => [ self::$selectors['fields_bg_color'] => 'background-color: {{VALUE}};', ], ], 'fields_normal_end' => [ 'mode' => 'tab_end', ], 'fields_hover' => [ 'mode' => 'tab_start', 'label' => esc_html__( 'Hover & Focus', 'shopbuilder' ), ], 'fields_hover_border' => [ 'mode' => 'group', 'type' => 'border', 'selector' => self::$selectors['fields_hover_border'], 'size_units' => [ 'px' ], ], 'fields_border_radius_hover' => [ 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ), 'type' => 'dimensions', 'size_units' => [ 'px' ], 'selectors' => [ self::$selectors['fields_border_radius_hover'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ], 'fields_hover_text_color' => [ 'label' => esc_html__( 'Text Color', 'shopbuilder' ), 'type' => 'color', 'selectors' => [ self::$selectors['fields_hover_text_color'] => 'color: {{VALUE}};', ], ], 'fields_hover_bg_color' => [ 'label' => esc_html__( 'Background Color', 'shopbuilder' ), 'type' => 'color', 'alpha' => true, 'selectors' => [ self::$selectors['fields_hover_bg_color'] => 'background-color: {{VALUE}};', ], ], 'fields_hover_end' => [ 'mode' => 'tab_end', ], 'fields_tabs_end' => [ 'mode' => 'tabs_end', ], 'fields_padding' => [ 'label' => esc_html__( 'Fields Padding (px)', 'shopbuilder' ), 'type' => 'dimensions', 'mode' => 'responsive', 'size_units' => [ 'px' ], 'selectors' => [ self::$selectors['fields_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ], 'form_row_margin' => [ 'label' => esc_html__( 'Form Row Margin (px)', 'shopbuilder' ), 'mode' => 'responsive', 'type' => 'dimensions', 'size_units' => [ 'px' ], 'selectors' => [ self::$selectors['form_row_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], ], 'form_wrapper_margin' => [ 'label' => esc_html__( 'Form Wrapper Margin (px)', 'shopbuilder' ), 'mode' => 'responsive', 'type' => 'dimensions', 'size_units' => [ 'px' ], 'selectors' => [ self::$selectors['form_wrapper_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ], 'fields_style_end' => [ 'mode' => 'section_end', ], ]; if ( 'rtsb-shipping-form' === self::$widget->rtsb_base ) { $insert_array = [ 'form_heading_label' => [ 'type' => 'html', 'raw' => sprintf( '