| @@ -590,12 +590,8 @@ | ||
| 590 | 590 | 'min' => 0, |
| 591 | 591 | 'max' => 100, |
| 592 | 592 | ], |
| 593 | 593 | ], |
| 594 | - // 'default' => [ | |
| 595 | - // 'unit' => 'px', | |
| 596 | - // 'size' => 14, | |
| 597 | - // ], | |
| 598 | 594 | 'selectors' => $selectors['typography'], |
| 599 | 595 | ]; |
| 600 | 596 | |
| 601 | 597 | $fields['product_rating_bg_color']['label'] = esc_html__( 'Star Border Color', 'shopbuilder' ); |
| @@ -878,8 +874,78 @@ | ||
| 878 | 874 | return apply_filters( 'rtsb/elements/elementor/categories_style_control', $fields, $obj ); |
| 879 | 875 | } |
| 880 | 876 | |
| 881 | 877 | /** |
| 878 | + * Product Categories Section | |
| 879 | + * | |
| 880 | + * @param object $obj Reference object. | |
| 881 | + * | |
| 882 | + * @return array | |
| 883 | + */ | |
| 884 | + public static function product_brands( $obj ): array { | |
| 885 | + $css_selectors = $obj->selectors['product_brands']; | |
| 886 | + $title = esc_html__( 'Product Brands', 'shopbuilder' ); | |
| 887 | + $condition = [ | |
| 888 | + 'show_brands' => [ 'yes' ], | |
| 889 | + ]; | |
| 890 | + $selectors = [ | |
| 891 | + 'typography' => $css_selectors['typography'], | |
| 892 | + 'alignment' => [ $css_selectors['alignment'] => 'justify-content: {{VALUE}};' ], | |
| 893 | + 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ], | |
| 894 | + 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ], | |
| 895 | + 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ], | |
| 896 | + 'hover_bg_color' => [ $css_selectors['hover_bg_color'] => 'background-color: {{VALUE}};' ], | |
| 897 | + 'border' => $css_selectors['typography'], | |
| 898 | + 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ], | |
| 899 | + 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], | |
| 900 | + 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], | |
| 901 | + 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], | |
| 902 | + 'wrapper_margin' => [ $css_selectors['wrapper_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], | |
| 903 | + ]; | |
| 904 | + | |
| 905 | + $fields = ControlHelper::general_elementor_style( 'product_brands', $title, $obj, $condition, $selectors ); | |
| 906 | + | |
| 907 | + $fields['product_brands_alignment']['options'] = [ | |
| 908 | + 'flex-start' => [ | |
| 909 | + 'title' => esc_html__( 'Left', 'shopbuilder' ), | |
| 910 | + 'icon' => 'eicon-text-align-left', | |
| 911 | + ], | |
| 912 | + 'center' => [ | |
| 913 | + 'title' => esc_html__( 'Center', 'shopbuilder' ), | |
| 914 | + 'icon' => 'eicon-text-align-center', | |
| 915 | + ], | |
| 916 | + 'flex-end' => [ | |
| 917 | + 'title' => esc_html__( 'Right', 'shopbuilder' ), | |
| 918 | + 'icon' => 'eicon-text-align-right', | |
| 919 | + ], | |
| 920 | + ]; | |
| 921 | + | |
| 922 | + $extra_controls = []; | |
| 923 | + | |
| 924 | + $extra_controls['product_brands_radius'] = [ | |
| 925 | + 'mode' => 'responsive', | |
| 926 | + 'type' => 'dimensions', | |
| 927 | + 'label' => esc_html__( 'Border Radius', 'shopbuilder' ), | |
| 928 | + 'size_units' => [ 'px', '%', 'em' ], | |
| 929 | + 'selectors' => $selectors['border_radius'], | |
| 930 | + ]; | |
| 931 | + | |
| 932 | + $fields = Fns::insert_controls( 'product_brands_border_hover_color', $fields, $extra_controls, true ); | |
| 933 | + | |
| 934 | + $extra_controls['product_brands_wrapper_margin'] = [ | |
| 935 | + 'mode' => 'responsive', | |
| 936 | + 'type' => 'dimensions', | |
| 937 | + 'label' => esc_html__( 'Wrapper Margin', 'shopbuilder' ), | |
| 938 | + 'size_units' => [ 'px', '%', 'em' ], | |
| 939 | + 'selectors' => $selectors['wrapper_margin'], | |
| 940 | + ]; | |
| 941 | + | |
| 942 | + $fields = Fns::insert_controls( 'product_brands_margin', $fields, $extra_controls, true ); | |
| 943 | + | |
| 944 | + return apply_filters( 'rtsb/elements/elementor/brands_style_control', $fields, $obj ); | |
| 945 | + } | |
| 946 | + | |
| 947 | + /** | |
| 882 | 948 | * Image Section |
| 883 | 949 | * |
| 884 | 950 | * @param object $obj Reference object. |
| 885 | 951 | * @param array $conditions Conditions. |
| @@ -1678,9 +1744,12 @@ | ||
| 1678 | 1744 | 'layout' => [ 'grid-layout2', 'slider-layout2' ], |
| 1679 | 1745 | ]; |
| 1680 | 1746 | $selectors = [ |
| 1681 | 1747 | 'typography' => $css_selectors['typography'], |
| 1682 | - 'icon_size' => [ $css_selectors['icon_size'] => 'font-size: {{SIZE}}{{UNIT}}' ], | |
| 1748 | + 'icon_size' => [ | |
| 1749 | + $css_selectors['icon_size']['font_size'] => 'font-size: {{SIZE}}{{UNIT}} !important;', | |
| 1750 | + $css_selectors['icon_size']['svg'] => 'width: {{SIZE}}{{UNIT}} !important;', | |
| 1751 | + ], | |
| 1683 | 1752 | 'hover_icon_spacing' => [ $css_selectors['hover_icon_spacing'] => 'margin-left: {{SIZE}}{{UNIT}}' ], |
| 1684 | 1753 | 'color' => [ $css_selectors['color'] => 'color: {{VALUE}}' ], |
| 1685 | 1754 | 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}}' ], |
| 1686 | 1755 | 'icon_color' => [ $css_selectors['icon_color'] => 'color: {{VALUE}}' ], |
| @@ -1731,9 +1800,9 @@ | ||
| 1731 | 1800 | ], |
| 1732 | 1801 | ], |
| 1733 | 1802 | 'default' => [ |
| 1734 | 1803 | 'unit' => 'px', |
| 1735 | - 'size' => 3, | |
| 1804 | + 'size' => 5, | |
| 1736 | 1805 | ], |
| 1737 | 1806 | 'condition' => [ |
| 1738 | 1807 | 'show_hover_btn_icon' => [ 'yes' ], |
| 1739 | 1808 | ], |
| @@ -2141,9 +2210,12 @@ | ||
| 2141 | 2210 | public static function slider_buttons( $obj ): array { |
| 2142 | 2211 | $css_selectors = $obj->selectors['slider_buttons']; |
| 2143 | 2212 | $title = esc_html__( 'Slider Buttons', 'shopbuilder' ); |
| 2144 | 2213 | $selectors = [ |
| 2145 | - 'arrow_size' => [ $css_selectors['arrow_size'] => 'font-size: {{SIZE}}{{UNIT}};' ], | |
| 2214 | + 'arrow_size' => [ | |
| 2215 | + $css_selectors['arrow_size']['icon'] => 'font-size: {{SIZE}}{{UNIT}};', | |
| 2216 | + $css_selectors['arrow_size']['svg'] => 'width: {{SIZE}}{{UNIT}};', | |
| 2217 | + ], | |
| 2146 | 2218 | 'arrow_width' => [ $css_selectors['arrow_width'] => 'width: {{SIZE}}{{UNIT}};' ], |
| 2147 | 2219 | 'arrow_height' => [ $css_selectors['arrow_height'] => 'height: {{SIZE}}{{UNIT}};' ], |
| 2148 | 2220 | 'arrow_line_height' => [ $css_selectors['arrow_line_height'] => 'line-height: {{SIZE}}{{UNIT}};' ], |
| 2149 | 2221 | 'dot_width' => [ $css_selectors['dot_width'] => 'width: {{SIZE}}{{UNIT}};' ], |
| @@ -2207,8 +2279,12 @@ | ||
| 2207 | 2279 | 'min' => 1, |
| 2208 | 2280 | 'max' => 100, |
| 2209 | 2281 | 'step' => 1, |
| 2210 | 2282 | ], |
| 2283 | + ], | |
| 2284 | + 'default' => [ | |
| 2285 | + 'unit' => 'px', | |
| 2286 | + 'size' => 13, | |
| 2211 | 2287 | ], |
| 2212 | 2288 | 'condition' => $arrow_condition, |
| 2213 | 2289 | 'selectors' => $selectors['arrow_size'], |
| 2214 | 2290 | ]; |