PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.0.0
ShopBuilder – WooCommerce Builder For Elementor v1.0.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Widgets / Controls / ButtonSettings.php

ButtonSettings.php in ShopBuilder – WooCommerce Builder For Elementor 1.0.0, at app/Elementor/Widgets/Controls/ButtonSettings.php

166 lines 6.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use Elementor\Controls_Manager;
11 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
12
13
14 // Do not allow directly accessing this file.
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit( 'This script cannot be accessed directly.' );
17 }
18
19 /**
20 * Product Description class
21 */
22 class ButtonSettings {
23
24 /**
25 * Widget Field
26 *
27 * @return array
28 */
29 public static function style_settings( $widget ) {
30 $fields = [
31 'button_section_start' => [
32 'mode' => 'section_start',
33 'label' => esc_html__( 'Button', 'shopbuilder' ),
34 'tab' => 'style',
35 ],
36 'button_typography' => [
37 'mode' => 'group',
38 'type' => 'typography',
39 'label' => esc_html__( 'Typography', 'shopbuilder' ),
40 'selector' => $widget->selectors['button_typography'],
41 ],
42 'button_height' => [
43 'label' => esc_html__( 'Height', 'shopbuilder' ),
44 'type' => 'slider',
45 'range' => [
46 'px' => [
47 'min' => 10,
48 'max' => 200,
49 ],
50 ],
51 'selectors' => [
52 $widget->selectors['button_height'] => 'height: {{SIZE}}{{UNIT}};',
53 ],
54 ],
55 'button_tabs_start' => [
56 'mode' => 'tabs_start',
57 ],
58 'button_normal' => [
59 'mode' => 'tab_start',
60 'label' => esc_html__( 'Normal', 'shopbuilder' ),
61 ],
62 'button_text_color_normal' => [
63 'label' => esc_html__( 'Color', 'shopbuilder' ),
64 'type' => 'color',
65
66 'separator' => 'default',
67 'selectors' => [
68 $widget->selectors['button_text_color_normal'] => 'color: {{VALUE}};',
69 ],
70 ],
71 'button_bg_color_normal' => [
72 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
73 'type' => 'color',
74
75 'selectors' => [
76 $widget->selectors['button_bg_color_normal'] => 'background-color: {{VALUE}};',
77 ],
78 ],
79
80 'button_border' => [
81 'mode' => 'group',
82 'type' => 'border',
83 'selector' => $widget->selectors['button_border'],
84 'size_units' => [ 'px' ],
85 ],
86 'button_normal_end' => [
87 'mode' => 'tab_end',
88 ],
89 'button_hover' => [
90 'mode' => 'tab_start',
91 'label' => esc_html__( 'Hover', 'shopbuilder' ),
92 ],
93 'button_text_color_hover' => [
94 'label' => esc_html__( 'Color', 'shopbuilder' ),
95 'type' => 'color',
96
97 'separator' => 'default',
98 'selectors' => [
99 $widget->selectors['button_text_color_hover'] => 'color: {{VALUE}};',
100 ],
101 ],
102 'button_bg_color_hover' => [
103 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
104 'type' => 'color',
105
106 'selectors' => [
107 $widget->selectors['button_bg_color_hover'] => 'background-color: {{VALUE}};',
108 ],
109 ],
110 'button_border_hover_color' => [
111 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
112 'type' => 'color',
113
114 'selectors' => [
115 $widget->selectors['button_border_hover_color'] => 'border-color: {{VALUE}};',
116 ],
117 ],
118 'button_hover_end' => [
119 'mode' => 'tab_end',
120 ],
121 'button_tabs_end' => [
122 'mode' => 'tabs_end',
123 ],
124 'button_border_radius' => [
125 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
126 'type' => 'dimensions',
127 'default' => [
128 'top' => '5',
129 'right' => '5',
130 'bottom' => '5',
131 'left' => '5',
132 'unit' => 'px',
133 'isLinked' => true,
134 ],
135 'size_units' => [ 'px' ],
136 'separator' => 'before',
137 'selectors' => [
138 $widget->selectors['button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
139 ],
140 ],
141 'button_padding' => [
142 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
143 'type' => 'dimensions',
144 'size_units' => [ 'px' ],
145 'selectors' => [
146 $widget->selectors['button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
147 ],
148 'separator' => 'before',
149 ],
150 'button_margin' => [
151 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
152 'type' => 'dimensions',
153 'size_units' => [ 'px' ],
154 'selectors' => [
155 $widget->selectors['button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
156 ],
157 ],
158 'button_section_end' => [
159 'mode' => 'section_end',
160 ],
161 ];
162 return $fields;
163 }
164
165 }
166